nordvpn

Install PostgreSQL 11 on Amazon Linux (Compile)

Install PostgreSQL 11 on Amazon Linux 11 (Compile)

In this, we will show you how to install PostgreSQL 11 on Amazon EC2. In this tutorial, I will install PostgreSQL 11 by compiling because postgreSQL 11 is not available for Amazon Linux. So let’s get started.

Step 1: Prerequisites

There are a few prerequisites. Let’s install them before starting installing PostgreSQL.

yum install wget tar gcc make

Step 2: Download the Archive

First of all, download the archive and untar it so we can compile it.

wget https://ftp.postgresql.org/pub/source/v11.5/postgresql-11.5.tar.gz

Step 3: Extract the archive

Now, let’s extract the archive quickly using tax command.

tar -zxvf postgresql-11.5.tar.gz

Step 4: Compile

So now we have extracted the archive so we can compile it.

cd postgresql-11.5/

./configure --without-readline --without-zlib
make
make install

Step 5: Symlink

Now in the last step lets create a symlink

ln -s /usr/local/pgsql/bin/psql /usr/bin/psql

# psql --version
psql (PostgreSQL) 11.5

 

7 Comments Posted

  1. Hi Chetan,

    I am new to linux , and was struggling to install POSTGRESQL from past 3 days. Thanks a ton.

    Regards

    Vinay Nair

Leave a Reply

Your email address will not be published.


*



The reCAPTCHA verification period has expired. Please reload the page.

48-Hour Flash Sale! Courses from just $10.99