Install and Configure Greenplum Database Note: The CentOS 7 minimal install does not provide two utilities needed by the GP install routines ● ifconfig (run “yum install nettools” as root) ● ed (run “yum install ed” as root) As root: Configure Networks CentOS 6: Edit /etc/sysconfig/networkscripts/ifcfgethX Edit /etc/sysconfig/network to change the hostname service network restart ifconfig a to verify network enabled CentOS 7: nmtui Choose “Automatic” in IPv4 CONFIGURATION. Choose Automatic Connect check box. Press OK and quit Network manager. hostnamectl sethostname
hostnamectl status systemctl restart network ————————————————————————————————————————————————————————————————————— Disable IPv6 on All Servers CentOS 6/7: echo 'net.ipv6.conf.default.disable_ipv6=1' >> /etc/sysctl.conf echo 'net.ipv6.conf.all.disable_ipv6 = 1' >> /etc/sysctl.conf sysctl p ————————————————————————————————————————————————————————————————————— Add smdw, sdw 1N data nodes to /etc/hosts on the master. Create /tmp/segs file with db segment server names. Make sure the host names match the names in /etc/hosts and the actual server names. —————————————————————————————————————————————————————————————————————
gscp #!/bin/bash FILE1="$1" FILE2="$2" while read HOST ; do scp "$FILE1" root@"$HOST":"$FILE2" < /dev/null; done < /tmp/segs ————————————————————————————————————————————————————————————————————— gssh #!/bin/bash COMMAND="$1" while read HOST ; do ssh $HOST "$COMMAND" < /dev/null; done < /tmp/segs ————————————————————————————————————————————————————————————————————— Create ssh keys and distribute to all nodes in the cluster. Add public key to authorized_keys on the master. [root@localhost ~]# sshkeygen t rsa Generating public/private rsa key pair. cat /tmp/segs | while read hostname c do sshcopyid "$hostname" done On the Master, as root: cd .ssh cp id_rsa.pub authorized_keys chmod 600 authorized_keys —————————————————————————————————————————————————————————————————————
Check IP Tables status: CentOS 6: /sbin/chkconfig list iptables CentOS 7: systemctl status firewalld Disable IP Tables: CentOS 6: /sbin/chkconfig iptables off CentOS 7: systemctl stop firewalld; systemctl disable firewalld; systemctl status firewalld ————————————————————————————————————————————————————————————————————— Check and Disable SE Linux Status: CentOS 6/7: sestatus CentOS 6/7: sed i 's/enforcing/disabled/g' /etc/selinux/config ————————————————————————————————————————————————————————————————————— Disable transparent_hugepage and set elevator to deadline: CentOS 6: sed i 's/ro root/transparent_hugepage=never elevator=deadline ro root/g' /boot/grub/grub.conf CentOS 7: grubby updatekernel=ALL args="elevator=deadline" vi /etc/rc.d/rc.local if test f /sys/kernel/mm/transparent_hugepage/enabled; then echo never > /sys/kernel/mm/transparent_hugepage/enabled fi if test f /sys/kernel/mm/transparent_hugepage/defrag; then echo never > /sys/kernel/mm/transparent_hugepage/defrag fi chmod u+x /etc/rc.d/rc.local —————————————————————————————————————————————————————————————————————
Set the parameters in the /etc/sysctl.conf file as per the install guide. Set the parameters in the /etc/security/limits.conf file as per the install guide. ————————————————————————————————————————————————————————————————————— Disable IPC object removal for RHEL 7.2 or CentOS 7.2. sed i 's/#RemoveIPC=yes/RemoveIPC=no/g' /etc/systemd/logind.conf grep RemoveIPC /etc/systemd/logind.conf Reboot ————————————————————————————————————————————————————————————————————— Install GPDB software on the Master: [root@localhost tmp]# ./greenplumdb4.3.7.1build1RHEL5x86_64.bin Install GPDB software on remaining nodes: source /usr/local/greenplumdb/greenplum_path.sh gpseginstall f /tmp/segs u gpadmin p ————————————————————————————————————————————————————————————————————— Configure Data Directories
On the Master: mkdir /data chown gpadmin:gpadmin /data mkdir /data/master chown gpadmin:gpadmin /data/master On the Data Nodes: gpssh f /tmp/segs e 'mkdir /data' gpssh f /tmp/segs e 'chown gpadmin:gpadmin /data' gpssh f /tmp/segs e 'mkdir /data/primary' gpssh f /tmp/segs e 'mkdir /data/mirror' gpssh f /tmp/segs e 'chown gpadmin:gpadmin /data/primary' gpssh f /tmp/segs e 'chown gpadmin:gpadmin /data/mirror' ————————————————————————————————————————————————————————————————————— Create Configuration File & Initialize the Database su gpadmin Add the following to the .bashrc file: source /usr/local/greenplumdb/greenplum_path.sh export MASTER_DATA_DIRECTORY=/data/master/gpseg1 set o vi alias ll='ls al' cp $GPHOME/docs/cli_help/gpconfigs/gpinitsystem_config $HOME chmod 660 gpinitsystem_config Edit the gpinitsystem_config file to configure the DB cluster. gpinitsystem c gpinitsystem_config locale=C lccollate=C lcctype=C lcmonetary=en_US.utf8 lcnumeric=en_US.utf8 —lctime=en_US.utf8 —————————————————————————————————————————————————————————————————————
Install and Configure GP Command Center As root: Copy the latest greenplumccwebx.x.xbuild32RHEL5x86_64.zip to the Master and run the installer. ./greenplumccwebx.x.xbuild32RHEL5x86_64.bin su gpadmin Add to the .bashrc file: source /usr/local/greenplumccweb/gpcc_path.sh export GPPERFMONHOME=/usr/local/greenplumccweb Run the Collection Agent installer: gpperfmon_install enable password port 5432 Restart the GPDB Instance: gpstop r Verify the Data Collection processes are running: psql gpperfmon c 'SELECT * FROM system_now;' Set up Command Center Instance gpcmdr setup gpcmdr start
http://gpdbmaster:28080/ To Shut Down Command Center Instance gpcmdr stop