GBase 8s 安裝

dmcatding發表於2022-05-19
1 系統要求
1.1 硬體要求
硬體
最低配置
推薦配置
處理器
1×2 核 2.0GHz
4×4 核 3.0GHz
記憶體
4GB
64GB 或更多
硬碟
100GB
1TB
光碟機
CD-ROM
CD-ROM


1.2 作業系統要求

GBase 8s 產品需要部署於 UOS V20 作業系統,鯤鵬920晶片上,建議以 Software Development Workstation 模式安裝。


2 安裝及配置資料庫伺服器

2.1 安裝準備
1.建立 gbasedbt 組和使用者
在啟動安裝過程之前,必須準備系統以確保您有足夠許可權來執行安裝。
您必須以 root 使用者身份登入才能執行許多與安裝有關的任務。同時要求伺服器作業系統
上具有 gbasedbt 組和 gbasedbt 使用者。
登入系統後可以執行以下命令建立 gbasedbt 組和 gbasedbt 使用者:
[root@localhost ~]# groupadd gbasedbt
[root@localhost ~]# useradd -g gbasedbt gbasedbt
為 gbasedbt 使用者設定密碼,密碼為 gbasedbt:
[root@localhost ~]# passwd gbasedbt


2.建立 GBase 8s 資料庫安裝目錄

GBase 8s 資料庫預設的安裝目錄為 /opt/GBASE/gbase,並且此資料夾必須為空。
[root@localhost ~]# mkdir -p /opt/GBASE/gbase
[root@localhost ~]# chown gbasedbt:gbasedbt /opt/GBASE/gbase


3.上傳並解壓安裝包

將產品安裝光碟插入光碟機,取出光碟中 Setup 目錄下的檔案,複製到本地目錄 /opt。
Setup目錄中包含 GBase 8s 產品的安裝包檔案,該檔案通常是形如
GBase8sV8.8_AEE_3.1.0_1_UOS_KP920.tar 的壓縮檔案。
在本手冊中,以 GBase8sV8.8_AEE_3.1.0_1_UOS_KP920.tar為例進行安裝說明。
解壓該 tar 包,解壓命令為:tar –vxf filename.tar。
[root@localhost ~]# cd /opt
[root@localhost opt]# tar -vxf
GBase8sV8.8_AEE_3.1.0_1_UOS_KP920.tar
ids_install
onsecurity
ids.properties
.gbase.properties


2.2 安裝方法

2.2.1 典型安裝
您可以透過使用典型安裝設定來快速安裝 GBase 8s 及其所有功能部件。
預設情況下,典型安裝設定將建立為您的主機環境配置的即時可用的資料庫伺服器例項。
但是,您可以禁用安裝應用程式中的建立伺服器例項選項。
以 root 身份登入,進入解壓目錄,執行要安裝的產品的安裝指令碼 ids_install,即可進行安
裝,具體命令如下:
[root@localhost /]# cd /opt
[root@localhost opt]# sh ids_install
執行安裝過程中,安裝程式先檢查系統環境,如果系統沒有安裝JDK,那麼安裝包會先解
壓JDK,自動安裝到該系統中。如果已經安裝,那麼將顯示產品的授權條款,並等待確認
是否接受這些版權條款。
具體安裝過程示例如下:
[root@localhost opt]# sh ids_install
Preparing to install...
Extracting the JRE from the installer archive...
Unpacking the JRE...
Extracting the installation resources from the installer archive...
Configuring the installer for this system's environment...
Launching installer...
========================================================================== =====
GBase Software Bundle (created with InstallAnywhere)
-------------------------------------------------------------------------- -----
Preparing CONSOLE Mode Installation...
========================================================================== =====
Getting Started
---------------
This application will guide you through the installation of GBase
Software
Bundle.
Copyright General Data Corporation 2014, 2019. All rights reserved.
1. Release Notes
The Release Notes can be found in /opt/doc/ids_unix_relnotes_12.10.html.
2. Launch Information Center
Access the GBase Information Center at
To Begin Installation, respond to each prompt to proceed to the next step
in
the installation.
If you want to change something on a previous step, type 'back'.
You may cancel this installation at any time by typing 'quit'.
PRESS <ENTER> TO CONTINUE:
=======================================================================
License Agreement
-----------------
Installation and Use of GBase 8s Software Bundle Requires Acceptance of
the Following License Agreement:
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 nontransferable
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. All trademarks and registered trademarks mentioned herein are the
property of their respective owners.
DO YOU ACCEPT THE TERMS OF THIS LICENSE AGREEMENT? (Y/N): Y
輸入”Y”接受授權條款,按Enter鍵繼續。
1. 指定安裝路徑 根據介面提示確認預設安裝路徑 /opt/GBASE/gbase,並回車。
=======================================================================
Installation Location
---------------------
Choose location for software installation
Default Install Folder: /opt/GBASE/gbase

