Skip to content

Instantly share code, notes, and snippets.

@MBtech
Last active August 29, 2015 14:07
Show Gist options
  • Save MBtech/841a9100bca629ebc2b8 to your computer and use it in GitHub Desktop.
Save MBtech/841a9100bca629ebc2b8 to your computer and use it in GitHub Desktop.
Installing PostgreSQL 9.1
sudo sh -c "echo 'deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main' > /etc/apt/sources.list.d/pgdg.list"
wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-common
sudo apt-get install postgresql-9.3 libpq-dev
#Create a user for postgres
sudo -u postgres createuser username -s
# If you would like to set a password for the user, you can do the following
sudo -u postgres psql
postgres=# \password username
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment