Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing PostgreSQL Client v10 on AWS Amazon Linux (EC2) AMI

I have successfully launched new AWS RDS PostgreSQL v10 instance and need to install PostgreSQL v10 client on Amazon Linux EC2 instance.

I have tried to install it with yum, but it cant find the package for v10:

[ec2-user@ip-X-X-X-X ~]$ sudo yum install -y postgresql10 Loaded plugins: priorities, update-motd, upgrade-helper amzn-main      | 2.1 kB  00:00:00 amzn-updates  | 2.5 kB  00:00:00 No package postgresql110 available. Error: Nothing to do 

Previously I managed to install PostgreSQL client v9.5 with:

[ec2-user@ip-X-X-X-X ~]$ sudo yum install -y postgresql95 

I guess I need to add Postgres yum repository, as mentioned in https://www.postgresql.org/download/linux/redhat/. But what Platform should I choose for Amazon Linux? Red Hat?

like image 488
Ismar Slomic Avatar asked Mar 30 '18 11:03

Ismar Slomic


People also ask

Can I run a Postgres on EC2?

We use Postgres on EC2 only for our primary data store. As for reasons why we use EC2: Cost - Our primary data store has >1 Petabyte of raw data stored across dozens of Postgres instances. The amount of data we store is at the point where RDS is too expensive for us.

What is Amazon Linux Extras?

Amazon Linux Extras Extras is a mechanism in Amazon Linux 2 to enable the consumption of new versions of application software on a stable operating system that is supported until June 30, 2024. Extras help alleviate the compromise between the stability of the OS and freshness of available software.


1 Answers

You can try to run the following command on your Linux server:

sudo amazon-linux-extras install postgresql10 
like image 183
johnthuss Avatar answered Oct 06 '22 13:10

johnthuss