ENTER AN ABSOLUTE PATH, OR PRESS <ENTER> TO ACCEPT THE DEFAULT:


2. 選擇安裝型別
========================================================================== =====
Installation or Distribution
----------------------------
Select the installation type.
Typical: Install the database server with all features and a database
server
that
is configured with default values. Includes:
** Client Software Development Kit (CSDK)
** Java Database Connectivity (JDBC)
Minimum disk space required: 700-800MB
Custom: Install the database server with specific features and software that you need.
Optionally install a configured database server instance.
Minimum disk space required: 75 MB (without a server instance)
->1- Typical installation
2- Custom installation
3- Extract the product files (-DLEGACY option)
4- Create a RPM package for redistribution
ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS <ENTER> TO ACCEPT THE DEFAULT::
1
使用預設安裝選項 1,直接回車,進行典型安裝。
3. 建立例項
系統提示是否建立一個例項,預設選項 1 為建立,直接回車,建立一個例項。
4. 選擇資料庫使用者數
選擇例項預期要支援的資料庫使用者數,預設選項為 1,直接回車繼續。
=======================================================================
Configuration - Number of Users
-------------------------------
Select the number of expected database users.
->1- 1 - 100
2- 101 - 500
3- 501 - 1000
4- 1000+
ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS <ENTER> TO ACCEPT THE DEFAULT::
5. 配置結束,點選回車進行安裝。
=======================================================================
Ready To Install
----------------
InstallAnywhere is now ready to install GBase 8s Software Bundle onto your
system at the following location:
/opt/GBASE/gbase
PRESS <ENTER> TO INSTALL:
=======================================================================
Installing...
=======================================================================
Server Instance Creation
------------------------
Create a server instance?
->1- Yes - create an instance
2- No - do not create an instance
ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS <ENTER> TO ACCEPT THE DEFAULT::
[==================|==================|==================|===============]
[------------------|------------------|------------------|--------------
-]
=======================================================================
Server Initialization
---------------------
The server will now be initialized. Initialization might take quite a
while,
depending on the performance of your computer.
PRESS <ENTER> TO CONTINUE:
安裝後會提示將進行資料庫例項的初始化,按回車繼續。
6. 資料庫例項建立成功並使用,點選回車後繼續。
==========================================================================
=====
Using the new instance
----------------------
A database server instance was created. If you chose to initialize the
instance, it is ready to use.
You can open a command prompt to an initialized instance by running one of
the
following commands at /opt/GBASE/gbase, where ol_gbasedbt1210 is the path
or
filename of the instance.
Windows:
ol_gbasedbt1210.cmd
UNIX csh:
source ol_gbasedbt1210.csh
UNIX ksh or bourne:
./ol_gbasedbt1210.ksh
If initialization fails, check the online.log file for messages. The
instance's
root chunk must be owned by the correct user and group, and it must have
readable and writable (rw) permission bits set only for owner and group.
PRESS <ENTER> TO CONTINUE:
7. 安裝完成,回車後退出安裝程式。
==========================================================================
=====
Installation Complete
---------------------
Congratulations! GBase Software Bundle installation is complete.
Product install status:
GBase: Successful
GBase Connect: Successful
Main Version: GBase 8s V8.7
For more information about using GBase products, see the GBase Information
Center at
PRESS <ENTER> TO EXIT THE INSTALLER:
8. 配置環境變數
在使用 GBase 8s 資料庫服務前需要設定幾個環境變數。可以把安裝目錄下的
ol_gbasedbt1210.ksh 檔案的內容追加到 gbasedbt 使用者主目錄下的 .bash_profile檔案中,以
便於 gbasedbt 使用者在登入後即自動應用這些環境變數。
如果要把 GBase 8s 安裝目錄下的 ol_gbasedbt1210.ksh 檔案的內容追加到 gbasedbt 使用者
主目錄下的 .bash_profile 檔案中,可以執行以下命令:
[root@localhost ~]# cd /opt/GBASE/gbase
[root@localhost gbase]# cat ol_gbasedbt1210.ksh >>
/home/gbasedbt/.bash_profile
[root@localhost ~]# cd /home/gbasedbt/
[root@localhost ~]# source .bash_profile

配置完畢後,即可使用 GBase 8s 資料庫。


