其他分享
首页 > 其他分享> > GBase 8a MPP Cluster 安装操作

GBase 8a MPP Cluster 安装操作

作者:互联网

环境规划

三个物理节点IP

10.10.10.201、10.10.10.202、10.10.10.203

Coordinator节点为

10.10.10.201、10.10.10.202

DATA节点为

10.10.10.201、10.10.10.202、10.10.10.203

分片规则

gbase01 主分片  1 ,4   分片副本 5 ,3
gbase01 主分片  2 ,5   分片副本 1 ,6
gbase01 主分片  3 ,6   分片副本 4 ,2

操作步骤

解压

[root@gbase01 opt]# tar xfj GBase8a_MPP_Cluster-License-9.5.2.39-redhat7.3-x86_64.tar.bz2 
[root@gbase01 opt]# ll
total 140768
-rw-r--r-- 1 root  root  140464404 May 15 02:56 GBase8a_MPP_Cluster-License-9.5.2.39-redhat7.3-x86_64.tar.bz2
-rw-r--r-- 1 root  root    3673603 May 15 02:53 gccli-9.5.2.39-redhat7.3-x86_64.tar.bz2
drwxrwxr-x 2 vhost vhost      4096 Mar 14 02:06 gcinstall
[root@gbase01 opt]# 

三个节点上创建用户

useradd gbase
echo "gbase"|passwd --stdin gbase

将SetSysEnv.py放置于/opt目录下

[root@gbase01 gcinstall]# scp SetSysEnv.py  gbase02:/opt
SetSysEnv.py                                                              100%   27KB  15.9MB/s   00:00    
[root@gbase01 gcinstall]# scp SetSysEnv.py  gbase03:/opt
SetSysEnv.py                                                              100%   27KB  20.0MB/s   00:00    
[root@gbase01 gcinstall]# pwd
/opt/gcinstall
[root@gbase01 gcinstall]# cp SetSysEnv.py /opt
[root@gbase01 gcinstall]# cd ..
[root@gbase01 opt]# ls
GBase8a_MPP_Cluster-License-9.5.2.39-redhat7.3-x86_64.tar.bz2  gcinstall
gccli-9.5.2.39-redhat7.3-x86_64.tar.bz2                        SetSysEnv.py
[root@gbase01 opt]#

三个节点都执行环境变量

[root@gbase01 opt]# python SetSysEnv.py  --dbaUser=gbase --installPrefix=/opt --cgroup

三个节点赋权给目录

chmod -R 777 /opt
chmod -R 777 /tmp

201上编辑配置文件

[gbase@gbase01 gcinstall]$ vim demo.options 
[gbase@gbase01 gcinstall]$ cat demo.options 
installPrefix= /opt
coordinateHost = 192.168.151.234,192.168.151.235,192.168.151.237
coordinateHostNodeID = 234,235,237
dataHost = 192.168.151.234,192.168.151.235,192.168.151.237
#existCoordinateHost =
#existDataHost =
dbaUser = gbase
dbaGroup = gbase
dbaPwd = ''
rootPwd = ''
#rootPwdFile = rootPwd.json
[gbase@gbase01 gcinstall]$ vim demo.options 
[gbase@gbase01 gcinstall]$ cat demo.options 
installPrefix= /opt
coordinateHost = 10.10.10.201,10.10.10.202
coordinateHostNodeID = 201,202
dataHost = 10.10.10.201,10.10.10.202,10.10.10.203
#existCoordinateHost =
#existDataHost =
dbaUser = gbase
dbaGroup = gbase
dbaPwd = 'gbase'
rootPwd = 'redhat'
#rootPwdFile = rootPwd.json
[gbase@gbase01 gcinstall]$ 

静默安装

[gbase@gbase01 gcinstall]$ ./gcinstall.py --silent=demo.options
*********************************************************************************
Thank you for choosing GBase product!

Please read carefully the following licencing agreement before installing GBase product:
TIANJIN GENERAL DATA TECHNOLOGY CO., LTD. LICENSE AGREEMENT

READ THE TERMS OF THIS AGREEMENT AND ANY PROVIDED SUPPLEMENTAL LICENSETERMS (COLLECTIVELY "AGREEMENT") CAREFULLY BEFORE OPENING THE SOFTWAREMEDIA PACKAGE.  BY OPENING THE SOFTWARE MEDIA PACKAGE, YOU AGREE TO THE TERMS OF THIS AGREEMENT.  IF YOU ARE ACCESSING THE SOFTWARE ELECTRONICALLY, INDICATE YOUR ACCEPTANCE OF THESE TERMS.  IF YOU DO NOT AGREE TO ALL THESE TERMS, PROMPTLY RETURN THE UNUSED SOFTWARE TO YOUR PLACE OF PURCHASE FOR A REFUND.

1.  LICENSE TO USE.  GeneralData grants you a non-exclusive and non-transferable license for the internal use only of the accompanying software and documentation and any error corrections provided by GeneralData(collectively "Software"), by the number of users and the class of computer hardware for which the corresponding fee has been paid.

2.  RESTRICTIONS.  Software is confidential and copyrighted. Title to Software and all associated intellectual property rights is retained by GeneralData and/or its licensors.  Except as specifically authorized in any Supplemental License Terms, you may not make copies of Software, other than a single copy of Software for archival purposes.  Unless enforcement is prohibited by applicable law, you may not modify,decompile, or reverse engineer Software.  You acknowledge that Software is not designed, licensed or intended for use in the design,construction, operation or maintenance of any nuclear facility.  GeneralData disclaims any express or implied warranty of fitness for such uses.No right, title or interest in or to any trademark, service mark, logo or trade name of GeneralData or its licensors is granted under this Agreement.

3.  DISCLAIMER OF WARRANTY.  Unless specified in this agreement, all express of implied conditions, representations and warranties, including any implied warranty of merchantability, fitness for aparticular purpose or non-infringement are disclaimed, except to theextent that these disclaimers are held to be legally invalid.

4.  LIMITATION OF LIABILITY.  To the extent not prohibited by law, in no event will GeneralData or its licensors be liable for any lost revenue, profit or data, or for special, indirect, consequential,incidental orpunitive damages, however caused regardless of the theory of liability, arising out of or related to the use of or inability to use software, even if GeneralData has been advised of the possibility of such damages.In no event will GeneralData's libility to you, whether incontract, tort (including negligence), or otherwise, exceed the amount paid by you for Software under this Agreement.  The foregoing limitations will apply even if the above stated warranty fails of itsessential purpose.

5.  TERMINATION.  This Agreement is effective until terminated.  You may terminate this Agreement at any time by destroying all copies of Software.  This Agreement will terminate immediately without noticefrom GeneralData if you fail to comply with any provision of this Agreement.Upon Termination, you must destroy all copies of Software.

6.  EXPORT REGULATIONS.  All Software and technical data delivered under this Agreement are subject to US export control laws and may be subject to export or import regulations in other countries.  You agree to comply strictly with all such laws and regulations and acknowledge that you have the responsibility to obtain such licenses to export,re-export, or import as may be required after delivery to you.

7.  CHINESE GOVERNMENT RESTRICTED.  If Software is being acquired by or on behalf of the Chinese Government , then the Government's rights in Software and accompanying documentation will be only as set forth in this Agreement.

8.  GOVERNING LAW.  Any action related to this Agreement will be governed by Chinese law: "COPYRIGHT LAW OF THE PEOPLE'S REPUBLIC OF CHINA","PATENT LAW OF THE PEOPLE'S REPUBLIC OF CHINA","TRADEMARK LAW OF THE PEOPLE'S REPUBLIC OF CHINA","COMPUTER SOFTWARE PROTECTION REGULATIONS OF THE PEOPLE'S REPUBLIC OF CHINA".  No choice of law rules of any jurisdiction will apply."

9.  SEVERABILITY.  If any provision of this Agreement is held to be unenforceable, this Agreement will remain in effect with the provision omitted, unless omission would frustrate the intent of the parties, inwhich case this Agreement will immediately terminate.

10. INTEGRATION.  This Agreement is the entire agreement between you and GeneralData relating to its subject matter.  It supersedes all prior or contemporaneous oral or written communications, proposals,representations and warranties and prevails over any conflicting or additional terms of any quote, order, acknowledgment, or other communication between the parties relating to its subject matter during the term of this Agreement.  No modification of this Agreement will be binding, unless in writing and signed by an authorize depresentative of each party. When the translation document has the different meaning or has the conflicting views with Chinese original text conflict, should take the laws and regulations promulgation unit as well as the Generaldata issue Chinese original text as the standard. 

*********************************************************************************
Do you accept the above licence agreement ([Y,y]/[N,n])? y
*********************************************************************************
                     Welcome to install GBase products
*********************************************************************************
Environmental Checking on gcluster nodes.
CoordinateHost:
10.10.10.201    10.10.10.202
DataHost:
10.10.10.201    10.10.10.202    10.10.10.203
Are you sure to install GCluster on these nodes ([Y,y]/[N,n])? y
10.10.10.201            start install on host 10.10.10.201
10.10.10.203            start install on host 10.10.10.203
10.10.10.202            start install on host 10.10.10.202
10.10.10.201            mkdir /opt/cluster_prepare on host 10.10.10.201.
10.10.10.203            mkdir /opt/cluster_prepare on host 10.10.10.203.
10.10.10.202            mkdir /opt/cluster_prepare on host 10.10.10.202.
10.10.10.201            Copying InstallTar.py to host 10.10.10.201:/opt/cluster_prepare
10.10.10.203            Copying InstallTar.py to host 10.10.10.203:/opt/cluster_prepare
10.10.10.202            Copying InstallFuns.py to host 10.10.10.202:/opt/cluster_prepare
10.10.10.201            Copying rmt.py to host 10.10.10.201:/opt/cluster_prepare
10.10.10.203            Copying rmt.py to host 10.10.10.203:/opt/cluster_prepare
10.10.10.202            Copying rmt.py to host 10.10.10.202:/opt/cluster_prepare
10.10.10.201            Copying SSHThread.py to host 10.10.10.201:/opt/cluster_prepare
10.10.10.203            Copying SSHThread.py to host 10.10.10.203:/opt/cluster_prepare
10.10.10.202            Copying RestoreLocal.py to host 10.10.10.202:/opt/cluster_prepare
10.10.10.201            Copying pexpect.py to host 10.10.10.201:/opt/cluster_prepare
10.10.10.203            Copying pexpect.py to host 10.10.10.203:/opt/cluster_prepare
10.10.10.202            Copying pexpect.py to host 10.10.10.202:/opt/cluster_prepare
10.10.10.201            Copying BUILDINFO to host 10.10.10.201:/opt/cluster_prepare
10.10.10.203            Copying bundle.tar.bz2 to host 10.10.10.203:/opt/cluster_prepare
10.10.10.202            Copying bundle.tar.bz2 to host 10.10.10.202:/opt/cluster_prepare
10.10.10.201            Copying bundle.tar.bz2 to host 10.10.10.201:/opt/cluster_prepare
10.10.10.203            Copying bundle.tar.bz2 to host 10.10.10.203:/opt/cluster_prepare
10.10.10.202            Copying bundle.tar.bz2 to host 10.10.10.202:/opt/cluster_prepare
10.10.10.201            Copying bundle_data.tar.bz2 to host 10.10.10.201:/opt/cluster_prepare
10.10.10.203            Copying bundle_data.tar.bz2 to host 10.10.10.203:/opt/cluster_prepare
10.10.10.202            Copying bundle_data.tar.bz2 to host 10.10.10.202:/opt/cluster_prepare
10.10.10.201            Installing gcluster.
10.10.10.203            Installing gcluster.
10.10.10.202            Installing gcluster.
10.10.10.201            Installing gcluster.
10.10.10.203            Installing gcluster.
10.10.10.202            Installing gcluster.
10.10.10.201            Installing gcluster.
10.10.10.203            Installing gcluster.
10.10.10.202            Installing gcluster.
10.10.10.201            Installing gcluster.
10.10.10.203            Installing gcluster.
10.10.10.202            Installing gcluster.
10.10.10.201            Installing gcluster.
10.10.10.203            Installing gcluster.
10.10.10.202            Installing gcluster.
10.10.10.201            Installing gcluster.
10.10.10.203            Installing gcluster.
10.10.10.202            Installing gcluster.
10.10.10.201            Installing gcluster.
10.10.10.203            Installing gcluster.
10.10.10.202            Installing gcluster.
10.10.10.201            Installing gcluster.
10.10.10.203            Installing gcluster.
10.10.10.202            Installing gcluster.
10.10.10.201            Installing gcluster.
10.10.10.203            Installing gcluster.
10.10.10.202            Installing gcluster.
10.10.10.201            Installing gcluster.
10.10.10.203            Installing gcluster.
10.10.10.202            Installing gcluster.
10.10.10.201            Installing gcluster.
10.10.10.203            Installing gcluster.
10.10.10.202            Installing gcluster.
10.10.10.201            Installing gcluster.
10.10.10.203            Installing gcluster.
10.10.10.202            Installing gcluster.
10.10.10.201            Installing gcluster.
10.10.10.203            Installing gcluster.
10.10.10.202            Installing gcluster.
10.10.10.201            Installing gcluster.
10.10.10.203            Installing gcluster.
10.10.10.202            Installing gcluster.
10.10.10.201            Installing gcluster.
10.10.10.203            Installing gcluster.
10.10.10.202            Installing gcluster.
10.10.10.201            Installing gcluster.
10.10.10.203            Installing gcluster.
10.10.10.202            Installing gcluster.
10.10.10.201            Installing gcluster.
10.10.10.203            Installing gcluster.
10.10.10.202            Installing gcluster.
10.10.10.201            Installing gcluster.
10.10.10.203            Installing gcluster.
10.10.10.202            Installing gcluster.
10.10.10.201            Installing gcluster.
10.10.10.203            Installing gcluster.
10.10.10.202            Installing gcluster.
10.10.10.201            Installing gcluster.
10.10.10.203            Installing gcluster.
10.10.10.202            Installing gcluster.
10.10.10.201            Installing gcluster.
10.10.10.203            Installing gcluster.
10.10.10.202            Installing gcluster.
10.10.10.201            Installing gcluster.
10.10.10.203            Installing gcluster.
10.10.10.202            Installing gcluster.
10.10.10.201            Installing gcluster.
10.10.10.203            install cluster on host 10.10.10.203 successfully.
10.10.10.202            Installing gcluster.
10.10.10.201            Installing gcluster.
10.10.10.203            install cluster on host 10.10.10.203 successfully.
10.10.10.202            install cluster on host 10.10.10.202 successfully.
10.10.10.201            install cluster on host 10.10.10.201 successfully.
10.10.10.203            install cluster on host 10.10.10.203 successfully.
10.10.10.202            install cluster on host 10.10.10.202 successfully.
Starting all gcluster nodes...
start service failed on host 10.10.10.203.
start service failed on host 10.10.10.202.
start service failed on host 10.10.10.201.
adding new datanodes to gcware...
InstallCluster Successfully.

