Install GreenPlum4.3.5.2 in centos6.6
On the GP official website, you can use the RedHat version if you cannot see the corresponding version of the latest GP on Centos.
Preface:
The installation of GP is generally like this. Select a host as the Master machine and other machines as the Segment machine. Since there are not so many machines, three centos servers are deployed on the VM, in the 1 + 2 mode.
During installation, remember that GP can be installed on the Master machine first, and then install similar Remote Installation by establishing mutual trust (gpssh-exkeys) between the Master machine and the Segment machine, with gpssh, you can log on to all hosts and perform a series of operations, including creating users, copying installed GP, and so on. Of course, some people will configure Kernel Parameters and restriction parameters before installation, depending on what you need. Because my virtual machine and hardware basically do not meet the requirements on the official website, I will leave this step away.
Preparations before installation (optional)
1. Add it to/etc/sysctl. conf on the Master machine.
[Html] view plaincopy
- Kernel. shmmax = 500000000
- Kernel. shmmni = 4096
- Kernel. shmall = 4000000000
- Kernel. sem = 2505120001002048
- Kernel. sysrq = 1
- Kernel. core_uses_pid = 1
- Kernel. msgmnb = 65536
- Kernel. msgmax = 65536
- Kernel. msgmni= 2048
- Net. ipv4.tcp _ syncookies = 1
- Net. ipv4.ip _ forward = 0
- Net. ipv4.conf. default. accept_source_route = 0
- Net. ipv4.tcp _ tw_recycle = 1
- Net. ipv4.tcp _ max_syn_backlog = 4096
- Net. ipv4.conf. all. arp_filter = 1
- Net. ipv4.ip _ local_port_range = 102565535
- Net. core. netdev_max_backlog = 10000
- Net. core. rmem_max = 2097152
- Net. core. wmem_max = 2097152
- Vm. overcommit_memory = 2
Restart the sub-host or sysctl-p to take effect.
2. on the Master machine/etc/security/limits. conf, add
[Html] view plaincopy
- * Softnofile65536
- * Hardnofile65536
- * Softnproc131072
- * Hardnproc131072
!!! Note: For RedHat 6. x and Centos6.x, the parameters in/etc/security/limits. d/90-nproc.conf overwrite the preceding file parameters. If the parameters are set for both files, make sure that the parameters are set in 90-nproc.conf.
3. Disable the Firewall
Chkconfig iptables off; // permanently disabled. It is not started after restart.
Service iptables stop; // It will be started after restart. Use service iptables status to check the status.
Start GP Installation
1. Install GP on the Master with the root permission
Put the downloaded greenplum-db-4.3.5.2-build-1-rhel5-x86_64.zip in a directory, decompress it (unzip), and get a ReadMe and. binfile. By default, GP is installed under/usr/local/greenplum. In fact, it can be installed anywhere. Here we install/opt/greenplum.
Run the binfile to extract the directory./greenplum-db-4.3.5.2-build-1-RHEL5-x86_64.bin
Enter the Space key until you enter yes | no, yes
Select the installation directory, enter the directory you want to install, here/opt/greenplum/greenplum-db-4.3.5.2
The installation will be completed on the "yes" page soon.
2. It is customary to first create a gpadmin user responsible For the GP database on the Master machine, and then add the gpadmin user on the segment machine through gpssh.
Generally, you do not have a gpadmin user at the beginning.
Groupadd-g 530 gpadmin
Useradd-g 530-u 530-m-d/home/gpadmin-s/bin/bash gpadmin
Passwd gpadmin; add Password
Modify permissions on the GP installation folder
Chown-R gpadmin: gpadmin/home/gpadmin
Chown-R gpadmin: gpadmin/opt/greenplum
Add an environment variable file under the GP installation directory to the user.
Source/opt/greenplum-db/greenplum_path.sh;/opt/greenplum-db is a link to/opt/greenplum/greenplum-db-4.3.5.2, no, just link a ln-s/opt/greenplum/greenplum-db-4.3.5.2/opt/greenplum-db
3. establish mutual trust between hosts
First, edit the/etc/hosts file on the Master machine,
Enter the Ip address and hostname of the Master and segment hosts.
For example
#/Etc/hosts
127.0.0.1 localhost. localdomain localhost4 localhost4.localdomain4
: 1 localhost. localdomain localhost6 localhost6.localdomain6
192.168.127.136 mdw # master machine
192.168.127.20.sdw1 # segment Server
192.168.127.138 sdw2 # segment Server
Second, create a hostlists file under a directory such as/var to protect the hostnames of all hosts and seg_hosts with the segment host name.
/Var/hostlists:
Mdw
Sdw1
Sdw2
/Var/seg_hosts
Sdw1
Sdw2
Start building mutual trust
Gpssh-exkeys-f/var/hostlists
[Root @ localhost ~] $ Gpssh-exkeys-f/var/hostlists
[STEP 1 of 5] create local ID and authorize on local host
.../Home/root/. ssh/id_rsa file exists... key generation skipped
[STEP 2 of 5] keyscan all hosts and update known_hosts file
[STEP 3 of 5] authorize current user on remote hosts
... Send to mdw
... Send to sdw1
***
* ** Enter password for sdw1:
[STEP 4 of 5] determine common authentication file content
[STEP 5 of 5] copy authentication files to all remote hosts
... Finished key exchange with mdw
... Finished key exchange with sdw1
[INFO] completed successfully
Note: ssh-keygen-t rsa; ssh-add/root/. ssh/id_rsa if no key is prompted. You can get the key. If ssd-add is executed and cocould not open a connection to your authentication agent is executed, run ssh-agent bash.
After building mutual trust, you can access all hosts through gpssh-f/var/seg_hosts.