2.2.2 定製安裝
定製安裝,也就是通常說的自定義安裝。
使用定製安裝可在安裝 GBase 8s 時只帶有您所需的功能部件。
2.2.2.1 執行安裝
進入解壓目錄,執行安裝指令碼 ids_install,即可進行安裝。具體命令如下:
[root@localhost ~]# cd /opt
[root@localhost opt]# sh ids_install
定製安裝過程如下所示:
1.接受授權協議,內容詳見 2.1.1 典型安裝。
2.選擇安裝型別,輸入 2 選擇 Custom installation。
==========================================================================
=====
Installation or Distribution
----------------------------
Select the installation type.
Typical: Install the database server with all features and a database
server
that
is configured with default values. Includes:
** Client Software Development Kit (CSDK)
** Java Database Connectivity (JDBC)
Minimum disk space required: 700-800MB
Custom: Install the database server with specific features and software
that
you need.
Optionally install a configured database server instance.
Minimum disk space required: 75 MB (without a server instance)
->1- Typical installation
2- Custom installation
3- Extract the product files (-DLEGACY option)
4- Create a RPM package for redistribution
ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS <ENTER> TO ACCEPT THE DEFAULT::
2
下面所有選項,一律<回車>
==========================================================================
=====
"Choose Install Features" Help
------------------------------
On the next screen, type the number of a feature to change whether it is
selected or deselected. You can provide a list of numbers, separated by
commas,
with no leading or trailing spaces.
For example, assume that the screen contains this list:
1- [X] ABC
2- [ ] XYZ
Please choose the Features to be installed by this installer.: ___
If you want to install both ABC and XYZ, type: 2
If you want to install only XYZ, type: 1,2
PRESS <ENTER> TO CONTINUE:
========================================================================== =====
========================================================================== =====
Choose Install Set
------------------
========================================================================== =====
Choose Product Features
-----------------------
ENTER A COMMA_SEPARATED LIST OF NUMBERS REPRESENTING THE FEATURES YOU
WOULD
LIKE TO SELECT, OR DESELECT. TO VIEW A FEATURE'S DESCRIPTION, ENTER
'?<NUMBER>'. PRESS <RETURN> WHEN YOU ARE DONE:
1- [X] GBase database server
2-
|-[X] Base Server

3-
|-[X] Extensions and tools

4-
|-[X] J/Foundation

5-
|-[X] Database extensions

6-
|-[X] Conversion and reversion support

7-
|-[X] XML publishing

8-
|-[X] Demonstration database scripts

9-
|-[X] Enterprise Replication

10-
|-[X] Data loading utilities

11-
|-[X] onunload and onload utilities

12-
|-[X] dbload utility

13-
|-[X] Backup and Restore

14-
|-[X] archecker utility

15-
|-[X] ON-Bar utility

16-
|-[X] Interface to Tivoli Storage Manager

17-
|-[X] Administrative utilities

18-
|-[X] Performance monitoring utilities

19-
|-[X] Miscellaneous monitoring utilities

20-
|-[X] Auditing utilities

21-
|-[X] Database import and export utilities

22-
|-[X] JSON Client Support

23- [X] Global Language Support (GLS)


24-
|-[X] Chinese

Please choose the Features to be installed by this installer.:
==========================================================================
=====
Feature review
--------------
Would you like to review the features that you have selected, or change
which
features you have selected?
->1- Continue
2- Return to feature tree
ENTER THE NUMBER OF THE DESIRED CHOICE, OR PRESS <ENTER> TO ACCEPT THE
DEFAULT:
==========================================================================
=====
Get Role Separation choice
--------------------------
Enable role separation for auditing procedures.
If you enable role separation, you can assign existing groups of users to
specific roles.
If you do not enable role separation, the database server administrator
performs all administration tasks.
1- Enable role separation
->2- Do not enable role separation
ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS <ENTER> TO ACCEPT THE DEFAULT::
==========================================================================
=====
Server Instance
---------------
Type 'back' to go to the previous step or 'quit' to cancel the
installation.
Create a database server instance?
1- Yes - create a server instance
->2- No - do not create a server instance
ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS <ENTER> TO ACCEPT THE DEFAULT::
========================================================================== =====
Installation Summary
--------------------
Please review the following before continuing:
Product Name:
GBase Software Bundle
Install Folder:
/opt/GBASE/gbase
Product Features:
GBase database server,
Base Server,
Extensions and tools,
J/Foundation,
Database extensions,
Conversion and reversion support,
XML publishing,
Demonstration database scripts,
Enterprise Replication,
Data loading utilities,
onunload and onload utilities,
dbload utility,
Backup and Restore,
archecker utility,
ON-Bar utility,
Interface to Tivoli Storage Manager,
Administrative utilities,
Performance monitoring utilities,
Miscellaneous monitoring utilities,
Auditing utilities,
Database import and export utilities,
JSON Client Support,
Global Language Support (GLS),
Chinese
Disk Space Information (for Installation Target):
Required: 497,274,517 Bytes
Available: 9,861,873,664 Bytes
PRESS <ENTER> TO CONTINUE:

========================================================================== =====
Ready To Install
----------------
InstallAnywhere is now ready to install GBase Software Bundle onto your
system
at the following location:
/opt/GBASE/gbase
PRESS <ENTER> TO INSTALL:
========================================================================== =====
Installing...
-------------
[==================|==================|==================|================ ==]
[------------------|------------------|------------------|--------------- ---]
========================================================================== =====
Installation Complete
---------------------
Congratulations! GBase Software Bundle installation is complete.
Product install status:
GBase: Successful
GBase Connect: Successful
Main Version: GBase 8s V8.7
For more information about using GBase products, see the GBase Information
Center at
PRESS <ENTER> TO EXIT THE INSTALLER:


2.2.2.2 使用指令碼自動建立和初始化例項
安裝完成後,解壓如下檔案獲得指令碼:
將 GBseInit_gbasedbt.sh 指令碼複製到 opt/GBASE/gbase 目錄下。更改此指令碼的執行權
限:
[root@localhost ~]# cd /opt/GBASE/gbase
[root@localhost gbase]# chown -R gbasedbt:gbasedbt GBaseInit_gbasedbt.sh
[root@localhost gbase]# ls -l GBaseInit_gbasedbt.sh
-rw-r--r--. 1 gbasedbt gbasedbt 32705 Jan 15 10:10 GBaseInit_gbasedbt.sh
使用 gbasedbt 使用者執行該指令碼。使用 GBseInit_gbasedbt.sh 指令碼,自動建立並初始化實 例。
[root@localhost gbase]# su - gbasedbt
[gbasedbt@localhost gbase]$ sh GBaseInit_gbasedbt.sh
Initializing Program...OK
ENTER THE INSTANCE INFORMATION or PRESS <ENTER> TO ACCEPT THE DEFAULT.
// 建立例項名稱,預設為 gbaseserver
ENTER GBASE INSTANCE NAME (GBASEDBTSERVER) [Default:gbaseserver]:
//選擇安裝目錄。預設為 /opt/GBASE/gbase
GBASE INSTALL FOLDER LIST:
1) /opt/GBASE/gbase
CHOOSE GBASE INSTALL FOLDER(GBASEDBTDIR) [Default:/opt/GBASE/gbase]:
//選擇本機 IP 地址
CHOOSE SERVICE IP ADDRESS FROM THE LIST:
1) 192.168.127.101
2) 127.0.0.1
ENTER THE NUMBER FOR YOUR CHOICE [Default:192.168.127.101]:
//指定資料庫的監聽埠,預設為 9088
SPECIFY THE PORT NUMBER FOR GBASE [Default:9088]:
//選擇安裝方式: 2 定製安裝
INITIALIZE TYPE:
1) TYPICAL -- Initialize the instance with all features configured with
default values.
2) CUSTOM -- Initialize the instance with specific features that you
need.
ENTER THE NUMBER FOR YOUR CHOICE [Default:1]: 2
//選擇資料庫字符集
GBASE CHARACTER SET LIST:
1) en_US.8859-1
2) zh_CN.GB18030-2000
GBaseInit_gbasedbt.rar

3) zh_CN.utf8
ENTER THE NUMBER FOR YOUR CHOICE [Default:1]: 2
//輸入資料庫空間儲存路徑
ENTER THE DATA SPACE PATH [Default:/opt/GBASE/gbase/gbaseserver_dbs]:
//設定邏輯日誌空間大小
ENTER THE LOGICAL LOG DBSPACE SIZE(MB) [Default:540]:
//設定物理日誌空間大小
ENTER THE PHYSICAL LOG DBSPACE SIZE(MB) [Default:540]:
//設定智慧大物件空間大小
ENTER THE SMART LOB DBSPACE SIZE(MB) [Default:138]:
//設定臨時資料空間大小
ENTER THE TEMPORARY DBSPACE SIZE(MB) [Default:138]:
// 輸入 Y 啟動以上設定,N 重新進行配置
ENTER "Y" TO START DATABASE ADVANCED SETTINGS, OR ENTER "N" TO ACCEPT
DEFAULT VALUES: [Default:Y]: Y
ENTER THE NUMBER OF DATA DBSPACES [Default:1]:
ENTER THE NUMBER OF TEMP DBSPACES [Default:1]:
//例項配置如下所示:
INSTANCE SUMMARY:
Instance name: gbaseserver
GBase install directory: /opt/GBASE/gbase
IP address & port: 192.168.127.101:9088
Character set: zh_CN.GB18030-2000
Logical log space size: 430 MB
Physical log space size: 430 MB
Smart LOB space size: 116 MB
Temp DBSpace size: 116 MB
Data path: /opt/GBASE/gbase/gbaseserver_dbs
Data path free size: 4292 MB
The number of data DBSpace: 1
The number of temp DBSpace: 1
Environment GL_USEGLU: 1
Enter "Y" to Start database initializing, or Enter "N" to Edit Again:
Enter "Y" to Start database initializing, or Enter "N" to Edit Again: Y
Touching Chunks...OK
Create sqlhosts File: /opt/GBASE/gbase/etc/sqlhosts.gbaseserver ...OK
Setting Parameters in /opt/GBASE/gbase/etc/onconfig.gbaseserver :
ROOTPATH.ROOTSIZE.DBSERVERNAME.FULL_DISK_INIT.SBSPACENAME.SYSSBSPACENAME.D BSPACETEMP.LOGFILES.MULTIPROCESSOR.VPCLASS.NETTYPE.CLEANERS.DEF_TABLE_LOCK MODE.DIRECT_IO.LOCKS.TAPEDEV.LTAPEDEV.CKPTINTVL.DS_MAX_QUERIES.DS_TOTAL_ME MORY.DS_NONPDQ_QUERY_MEM.PHYSBUFF.LOGBUFF.AUTO_TUNE.MSGPATH.SERVERNUM.ALLO W_NEWLINE.TEMPTAB_NOLOG.DUMPSHMEM.USEOSTIME.STACKSIZE.ON_RECVRY_THREADS.OF F_RECVRY_THREADS.USELASTCOMMITTED.SHMVIRTSIZE.SHMADD.GBASEDBTCONTIME.BUFFE RPOOL2K.BUFFERPOOL16K...AUTO_CKPTS.OK
Initializing Root DBSpace & Share Memory...OK
Creating system database.......OK
Creating logical log Dbspace...OK
Creating physical log Dbspace...OK
Creating smart LOB Dbspace...OK
Creating temp Dbspace.1...OK
Creating data Dbspace.1...OK
Setting dbscheduler...OK
Moving physical log...OK
Adding 40 logical logs:
1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.21.22.23.24.25.26.27.28
.29.30.31.32.33.34.35.36.37.38.39.40...OK
Setting data chunks extendable...OK
Cleaning logical logs in rootdbs.........OK
Database restarting.......OK
Creating database: gbasedb...OK
Now you can use this URL to connect to gbasedb:
jdbc:gbasedbtsqli://192.168.8.123:9088/gbasedb:GBASEDBTSERVER=gbaseserver;
Version:
GBase Database Server Version 12.10.FC4G1AEE -- On-Line -- Up 00:00:13 --
1121592 Kbytes
Build Number: 2.0.1A2_N303
GBase Initializing Finished!
Initialize log file : ./InitGBaseDB_201901081452.log
Press <ENTER> to Exit and Logout...
自動建立和初始化例項完畢,回車退出。
2.2.2.3 手動建立和初始化例項
您也可以按照如下步驟,手動建立例項並初始化。
(1)建立一個例項,假設其例項名為“gbaseserver”。
(2)建立一個例項需要配置以下三個檔案,使用用例項名作為檔案的字尾:
a) 環境變數檔名為 profile.gbaseserver
b) 配置引數檔名稱為 onconfig.gbaseserver
c) sqlhosts 配置檔名稱為 sqlhosts.gbaseserver


具體步驟如下:

1 建立資料庫的資料檔案儲存目錄 /dbs
以 root 身份登入,進入安裝目錄,建立資料目錄:
[root@localhost ~]# cd /opt/GBASE/gbase
[root@localhost gbase]# mkdir dbs
[root@localhost gbase]# cd dbs
[root@localhost dbs]# touch rootdbs
[root@localhost dbs]# chown gbasedbt:gbasedbt rootdbs
[root@localhost dbs]# chmod 660 rootdbs


2 配置 profile.gbaseserver 環境變數檔案

切換到 gbasedbt 使用者身份登入,將預設環境變數 .bash_profile 檔案複製一份,命名為
profile.gbaseserver,並對它進行編輯。
[root@localhost dbs]# su gbasedbt
[gbasedbt@localhost ~]$ cd /home/gbasedbt
[gbasedbt@localhost ~]$ cp .bash_profile profile.gbaseserver
[gbasedbt@localhost ~]$ vi profile.gbaseserver
(進入檔案後按“i”建,開啟 insert 模式)
注意:根據例項的實際情況更改紅色部分欄位資訊
export GBASEDBTSERVER= gbaseserver //例項名
export GBASEDBTDIR= /opt/GBASE/gbase //安裝路徑
export > onconfig.gbaseserver //配置引數檔名稱
export GBASEDBTSQLHOSTS=$GBASEDBTDIR/etc/ sqlhosts.gbaseserver //sqlhosts 檔名稱
export PATH=$GBASEDBTDIR/bin:/usr/bin:${PATH}:.
export GL_DATE="%iY-%m-%d"
export DATETIME="%iY-%m-%d %H:%M:%S"
export DB_LOCALE=zh_cn.GB18030-2000
export CLIENT_LOCALE=zh_cn.GB18030-2000
export
LD_LIBRARY_PATH=${GBASEDBTDIR}/lib:${GBASEDBTDIR}/lib/esql:${GBASEDBTDIR}/lib/cli
export TERM=vt100
export TERMCAP=$GBASEDBTDIR/etc/termcap
export GBASEDBTTERM=termcap
export DBTEMP=$GBASEDBTDIR/tmp
完成之後儲存退出。(第一步按 ESC ;第二步 輸入冒號“:”;第三步輸入 wq 代表保
存退出,q 代表退出,q! 代表強制退出。最後回車)。

[gbasedbt@localhost ~]$ source profile.gbaseserver
為了 gbasedbt 使用者在登入後自動應用這些環境變數,請執行以下操作:
vi .bash_profile 檔案,此檔案後新增以下內容。
source /home/gbasedbt/profile.gbaseserver
然後執行以下命令,使環境變數生效:
[gbasedbt@localhost ~]$ source .bash_profile


3 配置 onconfig.gbaseserver 引數檔案

將 /opt/BASE/gbase/etc/ 目錄中的 onconfig.std 文件複製一份,命名為 $ONCONFIG 變
量指定的名稱 onconfig.gbaseserver。
[gbasedbt@localhost ~]$ cd /opt/GBASE/gbase/etc/
[gbasedbt@localhost etc]$ cp onconfig.std onconfig.gbaseserver
vi onconfig.gbaseserver 檔案,配置以下引數並儲存:
提示:vi 編輯器中模糊查詢字串“XXX”方法:輸入”/XXX”後回車即可向下檢索到該字串位 置。
ROOTPATH /opt/GBASE/gbase/dbs/rootdbs //系統資料庫檔案儲存空間路徑,參照步驟 1 中 的設定
SERVERNUM 1
//例項編號,多例項中每個例項編號要唯一
DBSERVERNAME gbaseserver
TAPEDEV /dev/null
LTAPEDEV /dev/null
//資料庫伺服器例項名稱
//用於儲存空間備份的磁帶裝置
//用於邏輯日誌備份的磁帶的裝置路徑


4 配置 sqlhosts.gbaseserver 檔案

GBase 8s 資料庫使用的監聽埠預設為 9088,多例項中每個例項的埠必須唯一。
將 /opt/GBASE/gbase/etc/ 目錄中的 sqlhosts.std 文件複製一份,命名為 GBASEDBTDQLHOSTS 變數指定的名稱 sqlhost.gbaseserver。
[gbasedbt@localhost ~]$cd /opt/GBASE/gbase/etc/
[gbasedbt@localhost etc]$ cp sqlhosts.std sqlhosts.gbaseserver
vi sqlhosts.gbaseserver 檔案,在檔案末尾新增相關例項名、網路連線方式、IP 及端 口號。
[gbasedbt@localhost etc]$ vi sqlhosts.gbaseserver
在檔案末尾按照如下格式新增內容並儲存:
例項名 網路連線方式 IP 埠
gbaseserver onsoctcp 192.168.127.101 9088

(IP 地址是 當前虛擬機器中 IP ,可使用 ifconfig 命令檢視)


5 初始化資料庫
使用 gbasedbt 使用者執行初始化命令:

[gbasedbt@localhost ~]$ oninit -ivy


