This article has participated in the “Digitalstar Project” and won a creative gift package to challenge the creative incentive money.

🌲 preface

Recently, I participated in the training of GBase database training camp. During the learning process, I need to install and deploy the GBase 8A MPP Cluster environment. This time, I only record for reference.

E01 GBase 8A MPP Cluster V95 installation and uninstallation

☀️ Environment Preparations

node The operating system The IP address memory Gbase version
gbase01 redhat7.3 10.211.55.100 2G RHEL7.3 x86_64 — 9.5.2.39
gbase02 redhat7.3 10.211.55.101 2G RHEL7.3 x86_64 — 9.5.2.39
gbase03 redhat7.3 10.211.55.102 2G RHEL7.3 x86_64 — 9.5.2.39

📢 Note: The official installation package version isRedhat7.3Version, so you cannot select other operating system versions; During system installation, you are advised to select Development Tools in Server with GUI in Software Selection.

Installation Media Download

【 baidu cloud disk link 】 : pan.baidu.com/s/1cI7tIdyC… [Extraction code] : CKRF

Installation media include:

☆ GBase 8A Cluster Product Manual 9.5.2.39 GBase 8A Cluster Product Manual ☆ GBaseDataStudio GBase 8A Cluster Graphical tool – Enterprise manager GBaseDataStudio Rhel7.3-x86_64-9.5.2.39 – License GBase 8A Cluster product installation package and Linux client

OS Installation

First, create and install one Gbase01 as the master node, and clone the other two (gbase02 and gbase03) as the data node.

The virtual machine software can be VMWare, Vbox, Parallels, and so on.

📢 Note: After cloning, configure the host name and network IP address for each machine.

Preparations before Installation

📢 Perform the following operations for all three hosts. The screenshot shows only the primary node.

1. Disable the firewall

systemctl stop firewalld.service
systemctl disable firewalld.service
Copy the code

2. Disable Selinux

The Selinux shutdown takes effect only after the host is restarted. Setenforce 0 is used to temporarily disable Selinux.

/usr/sbin/setenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
Copy the code

3. Create a gbase user

useradd gbase
echo gbase | passwd --stdin gbase
Copy the code

4. Create a directory and authorize it

mkdir -p /opt/gbase
chown gbase:gbase /opt/gbase
chown gbase:gbase /tmp
Copy the code

5. Restart the host

reboot
Copy the code

It is not mandatory. You are advised to restart the three nodes and install the software.

❤️ GBase 8a MPP Cluster installation

Ensure that the preceding environment has been configured and the network IP address has been set correctly before the installation starts.

The active node uploads the installation media

In this document, the primary node is 10.211.55.100. Therefore, upload the installation media to the /opt directory on the primary node.

The upload media can be uploaded using the FTP tool.

Decompress the installation package on the active node

cd/ opt tar XFJ GBase8a_MPP_Cluster - License - 9.5.2.39 - redhat7.3 - x86_64. Tar..bz2Copy the code

After the decompression is successful, the /opt directory will add a gcinstall directory.

Distributing configuration files

Context Environment variables need to be configured for the three hosts. Therefore, copy the setSysenv. py configuration file to the /opt directory of the three hosts.

Cp gcinstall/SetSysEnv py/opt SCP/opt/gcinstall/SetSysEnv py 10.211.55.101: / opt SCP/opt/gcinstall/SetSysEnv py 10.211.55.102: / optCopy the code

📢 Note: The above command only needs to perform distribution on the primary node.

Configuring environment Variables

Run the following commands on each node:

cd /opt
python SetSysEnv.py --dbaUser=gbase --installPrefix=/opt/gbase --cgroup
Copy the code

Example Modify the installation configuration file of the active node

su - gbase
cd /opt/gcinstall/
vi demo.options
Copy the code

The modifications are as follows:

InstallPrefix = / opt/gbase coordinateHost = 10.211.55.100, 10.211.55.101, 10.211.55.102 coordinateHostNodeID = 100101102 DataHost = 10.211.55.100 10.211.55.101, 10.211.55.102 # # existDataHost existCoordinateHost = = dbaUser = gbase dbaGroup = gbase dbaPwd = 'gbase' rootPwd = 'gbase' #rootPwdFile = rootPwd.jsonCopy the code

