Skip to content

Instantly share code, notes, and snippets.

@leesmith
Created April 17, 2012 02:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leesmith/2403074 to your computer and use it in GitHub Desktop.
Save leesmith/2403074 to your computer and use it in GitHub Desktop.
Ubuntu postgresql notes
# install database server
apt-get install postgresql libpq-dev
# install postgresql gem
gem install pg
# create postgres (super)user
createuser --superuser lsmith -U postgres
# change postgres user password
sudo -u postgres psql postgres
\password postgres
# create a database
sudo -u postgres createdb myDb
# database login
psql -d myDb -U username -W
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment