1.切换到数据库用户gbasedbt
su - gbasedbt
2.切换到目录/opt/gbase/etc, 执行实例化脚本GBaseInit_gbasedbt.sh:
cd /opt/gbase/etc
sh GBaseInit_gbasedbt.sh
3.实例名称使用默认值gbaseserver:
ENTER THE INSTANCE INFORMATION or PRESS <ENTER> TO ACCEPT THE DEFAULT.ENTER GBASE INSTANCE NAME (GBASEDBTSERVER) [Default:gbaseserver]:
4.目录选择默认值:
SEARCHING FOR GBASE INSTALL FOLDER, PLEASE WAIT FOR SECONDS...
GBASE INSTALL FOLDER LIST:1) /opt/gbase
CHOOSE GBASE INSTALL FOLDER(GBASEDBTDIR) [Default:/opt/gbase]:
5.IP和端口号也都使用默认值:
CHOOSE SERVICE IP ADDRESS FROM THE LIST:1) 192.168.200.1802) 127.0.0.1
ENTER THE NUMBER FOR YOUR CHOICE [Default:192.168.200.180]: SPECIFY THE PORT NUMBER FOR GBASE [Default:9088]:
6. INITIALIZE TYPE选择2) CUSTOM , 定制实例参数:
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
7.字符集选择 2) zh_CN.GB18030-2000:
GBASE CHARACTER SET LIST:1) en_US.8859-12) zh_CN.GB18030-20003) zh_CN.utf8
ENTER THE NUMBER FOR YOUR CHOICE [Default:1]: 2
8.表空间路径配置如下,可以自己定义,也可以直接回车使用默认值
ENTER THE DATA SPACE PATH [Default:/opt/gbase/gbaseserver_dbs]:
9.下面可以设置表空间的大小,因为是测试环境参数设置的比默认值小一些:
ENTER THE LOGICAL LOG DBSPACE SIZE(MB) [Default:4910]: 2000ENTER THE PHYSICAL LOG DBSPACE SIZE(MB) [Default:4910]: 2000ENTER THE SMART LOB DBSPACE SIZE(MB) [Default:1012]: 500ENTER THE TEMPORARY DBSPACE SIZE(MB) [Default:1012]: 500
10.选择"Y"自定义设置表空间
ENTER "Y" TO START DATABASE ADVANCED SETTINGS, OR ENTER "N" TO ACCEPT DEFAULT VALUES: [Default:N]: y
11.配置信息如下:
ENTER THE NUMBER OF DATA DBSPACES [Default:1]: 5ENTER THE NUMBER OF TEMP DBSPACES [Default:1]: 3Enter "Y" TO ENABLE ENVIRONMENT GL_USEGLU, OR ENTER "N" TO DISABLE: [Default:N]: y
12.最后实例配置信息如下,选择"y"进行实例初始化:
INSTANCE SUMMARY:Instance name: gbaseserverGBase install directory: /opt/gbaseIP address & port: 192.168.200.180:9088Character set: zh_CN.GB18030-2000Logical log space size: 2000 MBPhysical log space size: 2000 MBSmart LOB space size: 500 MBTemp DBSpace size: 500 MBData path: /opt/gbase/gbaseserver_dbsData path free size: 48653 MBThe number of data DBSpace: 5The number of temp DBSpace: 3Environment GL_USEGLU: 1Enter "Y" to Start database initializing, or Enter "N" to Edit Again: y
13.实例化记录如下, 完成按下回车结束初始化:
Touching Chunks...OK
Create sqlhosts File: /opt/gbase/etc/sqlhosts.gbaseserver ...OK
Setting Parameters in /opt/gbase/etc/onconfig.gbaseserver :
ROOTPATH.ROOTSIZE.DBSERVERNAME.FULL_DISK_INIT.SBSPACENAME.SYSSBSPACENAME.DBSPACETEMP.LOGFILES.MULTIPROCESSOR.VPCLASS.NETTYPE.CLEANERS.DEF_TABLE_LOCKMODE.DIRECT_IO.LOCKS.TAPEDEV.LTAPEDEV.CKPTINTVL.DS_MAX_QUERIES.DS_TOTAL_MEMORY.DS_NONPDQ_QUERY_MEM.PHYSBUFF.LOGBUFF.AUTO_TUNE.MSGPATH.SERVERNUM.ALLOW_NEWLINE.TEMPTAB_NOLOG.DUMPSHMEM.USEOSTIME.STACKSIZE.ON_RECVRY_THREADS.OFF_RECVRY_THREADS.USELASTCOMMITTED.SHMVIRTSIZE.SHMADD.GBASEDBTCONTIME.BUFFERPOOL2K.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.2.3...OK
Creating data Dbspace.1.2.3.4.5...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...Your evaluation license will expire on 2023-08-21 00:00:00
.Your evaluation license will expire on 2023-08-21 00:00:00
.Your evaluation license will expire on 2023-08-21 00:00:00
.Your evaluation license will expire on 2023-08-21 00:00:00
...OK
Database restarting.......Your evaluation license will expire on 2023-08-21 00:00:00
OK
Creating database: gbasedb...OKNow you can use this URL to connect to gbasedb:
jdbc:gbasedbt-sqli://192.168.200.180:9088/gbasedb:GBASEDBTSERVER=gbaseserver;DB_LOCALE=zh_CN.GB18030-2000;CLIENT_LOCALE=zh_CN.GB18030-2000;NEWCODESET=GB18030,GB18030-2000,5488;GL_USEGLU=1Version:
Your evaluation license will expire on 2023-08-21 00:00:00
On-Line -- Up 00:00:13 -- 674664 Kbytes
Build Number: 3.3.0_N303GBase Initializing Finished!Initialize log file : ./InitGBaseDB_202208211933.log Press <ENTER> to Exit and Logout...
14.切换到gbasedbt,使用命令ps -ef|grep oninit 查看数据库进程显示已经启动