Install GreenPlum4.3.5.2 in centos6.6

Source: Internet
Author: User

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
  1. Kernel. shmmax = 500000000
  2. Kernel. shmmni = 4096
  3. Kernel. shmall = 4000000000
  4. Kernel. sem = 2505120001002048
  5. Kernel. sysrq = 1
  6. Kernel. core_uses_pid = 1
  7. Kernel. msgmnb = 65536
  8. Kernel. msgmax = 65536
  9. Kernel. msgmni= 2048
  10. Net. ipv4.tcp _ syncookies = 1
  11. Net. ipv4.ip _ forward = 0
  12. Net. ipv4.conf. default. accept_source_route = 0
  13. Net. ipv4.tcp _ tw_recycle = 1
  14. Net. ipv4.tcp _ max_syn_backlog = 4096
  15. Net. ipv4.conf. all. arp_filter = 1
  16. Net. ipv4.ip _ local_port_range = 102565535
  17. Net. core. netdev_max_backlog = 10000
  18. Net. core. rmem_max = 2097152
  19. Net. core. wmem_max = 2097152
  20. 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
  1. * Softnofile65536
  2. * Hardnofile65536
  3. * Softnproc131072
  4. * 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.