Build Greengage DB from the source code
This topic describes how to build Greengage DB (based on Greenplum) on Linux operating systems. The source code for Greengage DB is available in the greengage repository. This repository also includes scripts to help you install the dependencies required to build Greengage DB on the required platform.
Prerequisites
Before installing Greengage DB, ensure that the host meets all requirements described in Pre-installation configuration.
To follow the steps described in this document, you need one of the following operating systems:
-
Ubuntu 22.04 or 24.04.
-
CentOS 7.9.
For both operating systems, make sure you have git installed.
Clone the Greengage DB repository
-
Ensure you are logged in as a user with
sudoprivileges. -
Clone the greengage repository, specifying the required tag and including submodules:
$ git clone \ --branch 6.30.1 \ --recurse-submodules \ https://github.com/GreengageDB/greengage.git -
Change the current directory to greengage:
$ cd greengage
Install the dependencies
This section describes installing the dependencies required to build Greengage DB on different operating systems.
-
Execute the README.ubuntu.bash script to install the dependencies:
$ sudo ./README.ubuntu.bash -
Create a symbolic link from python2 to /usr/bin/python:
$ sudo ln -s python2 /usr/bin/python
Execute the README.ubuntu.bash script to install the dependencies:
$ sudo -E PIP_BREAK_SYSTEM_PACKAGES=1 ./README.ubuntu.bash
Ubuntu 24.04 enforces restrictions on system-wide Python package installations.
To override this behavior, use the PIP_BREAK_SYSTEM_PACKAGES environment variable.
Execute the README.CentOS.bash script to install the dependencies:
$ sudo ./README.CentOS.bash
Generate the en_US.UTF-8 locale
Ensure that the en_US.UTF-8 locale is generated and available on the host.
Generate the locale if it is not already present:
$ sudo locale-gen "en_US.UTF-8"
Build and install Greengage DB
-
Ensure you are in the greengage directory.
-
Configure the build environment as follows to build Greengage DB:
$ ./configure \ --with-perl \ --with-python \ --with-pythonsrc-ext \ --with-libxml \ --with-uuid=e2fs \ --with-openssl \ --with-gssapi \ --with-ldap \ --enable-ic-proxy \ --enable-orafce \ --enable-mapreduce \ --prefix=/usr/local/gpdbNOTETo see all the available build options, run
./configure --help. -
(Optional) To ensure a clean build, especially when compiling a new version of Greengage DB or after previous builds, execute
make clean:$ make clean -
Compile Greengage DB using
make:$ make -j$(nproc)If the compilation is finished successfully, the output should contain this information:
... All of Greengage Database successfully made. Ready to install.
-
Install Greengage DB using
make install:$ sudo make -j$(nproc) installIf the installation is successful, the output should contain this information:
... Greengage Database installation complete.
-
Change the owner and group of the installed files to
gpadmin:$ sudo chown -R gpadmin:gpadmin /usr/local/gpdb* $ sudo chgrp -R gpadmin /usr/local/gpdb*
Set the Greengage DB path
-
Switch to the gpadmin user:
$ sudo su - gpadmin -
Set the Greengage DB path and environment variables as follows:
$ source /usr/local/gpdb/greengage_path.shNOTEAdd the above
sourcecommand to thegpadminuser’s shell startup file (for example, .bashrc). This ensures that the Greengage DB path and environment variables are set each time you log in asgpadmin.
Set up a demo cluster
Once Greengage DB is installed, you can proceed to Set up a Greengage DB demo cluster to create a demo environment for testing and exploring DBMS features.