Skip to content

Instantly share code, notes, and snippets.

@harssh
Created October 28, 2013 16:52
Show Gist options
  • Save harssh/7200449 to your computer and use it in GitHub Desktop.
Save harssh/7200449 to your computer and use it in GitHub Desktop.
Install PostgreSQL 9.1 on Ubuntu 13.04 Linux
Step 1: Install PostgreSQL on your system
Run the following commands in your console:
sudo apt-get update
sudo apt-get install postgresql-9.1
Step 2: Configure your postgresql password
sudo -u postgres psql template1
ALTER USER postgres with encrypted password 'your_password';
Press ctrl-d
Step 3: Configure MD5 authentication
sudo nano /etc/postgresql/9.1/main/pg_hba.conf
Update the
local all postgres
entry to
local all postgres md5
Step 4: Enable TCP/IP connections
sudo nano /etc/postgresql/9.1/main/postgresql.conf
Locate the line
#listen_addresses = 'localhost'
and change it to:
listen_addresses = 'localhost'
To allow other computers to connect to your PostgreSQL server replace ‘localhost’ with the IP Address of your server, or alternatively to ’0.0.0.0′ to bind to all interfaces.
Step 5: Restart postgres
sudo service postgresql restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment