1. Download Greenplum Database Source code
$ git clone https://github.com/greenplum-db/gpdb
2. Installing dependent libraries
The Greenplum database compiles and runs on a variety of system libraries and Python libraries. These dependencies need to be installed first.
$ sudo yum install curl-devel bzip2-devel python-devel openssl-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-env # If need Installcheck-good
$ wget https://bootstrap.pypa.io/get-pip.py
$ sudo python get-pip.py
$ sudo pip install psi lockfile Paramiko setuptools Epydoc
3. Compile Greenplum Database source code and install
Assuming installation into the $HOME/gpdb.master directory
$./configure--prefix=/home/gpadmin/build/gpdb.master--with-gssapi--with-pgport=5432--with-libedit-preferred-- With-perl--with-python--with-openssl--with-pam--with-krb5--with-ldap--with-libxml--enable-cassert-- Enable-debug--enable-testutils--enable-debugbreak--enable-depend
$ make
$ make Install
4. Initializing the Greenplum Database cluster
After the binaries are installed, the DB cluster needs to be initialized. The following installs a gpdb cluster on a laptop. The cluster consists of a master, two segment.
$ source $HOME/gpdb.master/greenplum_path.sh
$ Gpssh-exkeys-h ' hostname '
4.1 Generating three configuration files
$ vim env.sh
SOURCE $HOME/gpdb.master/greenplum_path.sh
Export pgport=5432
Export master_data_directory= $HOME/data/master/gpseg-1
$ vim Hostfile
<your_hostname>
$ vim Gp_config
Array_name= "Open Source gpdb"
Seg_prefix=gpseg
port_base=40000
# Modify the following path and host name as needed
Declare-a data_directory= (/path/to/your/data/path/to/your/data)
Master_hostname=your_hostname
Master_directory=/path/to/your/data/master
master_port=5432
Trusted_shell=ssh
Check_point_segments=8
Encoding=unicode
Machine_list_file=hostfile
4.2 Initializing gpdb Cluster
$ source Env.sh
$ gpinitsystem-c Gpinitsystem_config-a
After the initialization succeeds, run the command to verify the system status:
$ psql-l
$ gpstate
Install Greenplum under Linux