Logo

dev-resources.site

for different kinds of informations.

Apache AGE Complete Installation Guide - Part 2 ( PostgreSQL )

Published at
6/11/2023
Categories
age
database
postgres
graphs
Author
davidgeorgem
Categories
4 categories in total
age
open
database
open
postgres
open
graphs
open
Author
12 person written this
davidgeorgem
open
Apache AGE Complete Installation Guide - Part 2 ( PostgreSQL )

If you are a Windows user, don't miss Part 1 of this Guide ( WSL tool ) as we will build this blog considering you are using a Linux Terminal.

we start working through this blog from here,

Linux terminal

3. Installing PostgreSQL
As we mention before AGE is a PostgreSQL extension so we must first have PostgreSQL installed before installing AGE itself.

Important Notes :

  • from age GitHub repo "For now AGE supports Postgres 11, 12 & 13. Supporting the latest versions is on AGE roadmap.", so we can only use it on top of one of those versions ( which means currently not officially compatible with 14, 15, 16 beta) versions on this blog date.

  • Mainly the Master branch of the AGE GitHub repository supports PG11 ( PostgreSQL Major version 11 )

  • If you want to use PG12 you have to switch to the "AGE_PG12.1.0_ALPHA" branch of the age repo ( the master branch is incompatible with PG11 )

  • for this tutorial, we will use PG11 ( Major 11, Minor 20, 11.20 Latest minor for this version ) and the source of the master branch in the AGE repo.

let's start,
first of all, we cannot do it like,
sudo apt install postgresql

installing latest PG

, as this will get the latest version of PostgreSQL according to the current distro information.
in my case, it gets the PG15, which we cannot use AGE on yet.

we need to download a specific version ( for our case here PG11 ), so we specify the version to it as,
sudo apt install postgresql-11

for me, this doesn't work from the first try, for a time I was facing the "unable to locate package postgresql-11" error on trying it, and after reviewing the PG documentation I come up with a solution to this error.

to resolve this we do the following commands in order,

  • sudo apt install curl ca-certificates gnupg
  • url https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null
  • sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
  • sudo apt update

After that, we can continue our installation and specify the desired version as we mentioned before and now it works fine with no errors ,

Specify the version on installing PG

but for our case, we need the PG11 one so do it as ,

sudo apt install postgresql-11 ,

After installation is complete we can check for it using the following command,
pg_config

PG_CONFIG

and to make sure that it's the needed version we check the VERSION ,

PG_CONFIG version

then to test it we can use psql ( PostgreSQL interactive terminal ) by,
sudo -u postgres psql

psql

what's psql ?

  • psql is a terminal-based front-end to PostgreSQL.
  • It enables you to type in queries interactively, issue them to PostgreSQL, and see the query results. Alternatively, the input can be from a file or command line arguments. In addition, psql provides several meta-commands and various shell-like features to facilitate writing scripts and automating a wide variety of tasks.

Okay, Now we have done installing the PostgreSQL through the Linux terminal and with the specified version we need, and we are ready for our last step from this tutorial, which is installing AGE and trying it.

graphs Article's
30 articles in total
Favicon
Converting Plotly charts into images in parallel
Favicon
TeeChart Charting Libraries use cases
Favicon
Graphs, Data Structures
Favicon
Navigating the Evolution of AI in Cybersecurity: Insights from Mastercard at #RiskX 2023
Favicon
Graph Coloring Problem: Cracking Complexity with Elegant Solutions
Favicon
Personal Knowledge Graphs in Relational Model
Favicon
Closing a chapter
Favicon
Grouping algorithm
Favicon
Priority Queue vs Set
Favicon
Algorithmic Alchemy: Exploiting Graph Theory in the Foreign Exchange
Favicon
Apache AGE: Unique Use Cases
Favicon
Efficient Representation of Relationships with Graph Databases
Favicon
Crafting Mazes with Graph Theory
Favicon
Embracing the Power of Graph Databases
Favicon
Exploring Graph Visualisation with Apache AGE: Unveiling Hidden Insights
Favicon
Introductory Concepts in Network Analysis
Favicon
AGE PG15/16 New updates
Favicon
Does your APP need Apache AGE?
Favicon
10 Reasons Why to use Apache AGE alongside PostgreSQL
Favicon
Apache AGE Complete Installation Guide - Part 3 and Last ( AGE )
Favicon
Apache AGE Complete Installation Guide - Part 2 ( PostgreSQL )
Favicon
Importing graph from files
Favicon
Introduction to Apache AGE: Exploring the Capabilities
Favicon
How to create and plot graphs in Python
Favicon
AWS Neptune for analysing event ticket sales between users - Part 1
Favicon
Apache AGE, Why you should use it
Favicon
Unleashing the Power of Data Analytics with Apache AGE: The Synergy of Graph Databases and Machine Learning - Part 1
Favicon
Just a super easy flowchart
Favicon
The Power of Graph Databases: Unlocking the Potential of Connected Data
Favicon
How to read a histogram?

Featured ones: