参考博客
Greenplum ORCA 优化器的编译安装与使用
Greenplum编译环境搭建(CentOS 6.6)
configure: error: libsigar is required for gpperfmon
protoc编译安装
在centos7中手动编译greenplum
安装依赖包
yum install -y make gcc gcc-c++ glibc-static python-devel perl-ExtUtils-Embed \
readline-devel zlib-devel apr-devel apr-util-devel libevent-devel libxml2-devel \
libyaml-devel libcurl-devel bzip2-devel bison-devel flex-devel openssl-devel unzip zip
cmake
# tar -zvxf cmake-3.8.2.tar.gz
# cd cmake-3.8.2/
# mkdir build
# cd build
# ../configure
# make -j64 && make -j64 install
配置动态链接库
# vi /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/local/lib
/usr/local/lib64
配置生效
# ldconfig
zstd
# tar -zxvf zstd-1.4.4.tar.gz
# cd zstd-1.4.4/
# cd build/cmake/
# mkdir builddir
# cd builddir/
# cmake -D CMAKE_BUILD_TYPE=RELEASE ../
# make -j64 install
sigar
# unzip sigar-master.zip
# cd zsigar-master/
# mkdir build
# cd build/
# cmake -D CMAKE_BUILD_TYPE=RELEASE ../
# make -j64 install
protobuf
# tar -zxvf protobuf-all-3.11.2.tar.gz
# cd protobuf-3.11.2/
# cd build/
# ../configure
# make -j64
# make -j64 check
# make -j64 install
GPORCA编译
gpos
# tar -zvxf gpos-1.147.tar.gz
# cd gpos-1.147/
# mkdir build
# cd build/
# cmake -D CMAKE_BUILD_TYPE=RELEASE ../
# make -j64 install
gp-xerces
# tar -zvxf gp-xerces-3.1.2-p1.tar.gz
# cd gp-xerces-3.1.2-p1
# mkdir build
# cd build/
# ../configure
# make -j64 && make -j64 install
gporca
# tar -zxvf gporca-3.80.1.tar.gz
# cd gporca-3.80.1/
# mkdir build
# cd build/
# cmake -D CMAKE_BUILD_TYPE=RELEASE ../
# make -j64 && make -j64 install
gpdb编译
# export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64:$LD_LIBRARY_PATH
# tar -zvxf 6.1.0-src-full.tar.gz
# cd gpdb_src/
# ./configure --prefix=/root/greenplum-db-6.1.0 --enable-orca --enable-gpperfmon --enable-mapreduce \
--with-perl --with-python --with-libxml --with-openssl
# make -j32 && make -j32 install 2>&1 | tee gpmake.log
# cd /root/greenplum-db-6.1.0/lib
# cp -r /usr/local/lib/* .
# cp -r /usr/local/lib64/* .
golang安装
解压go版本包,拷贝到/usr/local
# tar -zxvf go1.13.5.linux-amd64.tar.gz
# cp -r go /usr/local/
配置环境变量
# vi /etc/profile
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GOBIN=$HOME/go/bin
export PATH=$PATH:$GOROOT/bin:$GOBIN
# source /etc/profile
配置用户环境变量
# vi .bashrc
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GOBIN=$HOME/go/bin
export PATH=$PATH:$GOROOT/bin:$GOBIN
# source .bashrc