DEV Community

Cover image for Apache AGE Installation Guide (Linux)
Sadeed Ahmad
Sadeed Ahmad

Posted on

Apache AGE Installation Guide (Linux)

This is a guide divided into multiple parts aimed at setting up Apache AGE and PostgreSQL on your Linux OS using the source code.

Establishing Directories and Installing Dependencies

Create directories to save and install AGE and PostgreSQL.

mkdir age_installation
cd age_installation
mkdir pg
cd pg
Enter fullscreen mode Exit fullscreen mode

Dependencies

Dependencies are resolved before the installation is to be commenced.

sudo apt-get install build-essential libreadline-dev zlib1g-dev flex bison
Enter fullscreen mode Exit fullscreen mode

Development files for PostgreSQL server-side programming are also installed.

sudo apt install postgresql-server-dev-11
Enter fullscreen mode Exit fullscreen mode

Installing PostgreSQL From Source

An AGE-compatible version of Postgres i.e postgres 11 and 12 are downloaded and extracted in the working directory.

wget https://ftp.postgresql.org/pub/source/v11.18/postgresql-11.18.tar.gz && tar -xvf postgresql-11.18.tar.gz && rm -f postgresql-11.18.tar.gz
Enter fullscreen mode Exit fullscreen mode

Once the download is complete, PostgreSQL is installed.

cd postgresql-11.18

# configure by setting flags
./configure --enable-debug --enable-cassert --prefix=$(pwd) CFLAGS="-ggdb -Og -fno-omit-frame-pointer"

# now install
make install

# go back
cd ../../
Enter fullscreen mode Exit fullscreen mode

Installing AGE

AGE is downloaded and installed from the Apache AGE GitHub repository.

git clone https://github.com/apache/age.git
Enter fullscreen mode Exit fullscreen mode
cd age/

# install
sudo make PG_CONFIG=/home/tukl/age_installation/pg/postgresql-11.18/bin/pg_config install

# install check
make PG_CONFIG=/home/tukl/age_installation/pg/postgresql-11.18/bin/pg_config installcheck
Enter fullscreen mode Exit fullscreen mode

PG_CONFIG requires the path to the pg_config file. Give the path from the recently installed PostgreSQL.

Concluding Remarks

Apache AGE and PostgreSQL has been successfully installed from source on your Linux machine.

Top comments (0)