查看集群情况

[root@gbase01 opt]# su - gbase
Last login: Tue May 18 00:40:40 CST 2021 from gbase01 on pts/4
[gbase@gbase01 ~]$ gcadmin
CLUSTER STATE:         ACTIVE

===============================================================
|            GBASE COORDINATOR CLUSTER INFORMATION            |
===============================================================
|   NodeName   |  IpAddress   | gcware | gcluster | DataState |
---------------------------------------------------------------
| coordinator1 | 10.10.10.201 |  OPEN  |  CLOSE   |     0     |
---------------------------------------------------------------
| coordinator2 | 10.10.10.202 |  OPEN  |  CLOSE   |     0     |
---------------------------------------------------------------
=============================================================
|         GBASE CLUSTER FREE DATA NODE INFORMATION          |
=============================================================
| NodeName  |  IpAddress   | gnode | syncserver | DataState |
-------------------------------------------------------------
| FreeNode1 | 10.10.10.201 | CLOSE |    OPEN    |     0     |
-------------------------------------------------------------
| FreeNode2 | 10.10.10.202 | CLOSE |    OPEN    |     0     |
-------------------------------------------------------------
| FreeNode3 | 10.10.10.203 | CLOSE |    OPEN    |     0     |
-------------------------------------------------------------

0 virtual cluster
2 coordinator node
3 free data node

