Postgres Install

Install

Ubuntu

Tested on 18.04 (Bionic)
https://www.postgresql.org/download/linux/ubuntu/

vi /etc/apt/sources.list.d/pgdg.list

add...

deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main

Import the repository signing key, and update the package lists 

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

sudo apt-get update

Install...

apt-get install postgresql-12

Startup...

pg_ctlcluster 12 main start

Set a password...

sudo su - postgres

psql postgres

\password postgres

Amazon Linux

The aim here was to have the postgreSQL client tools installed on an EC2 instance running Amazon Linux in order to use pg_dump to run a backup to EFS from an RDS PostgreSQL instance.

sudo amazon-linux-extras enable postgresql11

sudo yum clean metadata

sudo yum install postgresql

Bibliography