暂无图片
暂无图片
暂无图片
暂无图片
暂无图片
Greenplum编译安装和调试
838
15页
3次
2022-07-27
5墨值下载
Greenplum 编译安装和调试
本文先介如何从源代码编译安装Greenplum、初始化Greenplum集群。然后介SQL
Greenplum中的典型行路径,最后介一些调试技巧。
源代使用 Greenplum 开源社区最新源代 6X_STABLE 分支:
https://github.com/greenplum-db/gpdb,内核代基于 PostgreSQL 9.4。目前(2019/04/23)
干分支的代基于 PostgreSQL 9.4。合并到 PostgreSQL 9.5 的工作也已开始,有关最新工作
https://github.com/greenplum-db/gpdb-postgres-merge
1. 从源代码编译 Greenplum
Greenplum 目前官方支持 Redhat/Centos/SuSE/Ubuntu Linux。大量开包括我自己
使用Mac,但是不在官方支持列表中。
1.1 Mac 编译
首先需要关苹果操作系 SIP 特性,否无法初始化集群。
1. 重启操作系
2. 重启程中按下 command+R 入恢复模式
3. Utilities 单选择 Terminal
4. csrutil disable
5. 重启操作系
// 安装Greenplum管理脚本依 Python
$ wget https://bootstrap.pypa.io/get-pip.py
$ sudo python get-pip.py
$ sudo pip install psutil lockfile paramiko setuptools epydoc
// 需要安装 openssl,否无法编译
$ brew install openssl && brew link openssl --force
$ CPPFLAGS="-I/usr/local/include/ -I/usr/local/opt/openssl/include" \
LDFLAGS="-L/usr/local/lib -L/usr/local/opt/openssl/lib" \
CFLAGS="-O0 -g3 -ggdb3" \
./configure --with-perl --with-python --with-libxml \
--enable-debug --enable-cassert --disable-orca --disable-gpcloud \
--disable-gpfdist --prefix=$HOME/gpdb.master
$ make [-j4]
$ make install
在苹果系上初始化Greenplum单节点集群,需要做些准工作:
添加export PGHOST=localhost~/.bash_profile
将本机的hostname127.0.0.1map写到/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
of 15
5墨值下载
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文档的来源(墨天轮),文档链接,文档作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论

关注
最新上传
暂无内容,敬请期待...
下载排行榜
Top250 周榜 月榜