● 添加export PGHOST=localhost至~/.bash_profile
● 将本机的hostname与127.0.0.1的map写到/etc/hosts中。例如
127.0.0.1 yydzero yydzero.local
● 修改/etc/sysctl.conf文件,并重启:
kern.sysv.shmmax=2147483648
kern.sysv.shmmin=1
kern.sysv.shmmni=64
kern.sysv.shmseg=16
kern.sysv.shmall=524288
kern.maxfiles=65535
kern.maxfilesperproc=65535
net.inet.tcp.msl=60
$ cd gpAux/gpdemo
$ source $HOME/gpdb.master/greenplum_path.sh
$ export PGHOST=`hostname`
$ make
$ source gpdemo-env.sh
$ psql postgres
postgres# SELECT version()
有关更详细的信息请参考 README.macOS.md。
1.2 在 Redhat/Centos 系统上编译
本小节以 RHEL7 为例介绍如何编译Greenplum。
首先下载 Greenplum 源代码
$ git clone https://github.com/greenplum-db/gpdb
Greenplum Database 编译和运行依赖于各种系统库和Python库。需要先安装这些依赖:
$ sudo yum groupinstall 'Development Tools' # GCC, libtools etc
$ sudo yum install curl-devel bzip2-devel python-devel openssl-devel readline-devel
$ sudo yum install perl-ExtUtils-Embed # If enable perl
$ sudo yum install libxml2-devel # If enable XML support
$ sudo yum install openldap-devel # If enable LDAP
$ sudo yum install pam pam-devel # If enable PAM
$ sudo yum install perl-devel # If need installcheck-world
评论