gbase安装
轉自:http://blog.sina.com.cn/s/blog_152485fc30102wd0b.html
一、安裝前的準備工作
1、對網卡進行配置
[root@gbase8a ~]#vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=00:0C:29:2E:E9:71
TYPE=Ethernet
UUID=771cc37d-0811-4961-8648-b280f3f8232f
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
DNS1=192.168.204.1
IPADDR=192.168.204.131
NETMASK=255.255.255.0
GETEWAY=192.168.204.1
[root@gbase8a ~]#service network restart
2、檢查系統是否安裝了必須的軟件包
??安裝系統時,如果沒有選擇“桌面”或“軟件開發工作站”安裝,或不清
楚系統安裝情況時,請按如下方法檢查系統中是否安裝了必須的軟件包:
# rpm -qa | grep boost
boost-signals-1.41.0-11.el6_1.2.x86_64
boost-wave-1.41.0-11.el6_1.2.x86_64
boost-python-1.41.0-11.el6_1.2.x86_64
boost-system-1.41.0-11.el6_1.2.x86_64
boost-date-time-1.41.0-11.el6_1.2.x86_64
boost-serialization-1.41.0-11.el6_1.2.x86_64
boost-graph-1.41.0-11.el6_1.2.x86_64
boost-test-1.41.0-11.el6_1.2.x86_64
boost-program-options-1.41.0-11.el6_1.2.x86_64
boost-regex-1.41.0-11.el6_1.2.x86_64
boost-1.41.0-11.el6_1.2.x86_64
boost-iostreams-1.41.0-11.el6_1.2.x86_64
boost-filesystem-1.41.0-11.el6_1.2.x86_64
boost-thread-1.41.0-11.el6_1.2.x86_64
# rpm -qa | grep libtool
libtool-ltdl-2.2.6-15.5.el6.x86_64
# rpm -qa | grep apr
apr-1.3.9-3.el6_1.2.x86_64
apr-util-ldap-1.3.9-3.el6_0.1.x86_64
apr-util-1.3.9-3.el6_0.1.x86_64
# rpm -qa | grep cpp
qpid-cpp-client-ssl-0.12-6.el6.x86_64
qpid-cpp-server-0.12-6.el6.x86_64
libmcpp-2.7.2-4.1.el6.x86_64
qpid-cpp-server-ssl-0.12-6.el6.x86_64
mcpp-2.7.2-4.1.el6.x86_64
abrt-addon-ccpp-2.0.4-14.el6.x86_64
qpid-cpp-client-0.12-6.el6.x86_64
# rpm -qa | grep elfutils
elfutils-libelf-0.152-1.el6.x86_64
elfutils-0.152-1.el6.x86_64
elfutils-libs-0.152-1.el6.x86_64
# rpm -qa | grep file
filesystem-2.4.30-3.el6.x86_64
mozilla-filesystem-1.9-5.1.el6.x86_64
file-libs-5.04-11.el6.x86_64
control-center-filesystem-2.28.1-25.el6.x86_64
fontpackages-filesystem-1.41-1.1.el6.noarch
rootfiles-8.1-6.1.el6.noarch
foomatic-db-filesystem-4.0-7.20091126.el6.noarch
file-5.04-11.el6.x86_64
libsndfile-1.0.20-5.el6.x86_64
libxkbfile-1.0.6-1.1.el6.x86_64
file-roller-2.28.2-6.el6.x86_64
boost-filesystem-1.41.0-11.el6_1.2.x86_64
desktop-file-utils-0.15-9.el6.x86_64
# rpm -qa | grep gcc
libgcc-4.4.6-3.el6.x86_64
# rpm -qa | grep gdb
gdbm-1.8.0-36.el6.x86_64
gdb-7.2-50.el6.x86_64
eggdbus-0.6-3.el6.x86_64
# rpm -qa|grep libgomp
libgomp-4.4.6-3.el6.x86_64
# rpm -qa|grep libicu
libicu-4.2.1-9.el6.x86_64
# rpm -qa|grep libproxy
libproxy-0.3.0-2.el6.x86_64
libproxy-python-0.3.0-2.el6.x86_64
libproxy-bin-0.3.0-2.el6.x86_64
# rpm -qa|grep neon
neon-0.29.3-1.2.el6.x86_64
# rpm -qa|grep pakchois
pakchois-0.4-3.2.el6.x86_64
# rpm -qa|grep patch
patch-2.6-6.el6.x86_64
# rpm -qa|grep perl
perl-CPANPLUS-0.88-119.el6_1.1.x86_64
perl-Params-Check-0.26-119.el6_1.1.x86_64
perl-Log-Message-0.02-119.el6_1.1.x86_64
perl-Compress-Zlib-2.020-119.el6_1.1.x86_64
perl-ExtUtils-CBuilder-0.27-119.el6_1.1.x86_64
perl-DBD-SQLite-1.27-3.el6.x86_64
perl-Time-HiRes-1.9721-119.el6_1.1.x86_64
perl-libxml-perl-0.08-10.el6.noarch
perl-version-0.77-119.el6_1.1.x86_64
perl-devel-5.10.1-119.el6_1.1.x86_64
perl-Compress-Raw-Zlib-2.023-119.el6_1.1.x86_64
perl-Log-Message-Simple-0.04-119.el6_1.1.x86_64
perl-Module-CoreList-2.18-119.el6_1.1.x86_64
perl-XML-Twig-3.34-1.el6.noarch
perl-CGI-3.51-119.el6_1.1.x86_64
perl-HTML-Parser-3.64-2.el6.x86_64
perl-libs-5.10.1-119.el6_1.1.x86_64
perl-5.10.1-119.el6_1.1.x86_64
perl-ExtUtils-ParseXS-2.2003.0-119.el6_1.1.x86_64
perl-Module-Load-Conditional-0.30-119.el6_1.1.x86_64
perl-IO-Compress-Base-2.020-119.el6_1.1.x86_64
perl-Archive-Tar-1.58-119.el6_1.1.x86_64
perl-Archive-Extract-0.38-119.el6_1.1.x86_64
perl-Module-Loaded-0.02-119.el6_1.1.x86_64
perl-DBI-1.609-4.el6.x86_64
perl-Module-Build-0.3500-119.el6_1.1.x86_64
perl-parent-0.221-119.el6_1.1.x86_64
perl-core-5.10.1-119.el6_1.1.x86_64
perl-XML-Dumper-0.81-6.el6.noarch
perl-Parse-CPAN-Meta-1.40-119.el6_1.1.x86_64
perl-libwww-perl-5.833-2.el6.noarch
perl-Pod-Escapes-1.04-119.el6_1.1.x86_64
perl-Pod-Simple-3.13-119.el6_1.1.x86_64
perl-Test-Harness-3.17-119.el6_1.1.x86_64
perl-Module-Load-0.16-119.el6_1.1.x86_64
perl-Package-Constants-0.02-119.el6_1.1.x86_64
perl-IO-Zlib-1.09-119.el6_1.1.x86_64
perl-File-Fetch-0.26-119.el6_1.1.x86_64
perl-Object-Accessor-0.34-119.el6_1.1.x86_64
perl-URI-1.40-2.el6.noarch
perl-CPAN-1.9402-119.el6_1.1.x86_64
perl-ExtUtils-Embed-1.28-119.el6_1.1.x86_64
perl-XML-Parser-2.36-7.el6.x86_64
perl-Module-Pluggable-3.90-119.el6_1.1.x86_64
perl-ExtUtils-MakeMaker-6.55-119.el6_1.1.x86_64
perl-Term-UI-0.20-119.el6_1.1.x86_64
perl-Digest-SHA-5.47-119.el6_1.1.x86_64
perl-Crypt-SSLeay-0.57-16.el6.x86_64
perl-XML-Grove-0.46alpha-40.el6.noarch
perl-HTML-Tagset-3.20-4.el6.noarch
perl-Locale-Maketext-Simple-0.18-119.el6_1.1.x86_64
perl-IPC-Cmd-0.56-119.el6_1.1.x86_64
perl-IO-Compress-Zlib-2.020-119.el6_1.1.x86_64
perl-Test-Simple-0.92-119.el6_1.1.x86_64
perl-DBIx-Simple-1.32-3.el6.noarch
perl-Time-Piece-1.15-119.el6_1.1.x86_64
# rpm -qa|grep ppl
libpanelappletmm-2.26.0-3.el6.x86_64
poppler-utils-0.12.4-3.el6_0.1.x86_64
poppler-glib-0.12.4-3.el6_0.1.x86_64
wpa_supplicant-0.7.3-2.el6.x86_64
poppler-data-0.4.0-1.el6.noarch
poppler-0.12.4-3.el6_0.1.x86_64
gnome-applets-2.28.0-7.el6.x86_64
gdm-user-switch-applet-2.30.4-32.el6.x86_64
gnome-python2-applet-2.28.0-4.el6.x86_64
# rpm -qa|grep unzip
unzip-6.0-1.el6.x86_64
# rpm -qa|grep xz
xz-libs-4.999.9-0.3.beta.20091007git.el6.x86_64
xz-4.999.9-0.3.beta.20091007git.el6.x86_64
xz-lzma-compat-4.999.9-0.3.beta.20091007git.el6.x86_64
# rpm -qa | grep json
python-simplejson-2.0.9-3.1.el6.x86_64
json-c-0.10-2.el6.x86_64
?
?
二、安裝GBase 8a
1、在Linux下創建一個用戶
??在安裝GBase 8a?之前,需要在Linux?下使用root?用戶創建一個新的操作系統用戶,這個新用戶用于GBase 8a?的安裝以及安裝后的運行。
具體操作如下,創建gbase?用戶,并更改它的密碼:
# useradd gbase
# passwd gbase
更改用戶?gbase?的密碼?。
新的?密碼:
重新輸入新的?密碼:
passwd:?所有的身份驗證令牌已經成功更新。
切換到gbase?用戶,測試是否創建成功。
# su - gbase
$
2、解壓安裝文件
??將安裝包的壓縮文件(如:GBase8a_8.5.1.2_build5.4_Redhat6.2_x86_64.tar.bz2)復制到文件系統的某個目錄下。進入該目錄(下文假設將安裝包放在了/home/gbase?目錄下),切換到gbase?用戶,在命令行模式下使用?tar?命令進行解壓。解壓命令如下:
# su - gbase
$ cd /home/gbase
$ tar xfj GBase8a_8.5.1.2_build5.4_Redhat6.2_x86_64.tar.bz2
??解壓后,將會在解壓目錄下生成GBaseInstall?目錄。
??說明:?GBase8a_8.5.1.2_build5.4_Redhat6.2_x86_64.tar.bz2?中,“8.5.1.2- build5.4”為產品版本號,“redhat6.2-x86_64”為產品適用的操作系統和平臺。
3、開始安裝
??使用gbase?用戶,進入GBaseInstall?目錄,執行GBase 8a?安裝腳本Install_lin.sh,即可進行安裝。具體命令如下:
$ cd /home/gbase/GBaseInstall
$ sh ./Install_lin.sh
4.安裝過程示例
??GBase 8a?的安裝過程中,系統會自動詢問創建GBase 8a?實例名稱,安裝路徑,安裝端口等詢問信息,如果用戶希望使用默認設置,則在提示詢問信息后,直接“回車”即可,如果需要更改詢問信息的設置,直接錄入新的設置信息即可。如下:
$ sh ./Install_lin.sh
*******************************************************************************
**
Thank you for choosing GBase product!
Please read carefully the following licencing agreement before installing any
product:
TIANJIN GENERAL DATA TECHNOLOGY CO. LTD. LICENSE AGREEMENT
READ THE TERMS OF THIS AGREEMENT AND ANY PROVIDED SUPPLEMENTAL LICENSETERMS
(COLLECTIVELY "AGREEMENT") CAREFULLY BEFORE OPENING THE SOFTWAREMEDIA PACKAGE. BY
OPENING THE SOFTWARE MEDIA PACKAGE, YOU AGREE TO THE TERMS OF THIS AGREEMENT. IF
YOU ARE ACCESSING THE SOFTWARE ELECTRONICALLY, INDICATE YOUR ACCEPTANCE OF THESE
TERMS. IF YOU DO NOT AGREE TO ALL THESE TERMS, PROMPTLY RETURN THE UNUSED SOFTWARE
TO YOUR PLACE OF PURCHASE FOR A REFUND.
1. LICENSE TO USE. GeneralData grants you a non-exclusive and non-transferable
license for the internal use only of the accompanying software and documentation
and any error corrections provided by GeneralData(collectively "Software"), by the
number of users and the class of computer hardware for which the corresponding fee
has been paid.
2. RESTRICTIONS. Software is confidential and copyrighted. Title to Software and
all associated intellectual property rights is retained by GeneralData and/or its
licensors. Except as specifically authorized in any Supplemental License Terms,
you may not make copies of Software, other than a single copy of Software for archival
purposes. Unless enforcement is prohibited by applicable law, you may not
modify,decompile, or reverse engineer Software. You acknowledge that Software is
not designed, licensed or intended for use in the design,construction, operation
or maintenance of any nuclear facility. GeneralData disclaims any express or
implied warranty of fitness for such uses.No right, title or interest in or to any
trademark, service mark, logo or trade name of GeneralData or its licensors is granted
under this Agreement.
3. DISCLAIMER OF WARRANTY. Unless specified in this agreement, all express of
implied conditions, representations and warranties, including any implied warranty
of merchantability, fitness for aparticular purpose or non-infringement are
disclaimed, except to theextent that these disclaimers are held to be legally
invalid.
4. LIMITATION OF LIABILITY. To the extent not prohibited by law, in no event will
GeneralData or its licensors be liable for any lost revenue, profit or data, or for
special, indirect, consequential,incidental orpunitive damages, however caused
regardless of the theory of liability, arising out of or related to the use of or
inability to use software, even if GeneralData has been advised of the possibility
of such damages.In no event will GeneralData's libility to you, whether incontract,
tort (including negligence), or otherwise, exceed the amount paid by you for Software
under this Agreement. The foregoing limitations will apply even if the above stated
warranty fails of itsessential purpose.
5. TERMINATION. This Agreement is effective until terminated. Youmay terminate
this Agreement at any time by destroying all copies of Software. This Agreement
will terminate immediately without noticefrom GeneralData if you fail to comply with
any provision of this Agreement.Upon Termination, you must destroy all copies of
Software.
6. EXPORT REGULATIONS. All Software and technical data delivered underthis
Agreement are subject to US export control laws and may be subject to export or import
regulations in other countries. You agree to comply strictly with all such laws
and regulations and acknowledge that you have the responsibility to obtain such
licenses to export,re-export, or import as may be required after delivery to you.
7. CHINESE GOVERNMENT RESTRICTED. If Software is being acquired by or on behalf
of the Chinese Government , then the Government's rights in Software and accompanying
documentation will be only as set forth in this Agreement.
8. GOVERNING LAW. Any action related to this Agreement will be governed by Chinese
law: "COPYRIGHT LAW OF THE PEOPLE'S REPUBLIC OF CHINA","PATENT LAW OF THE PEOPLE'S
REPUBLIC OF CHINA","TRADEMARK LAW OF THE PEOPLE'S REPUBLIC OF CHINA","COMPUTER
SOFTWARE PROTECTION REGULATIONS OF THE PEOPLE'S REPUBLIC OF CHINA". No choice of
law rules of any jurisdiction will apply."
9. SEVERABILITY. If any provision of this Agreement is held to be unenforceable,
this Agreement will remain in effect with the provision omitted, unless omission
would frustrate the intent of the parties, inwhich case this Agreement will
immediately terminate.
10. INTEGRATION. This Agreement is the entire agreement between you and GeneralData
relating to its subject matter. It supersedes all prior or contemporaneous oral
or written communications, proposals,representations and warranties and prevails
over any conflicting or additional terms of any quote, order, acknowledgment, or
other communication between the parties relating to its subject matter during the
term of this Agreement. No modification of this Agreement will be binding, unless
in writing and signed by an authorize depresentative of each party. When the
translation document has the different meaning or has the conflicting views with
Chinese original text conflict, should take the laws and regulations promulgation
unit as well as the Generaldata issue Chinese original text as the standard.
*******************************************************************************
**
Do you accept the above licence agreement (Yes/No, default=No) ?
上述詢問信息詢問是否接受許可協議,同意鍵入“Y”,回車即可,否則直接回車選擇默認“No”
選項,代表不同意接受,直接退出安裝。
Y
*******************************************************************************
**
Welcome to install GBase products
*******************************************************************************
**
Please input the GBase software installation directory (Default:/home/gbase/GBase):
上述詢問信息要求輸入安裝路徑,如果用戶希望使用默認路徑,直接“回車”即可,否則輸
入新的安裝路徑,本文檔選擇默認路徑。
Installing all software packages ...
Software packages installation done.
*******************************************************************************
**
Welcome to create GBase database instance
*******************************************************************************
**
Please input the new database instance name (default: gbase8a):
上述詢問信息要求輸入用戶創建一個gbase 8a?的實例名稱,如果用戶希望使用默認實例名
稱,直接“回車”即可,否則輸入新的實例名稱,本文檔選擇默認實例名稱。
Please input the port number for the new database instance (default:5258):
上述詢問信息要求輸入GBase 8a?實例使用的端口號,如果用戶希望使用默認端口號,直接
“回車”即可,否則輸入新的端口號,本文檔選擇默認端口號(按照1.6?已經檢查過5258
端口沒有被占用)。
GBase is creating the New 'gbase8a' instance ...
create gbase_host.cnf success
The host key file is genarate at GBASE_BASE/config/gbase_host.cnf.
Congratulations. Your GBase installation is successful.
Please refer to the product's manuals to start using GBase product
??用戶看到“create gbase_host.cnf success”提示信息后,說明在“$GBASE_BASE/config”目錄下,成功創建了“gbase_host.cnf”文件。當顯示“Your GBase installation is successful.”時,表示您已成功安裝了GBase 8a?數據庫產品。
5、獲取license文件
??首先,使用gbase?用戶運行如下程序:gbase_gethostkey,本地生成一個32?字符的host?串:
$ gbase_gethostkey
hostkey: 8f1ba214e879c367ea35c17aaf3b8234
??用戶將32?字符的host?串文件發送給數據庫廠商(請將您的hostkey?文件發到license@gbase.cn?中,同時,需要在mail?中附上安裝GBase 8a?產品所使用的操作系統名稱及版本),數據庫廠商最終為用戶提供授權文件(32?字符的license?串),用戶將授文件拷貝到$home/gbase/GBase/config/目錄下。具體如下:$?home/gbase/GBase?/config/gbase.lic?文件中(如果不存在gbase.lic,需要手工建立)。
?
三、啟停與登錄
1、服務器的啟停
??成功安裝GBase 8a?之后,用戶執行以下命令啟停gbase.server?服務,啟動停止gbase.server?服務的操作系統用戶為創建的linux?用戶,本中是gbase?用戶:
??啟動服務:
$ gbase.server start
??停止服務:
$ gbase.server stop
??重啟服務:
$ gbase.server restart
2、登錄和退出
$ gbase -uroot -p
Enter password:
GBase client 8.5.1.2 build 27952. Copyright (c) 2004-2013, GBase. All Rights
Reserved.
gbase> USE gbase;
Query OK, 0 rows affected (Elapsed: 00:00:00.03)
gbase>
3、退出
直接輸入\q?即可退出登錄。
gbase> \q
Bye
四、修改數據庫root用戶的密碼
??安裝GBase 8a?后,系統會自動創建一個默認的數據庫root?用戶,默認密碼為空。為了提高產品的安全性,我們建議用戶登錄GBase 8a?后,立即修改root?的密碼,具體如下:
[gbase@gbase8a ~]$ gbase -uroot
GBase client 8.5.1.2 build 27952. Copyright (c) 2004-2013, GBase. All Rights
Reserved.
gbase> SET PASSWORD FOR root = PASSWORD('gbase8a');
Query OK, 0 rows affected
gbase> \q
修改完畢后,重新登錄。
[gbase@gbase8a ~]$ gbase -uroot -pgbase8a
GBase client 8.5.1.2 build 55129. Copyright (c) 2004-2016, GBase. ?All Rights Reserved.
五、卸載GBase 8a
??當用戶需要卸載GBase 8a?數據庫時,需進入安裝目錄(如:/home/gbase/GBase),鍵入命令:sh ./server/bin/Uninstall_lin.sh。卸載程序開始執行后,將注銷數據庫服務、除安裝目錄、在用戶允許的情況下刪除實例目錄,并自動刪除環境變量。具體過程如下:
# su - gbase
$ cd /home/gbase/GBase/server/bin/
$ sh Uninstall_lin.sh
************************************************************************
*********
Welcome to uninstall GBase products
************************************************************************
*********
Do you want to delete GBase product (Yes/No, default=No) ?
y
The following is the list of installed GBase instances for current user:
/home/gbase/GBase/userdata/gbase8a 5258
Do you want to delete all instances (Yes/No, default=No) ?
y
The uninstallation is successful.
當顯示“The uninstallation is successful.”時,說明卸載成功。
注:強烈建議用戶不要在數據庫安裝目錄下存放私有數據,以免在數據庫卸載過程中造成不必要的損失。
六、升級和回退
1、升級
升級前需要首先停止服務,然后使用gbase?用戶進入GbaseInstall?目錄,執行?“./Install_lin.sh?–U”?升級腳本,具體命令如下:
# cd /home/gbase/setup/GBaseInstall
#./Install_lin.sh -U
注:1)升級后會備份?GBase/server?與GBase/conf?目錄到“~/GBase8a_BackUp_*.tar.bz2”文件中;
???2)升級后,配置文件“~/GBase/config/gbase_8a_gbase8a.cnf”中的參數會被重置為初始值;
???3)若集群從build6.8?以下版本升級到build6.8?以上(包括build6.8)版本,需要重新申請license;
2、回退
??執行GBase 8a?的回退操作前,首先需要停止服務,然后使用tar?命令將備份文件解壓到安裝目錄下。具體如下:
#tar -jxvf ~/GBase8a_BackUp_20150202161530.tar.bz2 -C ~/GBase
七、license文件過期
重新獲取license文件
八、異常情況處理
1、安裝不成功的處理
$rm - rf /gbase
$cd /home/gbase/setup/GbaseInstall
$sh clear.sh
2、卸載不成功的處理
$rm - rf /home/gbase/GBase
總結
- 上一篇: 【Linux 中国】12 款简单好用的保
- 下一篇: SeetaFace编译使用 中科院人脸