GBase 8a 部署(8.6)
本次實(shí)驗(yàn)涉及三個(gè)節(jié)點(diǎn),即是管理節(jié)點(diǎn) 又是數(shù)據(jù)節(jié)點(diǎn)
數(shù)據(jù)庫(kù)版本?GBase8a 8.6.2
操作系統(tǒng)版本?CentOS Linux release 7.9.2009 (Core)
驗(yàn)證開(kāi)啟ssh【所有節(jié)點(diǎn)】
[root@localhost ~]# service sshd status關(guān)閉selinux【所有節(jié)點(diǎn)】
[root@localhost ~]# vi /etc/selinux/config [root@localhost ~]# reboot [root@localhost ~]# sestatusSELINUX=disabled
關(guān)閉防火墻【所有節(jié)點(diǎn)】
[root@localhost ~]# systemctl stop firewalld.service [root@localhost ~]# systemctl status firewalld.service安裝解壓軟件【所有節(jié)點(diǎn)】
[root@localhost opt]# yum -y install bzip2.x86_64解壓【在一個(gè)管理節(jié)點(diǎn)執(zhí)行即可】
[root@localhost ~]# cd /opt/ [root@localhost opt]# ls GBase8a_MPP_Cluster-NoLicense-8.6.2_build43-R33-132743-redhat7-x86_64.tar.bz2 [root@localhost opt]# tar xfj GBase8a_MPP_Cluster-NoLicense-8.6.2_build43-R33-132743-redhat7-x86_64.tar.bz2配置集群信息
[root@localhost gcinstall]# vi demo.optionsinstallPrefix= /opt
coordinateHost = 192.168.61.132,192.168.61.133,192.168.61.134
coordinateHostNodeID = 132,133,134
dataHost = 192.168.61.132,192.168.61.133,192.168.61.134
#existCoordinateHost =
#existDataHost =
loginUser= root
loginUserPwd = '111111'
#loginUserPwdFile = loginUserPwd.json
dbaUser = gbase
dbaGroup = gbase
dbaPwd = 'gbase'
rootPwd = '111111'
#rootPwdFile = rootPwd.json
dbRootPwd = ''
#mcastAddr = 226.94.1.39
mcastPort = 5493
安裝
[root@localhost gcinstall]# ./gcinstall.py --slient=demo.options查看集群運(yùn)行狀態(tài)
[root@localhost gcinstall]# service gcware status corosync (pid 5042) is running... gclusterd (pid 5766) is running... gcrecover (pid 5827) is running... gbased (pid 5133) is running... gc_sync_server (pid 5732) is running... [root@localhost gcinstall]# gcadmin CLUSTER STATE: ACTIVE CLUSTER MODE: NORMAL===================================================================== | GBASE COORDINATOR CLUSTER INFORMATION | ===================================================================== | NodeName | IpAddress |gcware |gcluster |DataState | --------------------------------------------------------------------- | coordinator1 | 192.168.61.132 | OPEN | OPEN | 0 | --------------------------------------------------------------------- | coordinator2 | 192.168.61.133 | OPEN | OPEN | 0 | --------------------------------------------------------------------- | coordinator3 | 192.168.61.134 | OPEN | OPEN | 0 | --------------------------------------------------------------------- ================================================================= | GBASE DATA CLUSTER INFORMATION | ================================================================= |NodeName | IpAddress |gnode |syncserver |DataState | ----------------------------------------------------------------- | node1 | 192.168.61.132 | OPEN | OPEN | 0 | ----------------------------------------------------------------- | node2 | 192.168.61.133 | OPEN | OPEN | 0 | ----------------------------------------------------------------- | node3 | 192.168.61.134 | OPEN | OPEN | 0 | -----------------------------------------------------------------設(shè)置集群分布方式
【p=2 每個(gè)節(jié)點(diǎn)2個(gè)分片,d=2? 每個(gè)分片2個(gè)備份,pattern=1 負(fù)載均衡分布方式】
[root@localhost opt]# su - gbase [gbase@localhost ~]$ cd /opt/gcinstall/ [gbase@localhost gcinstall]$ gcadmin distribution gcChangeInfo.xml p 2 d 2 pattern 1 gcadmin generate distribution ...NOTE: node [192.168.61.132] is coordinator node, it shall be data node too NOTE: node [192.168.61.133] is coordinator node, it shall be data node too NOTE: node [192.168.61.134] is coordinator node, it shall be data node too gcadmin generate distribution successful查看集群分布情況
[gbase@localhost gcinstall]$ gcadmin showdistribution nodeDistribution ID: 1 | State: new | Total segment num: 6==================================================================================================================================== |nodes | 192.168.61.132 | 192.168.61.133 | 192.168.61.134 | ------------------------------------------------------------------------------------------------------------------------------------ |primary | 1 | 2 | 3 | |segments | 4 | 5 | 6 | ------------------------------------------------------------------------------------------------------------------------------------ |duplicate | 3 | 1 | 2 | |segments 1| 5 | 6 | 4 | ------------------------------------------------------------------------------------------------------------------------------------ |duplicate | 2 | 3 | 1 | |segments 2| 6 | 4 | 5 | ====================================================================================================================================連接并初始化數(shù)據(jù)庫(kù)
[gbase@localhost gcinstall]$ gccli -uroot -p Enter password: GBase client 8.6.2.43-R33.132743. Copyright (c) 2004-2022, GBase. All Rights Reserved.gbase> show database; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your GBase server version for the right syntax to use near 'database' at line 1 gbase> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | performance_schema | | gbase | | gclusterdb | | gctmpdb | +--------------------+ 5 rows in set (Elapsed: 00:00:00.01)gbase> create database a; ERROR 1707 (HY000): gcluster command error: (GBA-02CO-0003) nodedatamap is not initialized. gbase> initnodedatamap; Query OK, 0 rows affected (Elapsed: 00:00:01.12)gbase> create database a; Query OK, 1 row affected (Elapsed: 00:00:00.00)總結(jié)
以上是生活随笔為你收集整理的GBase 8a 部署(8.6)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: android maxlength 汉字
- 下一篇: git一些基本配置