Skip to content

Instantly share code, notes, and snippets.

@sdoro
Created November 19, 2012 10:16
Show Gist options
  • Save sdoro/4109977 to your computer and use it in GitHub Desktop.
Save sdoro/4109977 to your computer and use it in GitHub Desktop.
Enable remote access for Postgress
####### Enable remote access (with password [md5])
sudo vi /etc/postgresql/9.1/main/pg_hba.conf
# append the line (with the IP that you want to be able to access the DB)
host all all XXX.XXX.XXX.XXX/24 md5
sudo vi /etc/postgresql/9.1/main/postgresql.conf
# Change listen_addresses='localhost' to
listen_addresses='localhost, XXX.XXX.XXX.XXX'
sudo /etc/init.d/postgresql restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment