Installing PostgreSQL

July 11, 2016 | Posted in PostgreSQL | Ajoy Oommen

These are the steps for installing PostgreSQL on an Ubuntu 14.04 server

sudo apt-get install postgresql postgresql-contrib

sudo su - postgres
export PGDATA=/var/lib/postgresql/9.3/main
/usr/lib/postgresql/9.3/bin/initdb
exit

sudo nano /etc/postgresql/9.3/main/pg_hba.conf # Change auth for user `postgres` to trust
sudo service postgresql restart

sudo su postgres
psql
alter user postgres with password 'secure_password';
\q
exit

sudo nano /etc/postgresql/9.3/main/pg_hba.conf # Change auth for user `postgres` to md5
sudo service postgresql restart
PostgreSQL Ubuntu Linux

Related Posts

27 Feb 2017 » Provisioning an ubuntu server for Django, Postgres, NGINX

24 Mar 2016 » Configuring SSH servers on Ubuntu

20 Apr 2015 » Postgres backup and recovery

02 Apr 2015 » PostgreSQL module ltree

04 Sep 2014 » Forwarding port to a PostgreSQL server

13 Dec 2013 » Using Tata Photon Plus in Linux

26 Jul 2013 » A simple javascript game