检查license

[gbase@gbase01 gcinstall]$ ./chkLicense -n 10.10.10.201,10.10.10.202,10.10.10.203 -u gbase -p gbase
======================================================================
10.10.10.201
is_exist:no
======================================================================
10.10.10.203
is_exist:no
======================================================================
10.10.10.202
is_exist:no
[gbase@gbase01 gcinstall]$ 

[gbase@gbase01 gcinstall]$ ./chkLicense -n 10.10.10.201,10.10.10.202,10.10.10.203 -u gbase -p gbase
======================================================================
10.10.10.201
is_exist:no
======================================================================
10.10.10.203
is_exist:no
======================================================================
10.10.10.202
is_exist:no

获取指纹信息

[gbase@gbase01 gcinstall]$ ./gethostsid -n 10.10.10.201,10.10.10.202,10.10.10.203 -u root -p redhat -f /opt/finger.text
======================================================================
Successful node nums:  3
======================================================================

将指纹信息发送给gbase公司,得到license


[gbase@gbase01 gcinstall]$ more /opt/finger.text 

[gbase@gbase01 gcinstall]$ cd /opt
[gbase@gbase01 opt]$ ll
total 140800
-rw-rw-r--  1 gbase gbase       690 May 18 00:48 finger.text
-rwxrwxrwx  1 root  root  140464404 May 15 02:56 GBase8a_MPP_Cluster-License-9.5.2.39-redhat7.3-x86_64.tar.bz2
-rwxrwxrwx  1 root  root    3673603 May 15 02:53 gccli-9.5.2.39-redhat7.3-x86_64.tar.bz2
drwxrwxrwx  2 vhost vhost      4096 May 18 00:42 gcinstall
drwxr-xr-x  6 gbase gbase        61 May 18 00:40 gcluster
drwxr-xr-x 13 gbase gbase       148 May 18 00:40 gcware
drwxrwxr-x  6 gbase gbase        61 May 18 00:40 gnode
-rwxrwxrwx  1 root  root      27849 May 18 00:31 SetSysEnv.py
[gbase@gbase01 opt]$ sz finger.text 

导入license信息到三台机器。

./License  -n 10.10.10.201,10.10.10.202,10.10.10.203 -u root -p redhat -f  /opt/20210518.lic

再次核查下license是否存在

[gbase@gbase01 gcinstall]$ ./chkLicense -n 10.10.10.201,10.10.10.202,10.10.10.203 -u gbase -p gbase

三个节点重启下集群服务

gcluster_services all restart

生成distribution表

gcadmin distribution gcChangeInfo.xml  p 2 d 1 pattern 1

然后查看gcadmin

gcadmin showdistribution node

启动分布表

gccli -u root -p
也可以
gccli

登录进入以后在命令行输入

show databases;
create database test;
没有初始化,无法操作。
initnodedatamap;  --初始化
create database test;

标签:gcluster,8a,Installing,Cluster,10.201,10.10,10.203,10.202,GBase
来源: https://blog.51cto.com/lishiyan/2782676