DEV Community

Cover image for Easy Installation of PostgreSQL, AGE & Age-viewer on Mac
Maruf13
Maruf13

Posted on • Updated on

Easy Installation of PostgreSQL, AGE & Age-viewer on Mac

Follow below steps to install age correctly on macbook pro m1 or any other mac:

  • Create a folder where you want to store all source code. In this folder, you need 3 source code such as: (i) postgresql version 11/12 source code (ii) age source code (iii) age-viewer source code

  • (i) download postgresql from this link and store it on that folder.
    (ii) download age from this link and store on that folder
    (iii) download age-viewer from this link and store on that same folder.
    goto postgresql folder & open terminal on it & run command like as:

./configure --enable-debug --enable-cassert --prefix=$(pwd) CFLAGS="-glldb -ggdb -Og -g3 -fno-omit-frame-pointer"
make install
Enter fullscreen mode Exit fullscreen mode

those are the two command to install postgresql.

  • after that goto age folder & open terminal on it & run command like as:
sudo make PG_CONFIG=~/Your_base_folder_path/postgresql/bin/pg_config install
make PG_CONFIG=~/Your_base_folder_path/postgresql/bin/pg_config installcheck
Enter fullscreen mode Exit fullscreen mode
  • goto postgresql folder & open terminal on it & run command like as:

bin/initdb demo

  • goto demo folder inside postgresql folder and open postgresql.conf file & we need add three words here such as:
  1. port = 5432 /remove # from port number/
  2. #search_path = 'ag_catalog,"$user", public' // addding 'ag_catalog' to this path
  3. #shared_preload_libraries = 'age' //add age in inverted commas.
  • Now start the server and make a database named demodb
  1. bin/pg_ctl -D demo -l logfile start
  2. bin/createdb demodb
  • AGE added to postgresql successfully. Now we can enter in to pg_sql console to start testing.

bin/psql demodb

thats the process.

  • To install age-viewer, goto age-viewer folder and open terminal & run below command:

npm run setup

npm run start

  • then fill up the connection data like below:
url: localhost;

port: 5430;

username: sakibadnan; //use your username

# radom pass as password is not set for this user.
pass: 1234;

dbname: demodb;
Enter fullscreen mode Exit fullscreen mode

installation

References:

  1. https://age.apache.org/
  2. https://github.com/apache/age
  3. https://github.com/apache/age-viewer

Top comments (0)