在 ARM 架构服务器上编译 Greenplum6并制作rpm安装包
Greenplum 是一款开源MPP数据分析平台,提供包括数据分析、机器学习和人工智能等特色功能。目前 Greenplum 的二进制发行版本只能运行在 X86 服务器。github上的Greenplum releases只有x86的发行版,没有提供ARM 发行版。Greenplum 是开源软件,我们可以通过编译 Greenplum 源代码自行构建 Greenplum 的 ARM 版本。本文将详细讲述如何在 ARM 服务器上编译并打包开源版 Greenplum。编译环境:CentOS Linux release 7.6.1810 (AltArch)需要提前准备OS镜像、python依赖包、cmake、zstd-dev、Xerces、re2c、ninja、gporca等源码包配置编译环境,另外Greenplum编译需要Greenplum源码包。gp-xerces-3.1.2-p1.tar.gzgreenplum-6.9.1-src-full.tar.gz#yum -y install curl-devel bzip2-devel python-devel openssl-devel readline-devel perl-ExtUtils-Embed libxml2-devel openldap-devel pam pam-devel perl-devel apr-devel libevent-devel libyaml libyaml-devel libedit-devel libffi-devel# python setup.py install# python setup.py install# python setup.py install# python setup.py install# python setup.py install# python setup.py install# python setup.py install# python setup.py install# python setup.py install# python setup.py install# python setup.py install# python setup.py install# python setup.py install# python setup.py install# /usr/local/bin/cmake --version# ./configure.py --bootstrap# cmake -GNinja -H. -Bbuild# vi libgpos/src/common/CStackDescriptor.cpp# echo /usr/local/lib >/etc/ld.so.conf# ./configure --with-perl --with-python --with-libxml --prefix=/usr/local/gpdb如果make成功了,就可以开始制作rpm安装包了。mkdir -p ~/rpmbuild/BUILD ~/rpmbuild/RPMS ~/rpmbuild/BUILDROOT ~/rpmbuild/SRPMS ~/rpmbuild/SOURCES ~/rpmbuild/SPECSvi ~/rpmbuild/SPECS/greenplum6.9.1.spec修改greenplum源代码目录名为greenplum-6.9.1并压缩:mv gpdb_src greenplum-6.9.1tar czvf greenplum-6.9.1.tar.gz greenplum-6.9.1把greenplum源码包复制到rpmbuild源代码目录cp greenplum-6.9.1.tar.gz ~/rpmbuild/SOURCES/rpmbuild -ba ~/rpmbuild/SPECS/greenplum6.9.1.spec