Skip to content

Instantly share code, notes, and snippets.

@pagles
Last active October 13, 2015 03:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pagles/4131184 to your computer and use it in GitHub Desktop.
Save pagles/4131184 to your computer and use it in GitHub Desktop.
Fresh install of postgres 9.2 with hstore and postgis 2.0.1
brew install postgres
brew install postgis (might need a pip install numpy - make sure you're not in a venv)
initdb /usr/local/var/postgres -E utf8
createdb template_postgis
psql -f /usr/local/share/postgis/postgis.sql template_postgis
psql -f /usr/local/share/postgis/spatial_ref_sys.sql template_postgis
createuser -sP [new user]
createdb -T template_postgis -O [new user] [new database]
psql [new database] [new user]
create extension hstore;
create extension intarray;
create extension unaccent;
alter function unaccent(text) immutable;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment