源码编译安装greenplum 5.0

借鉴:http://www.cnblogs.com/scoter2008/p/5928972.html


基于Centos 7


编译前的准备工作:

关闭防火墙

systemctl start firewalld.service#启动firewall
systemctl stop firewalld.service#停止firewall
systemctl disable firewalld.service#禁止firewall开机启动
systemctl enable firewalld.service#允许firewall开机启动

关闭selinux

sed -i '/SELINUX/s/enforcing/disabled/' /etc/selinux/config

 在/etc/sysctl.conf文件中加入有关共享内存与网络参数配置

net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 1
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.msgmni = 2048
kernel.sem = 250 512000 100 2048
kernel.shmmax = 1073741824
kernel.shmmni = 4096
kernel.shmall = 4194304
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_max_syn_backlog = 4096
net.ipv4.ip_local_port_range = 1025 65535
net.core.netdev_max_backlog = 10000
vm.overcommit_memory = 2
net.ipv4.conf.all.arp_filter = 1
net.core.rmem_max = 2097152
net.core.wmem_max = 2097152
net.core.somaxconn = 1024

在/etc/security/limits.conf中加入限制参数

* soft nofile 65536
* hard nofile 65536
* soft nproc 131072
* hard nproc 131072
执行sysctl -p让配置生效


安装greenplum所需的库

yum install -y curl-devel bzip2-devel python-devel openssl-devel wget perl-ExtUtils-Embed libxml2-devel openldap-devel pam pam-devel
yum install -y gcc-c++ libtool libaio bison vim-common.x86_64 vim-enhanced.x86_64 flex net-tools.x86_64 apr-devel readline-devel libevent-devel
安装python库

wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
pip install psi lockfile paramiko setuptools epydoc psutil
pip install --upgrade setuptools


创建用户gpadmin:

useradd gpadmin


configure源码,进入源码目录:

./configure --prefix=/usr/local/greenplum-5.0 --with-gssapi --with-pgport=9900 --with-libedit-preferred --with-perl --with-python --with-openssl --with-pam --with-krb5 --with-ldap --with-libxml --enable-cassert --enable-debug --enable-testutils --enable-debugbreak --enable-depend --

make -j20

make install

之后使用root用户执行:chown -R -v gpadmin:gpadmin  /usr/local/greenplum-5.0

进入gpadmin用户:

su gpadmin

echo '. /usr/local/gp-5.0/greenplum_path.sh' >> ~:.bashrc
echo 'export MASTER_DATA_DIRECTORY=/home/gpadmin/master/gpseg-1' >> ~.bashrc



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值