[GBase 8s 教程]Linux上安装GBase 8s 数据库

版本获取

获取GBase 8s软件版本,请通过官方网站http://www.gbase.cn申请,或者通过销售/客户经理获取,或者通过发送邮件至dbt@gbasedbt.com申请。获取的Linux安装包的名称一般为 GBase8sV8.7_TL_2.0.1A2_2_RHEL6_x86_64.tar。
其中:

V8.7为主版本号
TL表示该版本为时间限制版,对应的是高级企业版AEE
2.0.1A2_2为实际发行版本
RHEL6_x86_64表示该版本在基于x86_64架构的RHEL6上编译,适用于x86_64架构下的Linux。

获取自动化安装脚本,通过地址https://gbasedbt.com/dl/AutoInit_GBase8s/latest/下载最新版本。获取的包的名称一般为AutoInit_GBase8s_v1.3.8.tar
其中:

v1.3.8为版本号,适用于Linux

本章节以CentOS 7.6(最化小安装)为例。
需要安装unzip、net-tools,可能需要额外安装jdk。

软件安装

将软件版本及自动化安装脚本放置在同一个目录下,解压自动化脚本包。

[root@localhost GBase]# ll
total 309260
-rwxr-xr-x. 1 root root     14130 Apr 22 03:58 AutoInit_GBase8s.sh
-rw-r--r--. 1 root root     20480 Apr 26 23:08 AutoInit_GBase8s_v1.3.8.tar
-rwxr-xr-x. 1 root root       921 Apr 22 03:38 CleanAll.sh
-rw-r--r--. 1 root root 316641280 Apr 26 23:08 GBase8sV8.7_AEE_2.0.1A2_2_RHEL6_x86_64.tar

执行bash AutoInit_GBase8s.sh开始数据库软件安装及实例初始化。

[root@localhost GBase]# bash AutoInit_GBase8s.sh
[2020-04-26 23:13:42] ifconfig check passed.
[2020-04-26 23:13:42] unzip check passed.
[2020-04-26 23:13:42] tar check passed.
[2020-04-26 23:13:42] timeout check passed.
[2020-04-26 23:13:42] IPADDR: 192.168.80.78
[2020-04-26 23:13:42] Datadir: /data/gbase
[2020-04-26 23:13:42] Creating group [gbasedbt] and user [gbasedbt] with HOME [/home/gbase].
[2020-04-26 23:13:42] Unziping [GBase8sV8.7_AEE_2.0.1A2_2_RHEL6_x86_64.tar].
[2020-04-26 23:13:42] Check path INSTALL_DIR(/opt/gbase) security.
[2020-04-26 23:13:42] Execute software install, this will take a moment.
[2020-04-26 23:14:52] Building ~gbasedbt/.bash_profile .
[2020-04-26 23:14:52] Building /opt/gbase/etc/sqlhosts .
[2020-04-26 23:14:52] Building /opt/gbase/etc/onconfig.gbase01 .
[2020-04-26 23:14:52] Creating DATADIR: /data/gbase .
[2020-04-26 23:14:52] Start run database init: oninit -ivy
...... 中间省略掉一些安装过程日志信息 ......
[2020-04-26 23:17:23] Create database testdb.
[2020-04-26 23:17:24] Finish.

安装完毕后,系统将自动创建GBase 8s数据库超级用户gbasedbt,默认密码是GBase123 (注意,数据库用户的密码需符合复杂密码规则,即:不小于8位,包含大小写字母及数字)
这时切换到gbasedbt用户,执行onstat -g ntt检查网络监听,通过dbaccess testdb - 能进行交互模式,说明安装成功:

[root@localhost GBase]# su - gbasedbt
Last login: Sun Apr 26 23:17:23 EDT 2020 on pts/0
[gbasedbt@localhost ~]$ onstat -g ntt

GBase Database Server Version 12.10.FC4G1AEE -- On-Line -- Up 00:08:34 -- 768264 Kbytes

global network information:
  #netscb connects         read        write    q-free  q-limits  q-exceed alloc/max
   2/   3        2           18           18    1/   1  240/  10    0/   0    1/   1

Individual thread network information (times):
          netscb thread name    sid     open     read    write address
        4de5d6f0 soctcplst        3 23:17:18 23:24:49          192.168.80.78|9088|soctcp
        47e3ebe0 soctcppoll       2 23:17:23

[gbasedbt@localhost ~]$ dbaccess testdb -

Database selected.

> 
自动化安装后的一些默认参数为:
初始参数默认参数值JDBC连接需要说明
软件安装目录/opt/gbase可通过参数更改 -i
数据库空间目录/data/gbase可通过参数更改 -d
用户HOME目录/opt/gbase可通过参数更改 -p
gbasedbt用户密码GBase123
数据库服务名称gbase01对应DS中的 实例名,$GBASEDBTSERVER
数据库字符集zh_CN.utf8可通过参数更改 -l,对应DS中的DB_LOCALE/CLIENT_LOCALE
DATABASE名称testdb对应DS中的 数据库/模式
IP地址可用的第一个IP对应DS中的 主机
端口号9088对应DS中的 端口号

注:
1, GBase 8s不加入随系统自动启动、关闭,如需要配置该功能,参考:https://gbasedbt.com/index.php/archives/161/
2,GBase 8s数据库库安装常见问题,可参考:https://gbasedbt.com/index.php/archives/190/
3,自动化初始脚本的更多详细信息,参考包同目录的word文档。

使用GBase DataStudio连接数据库

GBase DataStudio可从以下共享连接下载

链接:https://pan.baidu.com/s/1FGxluNvKp-8Qwbs0iSxHIg
提取码:nsnh

Windows下的版本,解压后,运行GBaseDataStudio\GBaseDataStudio.exe即可
创建新连接,选择GBase8s
创建新的GBase 8s数据库连接
指定相应的参数,默认的参数如上面的列表
常规配置界面
测试连接
测试连接
注:如果测试连接不通过,需要检查一下数据库所在服务器的防火墙,是否有放通端口(默认使用的 9088)
完成新建连接
可修改连接名称,完成新建连接。
设定连接名称,完成创建连接

  • 3
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值