https://askubuntu.com/questions/831292/how-to-install-postgresql-9-6-on-any-ubuntu-version/831293
https://www.postgresql.org/download/linux/ubuntu/
For 14.04
sudo add-apt-repository "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main"
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-9.6
Creating user, database, alter password, Granting privileges on database
sudo -u postgres psql
postgres=# CREATE USER <username>;
postgres=# CREATE DATABASE <dbname>;
postgres=# alter <username> oddesign with encrypted password '<password>';
postgres=# grant all privileges on database <dbname> to <username> ;
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-14-04 https://medium.com/coding-blocks/creating-user-database-and-adding-access-on-postgresql-8bfcd2f4a91e