GBase8a--安装

举报
snowofsummer 发表于 2021/05/11 15:04:06 2021/05/11
【摘要】 Os:CentOS Linux release 7.8.2003 (Core)#选择一台主机,存放安装介质cd /opt/tar xvf GBase8a_MPP_Cluster-License-9.5.2.39-redhat7.3-x86_64.tar.bz2cd gcinstall/scp SetSysEnv.py 192.168.3.130:/opt/scp SetSysEnv.py 1...
Os:
CentOS Linux release 7.8.2003 (Core)



#选择一台主机,存放安装介质
cd /opt/
tar xvf GBase8a_MPP_Cluster-License-9.5.2.39-redhat7.3-x86_64.tar.bz2
cd gcinstall/
scp SetSysEnv.py 192.168.3.130:/opt/
scp SetSysEnv.py 192.168.3.131:/opt/
scp SetSysEnv.py 192.168.3.132:/opt/


#使用 root 用户在集群各个节点执行 gbase 用户的环境部署脚本
systemctl stop firewalld.service
systemctl disable firewalld.service
 setenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
useradd gbase
echo root|passwd --stdin gbase
python /opt/SetSysEnv.py --installPrefix=/opt --dbaUser=gbase --cgroup
chown -R gbase:gbase gcinstall
chown -R gbase:gbase /opt



#在安装介质主机操作,执行安装操作
su - gbase
vi /opt/gcinstall/demo.options
installPrefix= /opt
coordinateHost = 192.168.3.130,192.168.3.131,192.168.3.132
coordinateHostNodeID = 1,2,3
dataHost = 192.168.3.130,192.168.3.131,192.168.3.132
#existCoordinateHost =
#existDataHost =
dbaUser = gbase
dbaGroup = gbase
dbaPwd = 'root'
rootPwd = 'root'
#rootPwdFile = rootPwd.json


软件安装:
 ./gcinstall.py --silent=demo.options

#状态检查:部分资源close输入license重启就可以正常OPEN。
gcadmin


#指纹信息:
##需要联系Gbase厂家,才能OPEN.
./chkLicense -n 192.168.3.130,192.168.3.131,192.168.3.132 -u gbase -p root
./gethostsid -n 192.168.3.130,192.168.3.131,192.168.3.132 -u root -p root -f /opt/f.txt
./License -n 192.168.3.130,192.168.3.131,192.168.3.132 -u gbase -p root -f /opt/mpp.lic


#集群重启
gcluster_services all start
gcadmin
[gbase@db03 ~]$ gcadmin
CLUSTER STATE:         ACTIVE
VIRTUAL CLUSTER MODE:  NORMAL

================================================================
|            GBASE COORDINATOR CLUSTER INFORMATION             |
================================================================
|   NodeName   |   IpAddress   | gcware | gcluster | DataState |
----------------------------------------------------------------
| coordinator1 | 192.168.3.130 |  OPEN  |   OPEN   |     0     |
----------------------------------------------------------------
| coordinator2 | 192.168.3.131 |  OPEN  |   OPEN   |     0     |
----------------------------------------------------------------
| coordinator3 | 192.168.3.132 |  OPEN  |   OPEN   |     0     |
----------------------------------------------------------------
=========================================================================================================
|                                    GBASE DATA CLUSTER INFORMATION                                     |
=========================================================================================================
| NodeName |                IpAddress                 | DistributionId | gnode | syncserver | DataState |
---------------------------------------------------------------------------------------------------------
|  node1   |              192.168.3.130               |       1        | OPEN  |    OPEN    |     0     |
---------------------------------------------------------------------------------------------------------
|  node2   |              192.168.3.131               |       1        | OPEN  |    OPEN    |     0     |
---------------------------------------------------------------------------------------------------------
|  node3   |              192.168.3.132               |       1        | OPEN  |    OPEN    |     0     |
---------------------------------------------------------------------------------------------------------



#创建 distribution
gcadmin distribution gcChangeInfo.xml p 2 d 1
//p,每个数据节点存放主分片数量
//d,备份数量
gcadmin showdistribution


                                 Distribution ID: 1 | State: new | Total segment num: 6

             Primary Segment Node IP                   Segment ID                 Duplicate Segment node IP
========================================================================================================================
|                 192.168.3.130                  |         1          |                 192.168.3.131                  |
------------------------------------------------------------------------------------------------------------------------
|                 192.168.3.131                  |         2          |                 192.168.3.132                  |
------------------------------------------------------------------------------------------------------------------------
|                 192.168.3.132                  |         3          |                 192.168.3.130                  |
------------------------------------------------------------------------------------------------------------------------
|                 192.168.3.130                  |         4          |                 192.168.3.132                  |
------------------------------------------------------------------------------------------------------------------------
|                 192.168.3.131                  |         5          |                 192.168.3.130                  |
------------------------------------------------------------------------------------------------------------------------
|                 192.168.3.132                  |         6          |                 192.168.3.131                  |
========================================================================================================================


#数据库初始化
gccli -uroot
initnodedatamap;
show databases;

[gbase@db03 ~]$ gccli -uroot

GBase client 9.5.2.39.126761. Copyright (c) 2004-2021, GBase.  All Rights Reserved.

gbase> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| performance_schema |
| gbase              |
| gctmpdb            |
| gclusterdb         |
| test               |
+--------------------+





####卸载
 gcmonit --status
 gcluster_services all stop
./unInstall.py with --silent=demo.options


























【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。