-
-
Save yong93/5cd2e6fc45f88ab67d09d0629d8c8d3a to your computer and use it in GitHub Desktop.
Install Greenplum 4.3.2.0 on Centos 6.5 and run in two segment single node mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
su - root | |
# gpinitsystem fails to change the postgresql.conf port setting without ed | |
yum install ed unzip -y | |
groupadd -g 8000 gpadmin | |
useradd -m -s /bin/bash -d /home/gpadmin -g gpadmin -u 8000 gpadmin | |
passwd gpadmin | |
mkdir -p /data/master | |
mkdir -p /data/seg1 | |
mkdir -p /data/seg2 | |
mkdir -p /data/greenplum | |
chown -R gpadmin:gpadmin /data | |
wget http://files.mon01.lan/share/greenplum-db-4.3.2.0-build-1-RHEL5-x86_64.zip -P /tmp/ | |
unzip /tmp/greenplum-db-4.3.2.0-build-1-RHEL5-x86_64.zip -d /tmp/ | |
sh /tmp/greenplum-db-4.3.2.0-build-1-RHEL5-x86_64.bin | |
# set installation path to /data/greenplum | |
rm -f /tmp/greenplum-db-4.3.2.0-build-1-RHEL5-x86_64.* | |
cp /etc/sysctl.conf /etc/sysctl.conf.pre_greenplum | |
echo " | |
# Added during Greenplum install | |
kernel.shmall = 4000000000 | |
net.ipv4.tcp_max_syn_backlog = 4096 | |
vm.overcommit_memory = 2 | |
net.core.netdev_max_backlog = 10000 | |
kernel.sem = 250 64000 100 512 | |
net.ipv4.ip_local_port_range = 1025 65535 | |
net.ipv4.tcp_tw_recycle = 1 | |
" >> /etc/sysctl.conf | |
sysctl -p /etc/sysctl.conf | |
cp /etc/security/limits.conf /etc/security/limits.conf.pre_greenplum | |
echo " | |
# Added during Greenplum install | |
* soft nofile 65536 | |
* hard nofile 65536 | |
* soft nproc 131072 | |
* hard nproc 131072 | |
" >> /etc/security/limits.conf | |
exit | |
su - gpadmin | |
echo "source /data/greenplum/greenplum_path.sh | |
export MASTER_DATA_DIRECTORY=/data/master/gpsne-1" > /home/gpadmin/.bash_profile | |
source /home/gpadmin/.bash_profile | |
echo "$(hostname)" > /home/gpadmin/single_hostlist | |
echo "ARRAY_NAME=\"GPDB SNE\" | |
MACHINE_LIST_FILE=/home/gpadmin/single_hostlist | |
SEG_PREFIX=gpsne | |
PORT_BASE=50000 | |
declare -a DATA_DIRECTORY=(/data/seg1 /data/seg2) | |
MASTER_HOSTNAME=$(hostname) | |
MASTER_DIRECTORY=/data/master | |
MASTER_PORT=5432" > /home/gpadmin/gp_init_singlenode | |
gpssh-exkeys -f /home/gpadmin/single_hostlist | |
gpcheckos -f /home/gpadmin/single_hostlist | |
gpinitsystem -c /home/gpadmin/gp_init_singlenode | |
ps -ef | egrep "(postgres|greenplum)" | grep -v "egrep" | |
gpstate | |
gpstop | |
gpstart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment