GBase 8s数据库如何配置单机多实例

1.现在机器上安装数据库并初始化一个实例(以gbase01为例)
2.配置环境变量
[gbasedbt@localhost ~]$ cp .bash_profile gbase02_profile
[gbasedbt@localhost ~]$ vim gbase02_profile (修改GBASEDBTSERVER为gbase02,与gbase01区分)
3. 配置onconfig文件
[gbasedbt@localhost ~] c d / o p t / g b a s e 8 s a 2 2 / e t c [ g b a s e d b t @ l o c a l h o s t e t c ] cd /opt/gbase8s_a2_2/etc [gbasedbt@localhost etc] cd/opt/gbase8sa22/etc[gbasedbt@localhostetc] cp onconfig.gbase01 onconfig.gbase02
[gbasedbt@localhost etc]$ vim onconfig.gbase02
修改参数:
ROOTPATH /data/gbase02/rootchk
PHYSFILE 50000
SERVERNUM 1
DBSERVERNAME gbase02
4. 创建gbase02的rootchk
[gbasedbt@localhost data]$ su - root
密码:
上一次登录:四 4月 14 17:32:43 CST 2022pts/0 上
[root@localhost ~]# cd /data
[root@localhost data]# mkdir gbase02
[root@localhost data]# chown gbasedbt:gbasedbt gbase02
[root@localhost data]# su - gbasedbt
上一次登录:四 4月 14 17:33:26 CST 2022pts/0 上
[gbasedbt@localhost ~]$ cd /data
[gbasedbt@localhost data]$ cd gbase02
[gbasedbt@localhost gbase02]$ touch rootchk
[gbasedbt@localhost gbase02]$ chmod 660 rootchk
[gbasedbt@localhost gbase02]$ ll
总用量 0
-rw-rw----. 1 gbasedbt gbasedbt 0 4月 14 17:51 rootchk
5. 配置sqlhosts文件(追加gbase02监听)
[gbasedbt@localhost etc]$ vim sqlhosts(两个实例的端口号要不一致)
gbase02 onsoctcp 0.0.0.0 9058
gbase01 onsoctcp 172.16.33.199 9088
6. 使环境变量生效
[gbasedbt@localhost ~]$ source gbase02_profile
7. 初始化实例
[gbasedbt@localhost ~]$ oninit –ivy
[gbasedbt@localhost ~]$ onstat -
Your evaluation license will expire on 2023-04-14 00:00:00
On-Line – Up 00:03:31 – 640264 Kbytes
8. 查看实例情况
[gbasedbt@localhost ~]$ onstat -g dis
Your evaluation license will expire on 2023-04-14 00:00:00
On-Line – Up 00:03:41 – 640264 Kbytes
There are 2 servers found
Server : gbase02
Server Number : 1
Server Type : IDS
Server Status : Up
Server Version: GBase Database Server Version 12.10.FC4G1TL
Shared Memory : 0x44000000
GBASEDBTDIR : /opt/gbase8s_a2_2
ONCONFIG : /opt/gbase8s_a2_2/etc/onconfig.gbase02
SQLHOSTS : /opt/gbase8s_a2_2/etc/sqlhosts
Host : localhost.localdomain

Server : gbase01
Server Number : 0
Server Type : IDS
Server Status : Up
Server Version: GBase Database Server Version 12.10.FC4G1TL
Shared Memory : 0x44000000
GBASEDBTDIR : /opt/gbase8s_a2_2
ONCONFIG : /opt/gbase8s_a2_2/etc/onconfig.gbase01
SQLHOSTS : /opt/gbase8s_a2_2/etc/sqlhosts
Host : localhost.localdomain

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值