Hello, I’m DocuDroid!
Submitting feedback
Thank you for rating our AI Search!
We would be grateful if you could share your thoughts so we can improve our AI Search for you and other readers.
GitHub

Build Greengage DB from the source code

Andrey Aksenov

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

  1. Ensure you are logged in as a user with sudo privileges.

  2. 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
  3. 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.

  1. Execute the README.ubuntu.bash script to install the dependencies:

    $ sudo ./README.ubuntu.bash
  2. 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

  1. Ensure you are in the greengage directory.

  2. 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/gpdb
    NOTE

    To see all the available build options, run ./configure --help.

  3. (Optional) To ensure a clean build, especially when compiling a new version of Greengage DB or after previous builds, execute make clean:

    $ make clean
  4. 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.
  5. Install Greengage DB using make install:

    $ sudo make -j$(nproc) install

    If the installation is successful, the output should contain this information:

    ...
    Greengage Database installation complete.
  6. 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

  1. Switch to the gpadmin user:

    $ sudo su - gpadmin
  2. Set the Greengage DB path and environment variables as follows:

    $ source /usr/local/gpdb/greengage_path.sh
    NOTE

    Add the above source command to the gpadmin user’s shell startup file (for example, .bashrc). This ensures that the Greengage DB path and environment variables are set each time you log in as gpadmin.

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.