Install and configure the Greenplum Environment

Source: Internet
Author: User
1. Prepare the environment for the server to allocate 192.168.100.101 -- mdw192.168.100.11 -- smdw192.168.100.12 -- configure -- heartbeat ip configuration between sdw2ms1 and ms2 10.10.10.1 -- mdw10.10.2 -- smdw2. Modify the hosts file (All hosts) vietchosts192.168.100.101mdw1

1. Prepare the environment for the server to allocate 192.168.100.101 -- mdw192.168.100.11 -- smdw192.168.100.12 -- configure the heartbeat ip address between sdw2 ms1 and ms2. modify the hosts file modify) vi/etc/hosts192.168.100.101 mdw1

1. Prepare the environment for the server to allocate 192.168.100.101 -- mdw192.168.100.11 -- smdw192.168.100.12 -- sdw119425100.13 -- sdw2
Configure the heartbeat ip address between ms1 and ms2. -- mdw10.10.10.2 -- smdw
2. Modify the hosts file (all hosts files of all hosts must be modified)
Vi/etc/hosts192.168.100.101 mdw192.168.100.11 smdw192.168.100.12 sdw119425100.13 sdw2
3. Disable iptables and selinux [root @ mdw ~] # Service iptables stop [root @ mdw ~] # [Root @ mdw ~] # [Root @ mdw ~] # [Root @ mdw ~] # [Root @ mdw ~] # Chkconfig iptables -- listiptables 0: Pull pull 1: Pull pull 2: Pull pull 3: Pull 4: Pull 5: Pull pull 6: pull [root @ mdw ~] # Export LANG = zh_CN [root @ mdw ~] # Chkconfig iptables -- listiptables 0: Close 1: Close 2: Close 3: Close 4: Close 5: Close 6: Close
[Root @ mdw ~] # Cat/etc/selinux/config
# This file controls the state of SELinux on the system. # SELINUX = can take one of these three values: # enforcing-SELinux security policy is enforced. # permissive-SELinux prints warnings instead of enforcing. # disabled-No SELinux policy is loaded. SELINUX = disabled # SELINUXTYPE = can take one of these two values: # targeted-Targeted processes are protected, # mls-Multi Level Security protection. SELINUXTYPE = targeted
[Root @ mdw ~] # Setenforce 0
4. Modify system parameters. 1) vi/etc/sysctl. conf [root @ mdw ~] # Sysctl-pnet. ipv4.ip _ forward = 0net. ipv4.conf. default. rp_filter = 1net. ipv4.conf. default. accept_source_route = 0kernel. sysrq = 1kernel. core_uses_pid = 1net. ipv4.tcp _ syncookies = 1 error: "net. bridge. bridge-nf-call-ip6tables "is an unknown keyerror:" net. bridge. bridge-nf-call-iptables "is an unknown keyerror:" net. bridge. bridge-nf-call-arptables "is an unknown keykernel. msgmnb = 65536kernel. msgmax = 65536kernel. shmmax = 68719476736kernel. shmall = 4294967296 error: "kernel. msgmin "is an unknown keyvm. overcommit_memory = 2 error: "net. ipv4.cp _ tw_recycle "is an unknown keynet. ipv4.tcp _ max_syn_backlog = 4096net. ipv4.conf. all. arp_filter = 1 error: "Invalid argument" setting key "net. ipv4.ip _ local_port_range "net. core. netdev_max_backlog = 10000 error: "xfs_mount_options" is an unknown keykernel. shmmni = 4096kernel. sem = 250 512000 100 2048net. ipv4.tcp _ tw_recycle = 1net. ipv4.conf. default. arp_filter = 1kernel. msgmni = 2048
2) vi/etc/security/limits. conf
* Soft nofile 65536 * hard nofile 65536 * soft nproc 131072 * hard nproc 131072
In RHEL6.x, modify the file/etc/security/limits. d/90-nproc.conf and add the following content: * softnproc 131072 * hardnproc 131072
4. Restart the server after modifying the system parameters.
5. Create gpadmin useradd gpadmin6 and install GP. 1) Upload the installation file and decompress it. 2) execute the installation file.
[Root @ mdw GPDB] #./greenplum-db-4.2.6.3-build-2-RHEL5-x86_64.bin
I HAVE READ AND AGREE TO THE TERMS OF THE ABOVE EMC SOFTWARELICENSE AGREEMENT.
**************************************** **************************************** Do you accept the EMC Database license agreement? [Yes | no] ********************************* **************************************** *****
Yes
**************************************** **************************************** Provide the installation path for Greenplum Database or press ENTER toaccept the default installation path: /usr/local/greenplum-db-4.2.6.3 ********************************** **************************************** ******
/Home/gpadmin/GPDB/install
**************************************** **************************************** Install Greenplum Database? [Yes | no] ********************************* **************************************** *****
Yes
**************************************** **************************************** [Optional] Provide the path to a previous installation of Greenplum Database, or press ENTER to skip this step. e.g. /usr/local/greenplum-db-4.1.1.3
This installation step will migrate any Greenplum Database extensions from theprovided path to the version currently being installed. This step is optionaland can be run later with: gppkg -- migrate /Home/gpadmin/GPDB/install ******************************** **************************************** ********
Extracting product to/home/gpadmin/GPDB/install
Skipping migration of Greenplum Database extensions...
**************************************** **************************************** Installation complete. greenplum Database is installed in/home/gpadmin/GPDB/install
Greenplum Database documentation is available for downloadat http://powerlink.emc.com. **************************************** **************************************** [root @ mdw GPDB] #
[Root @ mdw install] # source greenplum_path.sh [root @ mdw install] #
3) prepare the allnotes file [root @ mdw install] # pwd/home/gpadmin/GPDB/install [root @ mdw install] # [root @ mdw install] # [root @ mdw install] # [root @ mdw install] # lsallnotes bin demo docs etc ext GPDB-LICENSE.txt greenplum_path.sh include lib LICENSE. thirdparty sbin share [root @ mdw install] # cat allnotessdw1sdw2smdw
4) Establish multi-host mutual trust [root @ mdw install] # gpssh-exkeys-f allnotes [STEP 1 of 5] create local ID and authorize on local host... /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 sdw1... send to sdw2 ****** Enter password for sdw2 :... send to smdw
[STEP 4 of 5] determine common authentication file content
[STEP 5 of 5] copy authentication files to all remote hosts... finished key exchange with sdw1 [ERROR] unable to copy authentication files to sdw2 lost connection [ERROR] unable to copy authentication files to smdw lost connection
Solution to the above error: Delete the content in the mdw/root/. ssh/directory and re-Execute gpssh-exkeys-f allnotes
5) create a directory for storing data
[Root @ mdw GPDB] # mkdir data [root @ mdw GPDB] # mkdir data/master
[Root @ mdw GPDB] # chown gpadmin: gpadmin data-R [root @ mdw GPDB] # [root @ mdw GPDB] # [root @ mdw GPDB] # ll too many rows 109588drwxr-xr-x 3 gpadmin 4096 2 Limit 20 datalrwxrwxrwx 1 root 9 2 Bytes 20 greenplum-db->. /install-rwxr-xr-x 1 root 56782500 10 greenplum-db-4.2.6.3-build-2-RHEL5-x86_64.bin-rw-r -- r -- 1 root 55417563 11 greenplum-db-4.2.6.3-build-2-RHEL5-x86_64.zipdrwxr-xr-x 11 root 4096 2 install-r -- r -- 1 root 6935 10 listen 8 README_INSTALL [root @ mdw GPDB] #
6) install GP on other machines [root @ mdw install] # cat allsegsmdwsdw1sdw2
Install with gpseginstall
[Root @ mdw install] # gpseginstall-f allseg-u gpadmin20140220: 16: 28: 05: 003251 gpseginstall: mdw: root-[INFO]:-Installation Info: link_name greenplum-dbbinary_path/home/gpadmin/GPDB/installbinary_dir_location/home/gpadmin/GPDBbinary_dir_name install20140220: 16: 28: 05: 003251 gpseginstall: mdw: root-[INFO]: -check cluster password access20140220: 16: 28: 06: 003251 gpseginstall: mdw: root-[INFO]:-de-duplicate hostnames20140220: 16: 28: 06: 003251 gpseginstall: mdw: root-[INFO]:-master hostname: mdw20140220: 16: 28: 07: 003251 gpseginstall: mdw: root-[INFO]:-check for user gpadmin on cluster20140220: 16: 28: 07: 003251 gpseginstall: mdw: root-[INFO]:-add user gpadmin on master20140220: 16: 28: 08: 003251 gpseginstall: mdw: root-[INFO]: -add user gpadmin on cluster20140220: 16: 28: 08: 003251 gpseginstall: mdw: root-[INFO]:-chown-R gpadmin: gpadmin/home/gpadmin/GPDB/greenplum-db20140220: 16: 28: 08: 003251 gpseginstall: mdw: root-[INFO]:-chown-R gpadmin: gpadmin/home/gpadmin/GPDB/install20140220: 16: 28: 08: 003251 gpseginstall: mdw: root-[INFO]:-rm-f/home/gpadmin/GPDB/install.tar; rm-f/home/gpadmin/GPDB/install.tar.gz 20140220: 16: 28: 08: 003251 gpseginstall: mdw: root-[INFO]:-cd/home/gpadmin/GPDB; tar cf install.tar install20140220: 16: 28: 09: 003251 gpseginstall: mdw: root-[INFO]:-gzip/home/gpadmin/GPDB/install.tar 20140220: 16: 28: 22: 003251 gpseginstall: mdw: root-[INFO]:-remote command: mkdir-p/home/gpadmin/GPDB20140220: 16: 28: 22: 003251 gpseginstall: mdw: root-[INFO]:-remote command: rm-rf/home/gpadmin/GPDB/install20140220: 16: 28: 23: 003251 gpseginstall: mdw: root-[INFO]:-scp software to remote location20140220: 16: 28: 38: 003251 gpseginstall: mdw: root-[INFO]:-remote command: gzip-f-d/home/gpadmin/GPDB/install.tar.gz 20140220: 16: 28: 40: 003251 gpseginstall: mdw: root-[INFO]:-md5 check on remote location20140220: 16: 28: 42: 003251 gpseginstall: mdw: root-[INFO]:-remote command: cd/home/gpadmin/GPDB; tar xf install.tar 20140220: 16: 28: 43: 003251 gpseginstall: mdw: root-[INFO]:-remote command: rm-f/home/gpadmin/GPDB/install.tar 20140220: 16: 28: 44: 003251 gpseginstall: mdw: root-[INFO]:-remote command: cd/home/gpadmin/GPDB; rm-f greenplum-db; ln-fs install greenplum-db20140220: 16: 28: 44: 003251 gpseginstall: mdw: root-[INFO]: -remote command: chown-R gpadmin: gpadmin/home/gpadmin/GPDB/greenplum-db20140220: 16: 28: 45: 003251 gpseginstall: mdw: root-[INFO]:-remote command: chown-R gpadmin: gpadmin/home/gpadmin/GPDB/install20140220: 16: 28: 45: 003251 gpseginstall: mdw: root-[INFO]: -rm-f/home/gpadmin/GPDB/install.tar.gz Please enter a password: Confirm password: 20140220: 16: 29: 19: 003251 gpseginstall: mdw: root-[INFO]: -Changing system passwords... 20140220: 16: 29: 20: 003251 gpseginstall: mdw: root-[INFO]:-exchange ssh keys for user root20140220: 16: 29: 23: 003251 gpseginstall: mdw: root-[INFO]:-exchange ssh keys for user gpadmin20140220: 16: 29: 24: 003251 gpseginstall: mdw: root-[INFO]:-Exception running cmd: su gpadmin-c "gpssh-exkeys-f allseg" 20140220: 16: 29: 24: 003251 gpseginstall: mdw: root-[INFO]:-write () argument 2 must be string or buffer, not None20140220: 16: 29: 24: 003251 gpseginstall: mdw: root-[INFO]:-gppsh-exkeys failed running from within pexpect... now try outside of pexpect [STEP 1 of 5] create local ID and authorize on local host... /home/gpadmin /. 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 smdw ***** Enter password for smdw :... send to sdw1... send to sdw2
[STEP 4 of 5] determine common authentication file content
[STEP 5 of 5] copy authentication files to all remote hosts... finished key exchange with smdw... finished key exchange with sdw1... finished key exchange with sdw2
[INFO] completed successfully20140220: 16: 29: 31: 003251 gpseginstall: mdw: root-[INFO]:-/home/gpadmin/GPDB/greenplum-db /. /sbin/gpfixuserlimts-f/etc/security/limits. conf-u gpadmin20140220: 16: 29: 31: 003251 gpseginstall: mdw: root-[INFO]:-remote command :. /home/gpadmin/GPDB/greenplum-db /. /greenplum_path.sh;/home/gpadmin/GPDB/greenplum-db /. /sbin/gpfixuserlimts-f/etc/security/limits. conf-u gpadmin20140220: 16: 29: 32: 003251 gpseginstall: mdw: root-[INFO]:-version string on master: gpssh version 4.2.6.3 build 220140220: 16: 29: 32: 003251 gpseginstall: mdw: root-[INFO]:-remote command :. /home/gpadmin/GPDB/greenplum-db /. /greenplum_path.sh;/home/gpadmin/GPDB/greenplum-db /. /bin/gpssh -- version20140220: 16: 29: 33: 003251 gpseginstall: mdw: root-[INFO]:-remote command :. /home/gpadmin/GPDB/install/greenplum_path.sh;/home/gpadmin/GPDB/install/bin/gpssh -- version20140220: 16: 29: 39: 003251 gpseginstall: mdw: root-[INFO]:-SUCCESS -- Requested commands completed
[Root @ mdw greenplum-db-4.2.6.3] # gpssh-f allnotes mkdir-p/data/d1/data/d2/data/m1/data/m2 [sdw1] [sdw2] [root @ mdw the greenplum-db-4.2.6.3] # gpssh-f allnotes chown gpadmin: gpadmin/data/d1/data/d2/data/m1/data/m2-R [sdw1] [sdw2]
Installation Complete
7. Database Initialization
1) create a data node file [root @ mdw install] # cat notessdw1sdw22) create the initialization parameter file [root @ mdw install] # cat gpinitsystem_configARRAY_NAME = "Greenplum" SEG_PREFIX = gpsegPORT_BASE = 50000 declare-a DATA_DIRECTORY = (/home/gpadmin/GPDB/data/d1/home /gpadmin/GPDB/data/d2) MASTER_HOSTNAME = mdwMASTER_DIRECTORY =/home/gpadmin/GPDB/data/masterMASTER_PORT = export = bytes = 8 ENCODING = unicode1__port_base = bytes = 51000 declare-a pai_data_directory = (/home/gpadmin/ GPDB/data/m1/home/gpadmin/GPDB/data/m2)
3) Data Initialization
Su-gpadmin
[Gpadmin @ mdw install] $ gpinitsystem-c gpinitsystem_config-h notes

Vi. bashrc
# Greenplumexport MASTER_DATA_DIRECTORY =/data/master/gpseg-1
Vi $ MASTER_DATA_DIRECTORY/pg_mirror.conf
Host all 0/0 md5
3) Data Initialization
Su-gpadmin
[Gpadmin @ mdw install] $ gpinitsystem-c gpinitsystem_config-h notes

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.