Skip to content

Instantly share code, notes, and snippets.

@fabianoalmeida
Last active December 17, 2015 09:59
Show Gist options
  • Save fabianoalmeida/5591059 to your computer and use it in GitHub Desktop.
Save fabianoalmeida/5591059 to your computer and use it in GitHub Desktop.
I'm showing step by step how to install PostgreSQL on Mac OSX.
# Uninstall all versions
http://stackoverflow.com/questions/8037729/completely-uninstall-postgresql-9-0-4-from-mac-osx-lion
# Download .dmg from http://postgresapp.com/
# Unzip the file and copy do Applications folder
# Run Postgres.app
# After this action will appear an elephant on menu bar: Postgres server is running
# Follow this steps from documentation: http://postgresapp.com/documentation#toc_1
# On command line execute
$ psql -d postgres
# That will open the postgre command line
# Will need create a new role to access the database. Execute
postgres=# create role USER_NAME login createdb;
postgres=# \q
# Where USER_NAME must be your username to access the database
# Try to connect on command line
psql -d USER_NAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment