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.
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.
./configure --without-readline --without-zlib
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
this just saved my ass, thank you so much
I am glad that it helped you. Thanks for commenting.
Solve my problem.. Great Job.
This worked well until the
command. I had to run that with sudo! Thanks for the post!
Thank you the ftp link did not work so I found version 12.2 and was able to install that version https://ftp.postgresql.org/pub/source/v12.2/
I am new to linux , and was struggling to install POSTGRESQL from past 3 days. Thanks a ton.
Thank you so much! I am glad it helped you.