sudo apt-get install postgresql
sudo apt-get install pgadmin3
sudo apt-get install libpq-dev
To start off, we need to change the PostgreSQL pg user password; we will not be able to access the server otherwise
sudo su
root# passwd postgres
sudo -u postgres psql postgres
\password postgres
# enter password and confirm
# ctrl + d to exit pg prompt
sudo -u postgres createuser --superuser new_user
sudo -u postgres psql postgres
postgres-# \password new_user
Enter new password:
Enter it again:
# Edit sudo vim /etc/postgresql/9.1/main/pg_hba.conf
# "local" is for Unix domain socket connections only
local all all md5