📢 Note: The IP address can be changed based on the actual environment.dbaPwdgbaseThe password to the account,rootPwdrootPassword of the account.

The active node runs the installation command

You only need to run the installation command on the active node.

cd /opt/gcinstall
./gcinstall.py --silent=demo.options
Copy the code

Screenshots are only taken of important parts, and the rest of the content is too much to show.

Checking cluster Status

Under gbase user, open a new window or manually apply environment variables:

source ~/.bash_profile
gcadmin
Copy the code

📢 You can see that the cluster status and node status are bothCLOSEThe reason is because there is no registrationLicenseAuthorization is a normal phenomenon.

Apply for and import authorization

① Export the fingerprint information of each node in the cluster

Go to the /opt/gcinstall directory, run the fingerprint export command, and change the IP address and password as required.

cd/ opt/gcinstall. / gethostsid - n 10.211.55.100 10.211.55.101, 10.211.55.102 -u root -p gbase -f/TMP/finger. TXTCopy the code

② Apply for authorization by email

  • Email: [email protected]; Cc to [email protected];
  • Attached is the fingerprint information file finger. TXT;
  • Email title: GBase 8A MPP Cluster V95 License Application
  • Email body:
Client Name: Trainee Company Name Project Name: X, 2021 Certification Training Applicant: Fill in your name Application reason: Training study Validity period: 3 months Operating system name and version: Red Hat Enterprise Linux Server Release 7.3 (Maipo) 8A GBase8a_MPP_Cluster - License - 9.5.2.39 - redhat7.3 - x86_64. Tar..bz2Copy the code

Authorization applications are processed at 9:00, 13:30, and 17:30 on weekdays. Trainees receive the authorization file (20210817-08.lic) and upload it to/TMP on the primary node.

3 Import authorization for the active node

cd/ opt/gcinstall. / License -n 10.211.55.100, 10.211.55.101, 10.211.55.102 -f/TMP / 20210817-08, lic -u gbase -p gbaseCopy the code

④ Check authorization

cd/ opt/gcinstall. / chkLicense - n 10.211.55.100 10.211.55.101, 10.211.55.102 -u gbase -p gbaseCopy the code

You can see that all three nodes are authorized successfully.

Description of License status:

  • is_existYes indicates that the license file exists. No indicates that the license file does not exist.
  • versionTrial is the trial version, and Business is the commercial version.
  • expire_timeThis parameter indicates the expiration date of the trial license. It is displayed only when the trial license is being tested.
  • is_validYes indicates that the license is valid. No indicates that the license is invalid.

📢 Note: The license validity period is 3 months. If the license validity period does not exceed, CPU, memory, and NIC configurations are not changed, and you can reuse the license. After the VM system is reinstalled, apply for a new application.

The cluster service is started on all nodes

su - gbase
gcluster_services all start
gcadmin
Copy the code

Ensure that the cluster status is OPEN and running properly.

The fragment information is set on the primary node

gcadmin distribution gcChangeInfo.xml p 2 d 1 pattern 1
Copy the code

The gcchangeInfo. XML file will be generated in /opt/gcinstall:

Check cluster status again:

gcadmin
Copy the code

gcadmin showdistribution node
Copy the code

Database initialization

Run the following command on the management node (the default password of database root is empty) :

Gccli -u root -p If the password is empty, press initNodeDatamap.Copy the code

Create the library table

create database lucifer;
show database;
user lucifer;
create table lucifer(id int ,name varchar(20));
show tables;
insert into lucifer values(1.'lucifer');
select * from lucifer;
Copy the code

❄️ Cluster Uninstallation

Stop all cluster services

Run the following command to stop all three hosts:

gcluster_services all stop
Copy the code

The active node runs the uninstall command

cd /opt/gcinstall
./unInstall.py --silent=demo.options
Copy the code

Here I have to learn, will not demonstrate the uninstall 😓!

📚 is at the end

I am also a gbase novice 😄, what to write wrong place, welcome 👏🏻 everyone to teach! Thank you ~


This is the end of sharing ~

If you think the article is helpful to you, please like it, favorites it, pay attention to it, comment on it, and support it four times with one button. Your support is the biggest motivation for my creation.

❤️ technical exchange can follow the public number: Lucifer think twice before you do ❤️