Skip to content

Instantly share code, notes, and snippets.

@jpetitcolas
Created July 18, 2013 07:04
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 jpetitcolas/6027257 to your computer and use it in GitHub Desktop.
Save jpetitcolas/6027257 to your computer and use it in GitHub Desktop.
Install PostGreSQL
# Install PostGreSQL
sudo apt-get install postgresql
# Create user
sudo -i -u postgres
psql
CREATE USER username;
ALTER ROLE username WITH CREATEDB;
# Create database
CREATE DATABASE dbname OWNER username;
ALTER USER username WITH ENCRYPTED PASSWORD 'password';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment