参考:
整体流程
源码包
https://github.com/greenplum-db/gpdb/releases
安装依赖(GP6)
bash README.CentOS.bash
报错:
Error: Unable to find a match: libyaml-devel python-devel python-pip
解决方法 - 单独安装不存在的包:
yum install python2
yum install python2-devel
ln -s /usr/bin/python2 /usr/bin/python
ln -s /usr/bin/pip2 /usr/bin/pip
yum install libyaml.x86_64
cp README.CentOS.bash README.CentOS.bash1
vi README.CentOS.bash1
# 删除
python-devel \
python-pip \
libyaml-devel \
# 通过-i指定pip源,否则经常出现timeout
pip install conan -i https://pypi.mirrors.ustc.edu.cn/simple/
pip install -r python-dependencies.txt -i https://pypi.mirrors.ustc.edu.cn/simple/
pip install -r python-developer-dependencies.txt -i https://pypi.mirrors.ustc.edu.cn/simple/
安装依赖(GP7.0 beta)
如果是gp7版本,则依赖python3而非python2
与上述GP6主要区别
README.CentOS.bash
. python依赖python3
python3-devel \
python3-pip \
. 不需要
####ln -s /usr/bin/python3 /usr/bin/python
####ln -s /usr/bin/pip3 /usr/bin/pip
. 依赖postgresql(下面python-dependencies.txt中pygresql依赖它)
postgresql \
postgresql-devel
. python-dependencies.txt中依赖的python包更少,且psutil版本要求不同
. 增加了一些配置/etc/sysctl.conf,limits.d
新的参数???
vm.overcommit_memory = 2
vm.overcommit_ratio = 95
configure
./configure --with-perl --with-python --with-libxml --with-gssapi --prefix=/usr/local/gpdb --disable-orca
// GP7.0 beta可以不带--disable-orca,编译没问题
// gp6 centos8下开orca有可能有问题,详见下面。
yum install cmake3
configure
make -j8
make install -j8
问题:
centos8下,打开orca编译,有时候会遇到编译错误。主要原因是orca依赖的xerces-c-devel库的某些版本是c++11标准上编译的,而gp6为了解决某些c++中的空指针问题,强制设置为c++98标准。解决办法是手动修改为c++11标准
出错类似下面:
/usr/include/c++/8/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support \
/usr/include/xercesc/sax2/ContentHandler.hpp:105:17: error: ‘XMLCh’ does not name a type
解决方法
vi "src/backend/gpopt/gpopt.mk"
- override CPPFLAGS := -std=c++98 $(CPPFLAGS)
+ override CPPFLAGS := -std=gnu++11 $(CPPFLAGS)
vi "src/backend/gporca/gporca.mk"
- override CPPFLAGS := -std=gnu++98 $(CPPFLAGS)
+ override CPPFLAGS := -std=gnu++11 $(CPPFLAGS)
非标准功能 - gpprofmon支持
https://github.com/greenplum-db/gpdb/wiki/Gpperfmon-Overview
./configure --enable-debug --enable-depend --with-perl --with-python --with-libxml --with-gssapi --enable-gpperfmon --prefix=/usr/local/gpdb
yum install apr-util-devel
checking for library containing event_add... (cached) -levent
checking for library containing apr_queue_push... none required
checking for library containing sigar_open... no
configure: error: libsigar is required for gpperfmon
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。