2.2.3 靜默安裝
準備響應檔案
要執行靜默安裝(又稱為無人管理的安裝),請使用響應檔案,其中包含關於想要如何進
行該產品安裝的資訊。
要完成包含先前安裝配置的靜默安裝,必須有響應檔案,其帶有想要如何安裝該產品的定
制設定。下列過程概述建立響應檔案的兩種不同方式:記錄您安裝的配置,或定製
bundle.properties 模板檔案。該安裝介質包含基於文字的 bundle.properties 檔案,
可將其用作建立響應檔案的模板。
如果知道自己已有有效的響應檔案,則請從下列過程中的步驟 3 開始。
1. 透過下列步驟之一來建立響應檔案:
l 執行 GBase 8s 安裝指令碼,錄製模板生成響應檔案。
[root@localhost opt] ./ids_install -r /opt/bundle.properties
安裝完成後,將在 /opt 路徑下生成響應檔案 bundle.properties。
l 建立安裝介質上的 bundle.properties 檔案的副本,併為想要的安裝配置編輯該
檔案。
重要:請不要對安裝介質中傳送的 bundle.properties 檔案進行重寫、移動或刪
除。必須將定製的 .properties 檔案中的產品許可證條款協議設定更改為“true”
(-DLICENSE_ACCEPTED=TRUE),以便在靜默安裝期間作為響應檔案。
2. 將響應檔案複製至想要安裝 GBase 8s 和任何打包的客戶機程式的計算機。
3. 執行靜默安裝命令,指示響應檔案的相對或絕對路徑:
[root@localhost opt] ./ids_install -i silent -f /opt/bundle.properties - DLICENSE_ACCEPTED=TRUE
(DLICENSE_ACCEPTED 引數指示接受許可協議)

4. 在想要部署同一安裝設定的每一位置上,重複步驟 2 和 3。
5. 配置資料庫伺服器。
安裝完成後,需要設定環境變數、配置引數和連線檔案資訊,才能使用資料庫服務
器。
可參閱 2.1.2.2 2.1.2.3 章節的內容進行配置。
3 使用 GBase 8s 資料庫
3.1.1 啟動/停止資料庫服務
通常情況下,使用 gbasedbt 使用者來啟動和停止資料庫服務。
成功安裝資料庫 GBase 8s 後,資料庫會自動處於啟動狀態,可透過以下命令檢查服務進
程是否存在:
[root@localhost opt]# ps -ef|grep oninit
gbasedbt 10830 1 0 19:52 ? 00:00:04 /opt/GBASE/gbase/bin/oninit -vy
root 10831 10830 0 19:52 ? 00:00:00 /opt/GBASE/gbase/bin/oninit -vy
root 10832 10831 0 19:52 ? 00:00:00 /opt/GBASE/gbase/bin/oninit -vy
root 10833 10831 0 19:52 ?
root 10834 10831 0 19:52 ?
root 10835 10831 0 19:52 ?
root 10836 10831 0 19:52 ?
root 10837 10831 0 19:52 ?
root 10915 10831 0 19:52 ?
00:00:00 /opt/GBASE/gbase/bin/oninit -vy
00:00:00 /opt/GBASE/gbase/bin/oninit -vy
00:00:00 /opt/GBASE/gbase/bin/oninit -vy
00:00:00 /opt/GBASE/gbase/bin/oninit -vy
00:00:00 /opt/GBASE/gbase/bin/oninit -vy
00:00:00 /opt/GBASE/gbase/bin/oninit -vy
root 11997 5051 0 20:02 pts/0 00:00:00 grep oninit
以 gbasedbt 使用者身份登入後,輸入 onmode –ky,可停止資料庫服務,示例如下:
[gbasedbt@localhost ~]$ onmode -ky
輸入 oninit –vy,啟動資料庫服務,示例如下:
[gbasedbt@localhost ~]$ oninit -vy
Warning: Parameter's user-configured value was adjusted. (DS_MAX_SCANS)
Warning: Parameter's user-configured value was adjusted. (ONLIDX_MAXMEM)
Reading configuration file
'/opt/GBASE/gbase/etc/onconfig.ol_gbasedbt1210'...succeeded
Creating /GBASEDBTTMP/.infxdirs...succeeded
Allocating and attaching to shared memory...succeeded
Creating resident pool 8310 kbytes...succeeded
Creating infos file
"/opt/GBASE/gbase/etc/.infos.ol_gbasedbt1210"...succeeded
Linking conf file "/opt/GBASE/gbase/etc/.conf.ol_gbasedbt1210"...succeeded
Initializing rhead structure...rhlock_t 16384 (512K)... rlock_t (5312K)...
Writing to infos file...succeeded
Initialization of Encryption...succeeded
Initializing ASF...succeeded
Initializing Dictionary Cache and SPL Routine Cache...succeeded
Bringing up ADM VP...succeeded
Creating VP classes...succeeded
Forking main_loop thread...succeeded
Initializing DR structures...succeeded
Forking 1 'soctcp' listener threads...succeeded
Forking 1 'soctcp' listener threads...succeeded
Forking 1 'soctcp' listener threads...succeeded
Starting tracing...succeeded
Initializing 2 flushers...succeeded
Initializing SDS Server network connections...succeeded
Initializing log/checkpoint information...succeeded
Initializing dbspaces...succeeded
Opening primary chunks...succeeded
Validating chunks...succeeded
Initialize Async Log Flusher...succeeded
Starting B-tree Scanner...succeeded
Init ReadAhead Daemon...succeeded
Init DB Util Daemon...succeeded
Initializing DBSPACETEMP list...succeeded
Init Auto Tuning Daemon...succeeded
Checking database partition index...succeeded
Initializing dataskip structure...succeeded
Checking for temporary tables to drop...succeeded
Updating Global Row Counter...succeeded
Forking onmode_mon thread...succeeded
Creating periodic thread...succeeded
Creating periodic thread...succeeded
Starting scheduling system...succeeded
Verbose output complete: mode = 5

輸入 ps -ef|grep oninit 檢查資料庫服務程式是否存在:


[gbasedbt@localhost ~]$ ps -ef|grep oninit
gbasedbt 12056 1 0 20:14 ? 00:00:00 oninit -vy
root 12057 12056 0 20:14 ? 00:00:00 oninit -vy
root 12058 12057 0 20:14 ? 00:00:00 oninit -vy
root 12059 12057 0 20:14 ? 00:00:00 oninit -vy
root 12060 12057 0 20:14 ? 00:00:00 oninit -vy
root 12061 12057 0 20:14 ? 00:00:00 oninit -vy
root 12062 12057 0 20:14 ? 00:00:00 oninit -vy
root 12063 12057 0 20:14 ? 00:00:00 oninit -vy
root 12064 12057 0 20:14 ? 00:00:00 oninit -vy

gbasedbt 12134 12116 0 20:25 pts/0 00:00:00 grep oninit


3.1.2 登入資料庫
以 gbasedbt 使用者身份登入,輸入 dbaccess - - 命令進入資料庫命令列模式,示例如下:
[gbasedbt@localhost ~]$ dbaccess – -
>
3.1.3 建立資料庫
在 dbaccess 互動命令列中,執行如下SQL語句,建立資料庫,示例如下:
[gbasedbt@localhost~]$ dbaccess - -
> create database gbase8s;

Database created.


4 解除安裝 GBase 8s
當使用者需要解除安裝 GBase 8s 資料庫系統時,需要先停止資料庫服務,切換到 root 使用者,
進入安裝目錄下的 uninstall/uninstall_ids,執行該目錄下的 uninstallids 命令進行解除安裝。
解除安裝程式開始後,選擇 2 並回車,刪除所有相關聯的資料庫檔案,示例如下:
[root@localhost ~]# cd /opt/GBASE/gbase/uninstall/uninstall_ids
[root@localhost uninstall_ids]# ./uninstallids
========================================================================== =====
GBase Software Bundle (created with
InstallAnywhere)
-------------------------------------------------------------------------- -----
Preparing CONSOLE Mode Uninstallation...
========================================================================== =====
Uninstall GBase Software Bundle
-------------------------------
About to uninstall GBase Software Bundle.
In this uninstall process, all GBase Software Bundle products in
/opt/GBASE/gbase will be uninstalled.
It is recommended that you first shutdown all database server instances
related
to this installation prior to uninstalling the product.
PRESS <ENTER> TO CONTINUE:
========================================================================== =====
Server Uninstall Options
------------------------
Server action:
Important: Choosing to remove all databases will remove all database
chunks,
environment files, registry entries, and message log files for all
database
server instances associated with this installation.
->1- Retains all databases, but removes all server binaries
2- Removes server binaries and all databases associated with them
ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS <ENTER> TO ACCEPT THE DEFAULT::
2
========================================================================== =====
Uninstalling...
---------------
...*
*
************************* *************************
************************* ************************
...*
*
************************* *************************
************************* ************************
...*
*
************************* *************************
************************* ************************
...*
*
************************* *************************
************************* ************************
...*
*
************************* *************************
************************* ************************
...*
*
************************* *************************
************************* *************************
==========================================================================
=====
Uninstall Complete
------------------
Uninstall is complete for GBase Software Bundle.
Product uninstall status:
GBase: Successful


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30327022/viewspace-2895534/,如需轉載,請註明出處,否則將追究法律責任。

相關文章