Skip to content

Instantly share code, notes, and snippets.

@SEJeff
Created October 31, 2013 15:15
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 SEJeff/91e2ec11ae4c896d665d to your computer and use it in GitHub Desktop.
Save SEJeff/91e2ec11ae4c896d665d to your computer and use it in GitHub Desktop.
su - postgres
createdb -E UTF8 template_postgis
createlang -d template_postgis plpgsql
PGSHARE=`pg_config --sharedir`
PGSQL=`find $PGSHARE -name postgis.sql -o -name postgis-64.sql | tail -n 1`
PGSQLSP=`find $PGSHARE -name spatial_ref_sys.sql | tail -n 1`
psql -d template_postgis -f $PGSQL
psql -d template_postgis -f $PGSQLSP
psql -d template_postgis -c 'grant all on geometry_columns to public;'
psql -d template_postgis -c 'grant all on spatial_ref_sys to public;'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment