Skip to content

Instantly share code, notes, and snippets.

@zbeat
Forked from estebistec/osx_geodjango_deps.sh
Created August 12, 2014 03:26

Revisions

  1. @estebistec estebistec revised this gist Apr 6, 2012. 1 changed file with 0 additions and 5 deletions.
    5 changes: 0 additions & 5 deletions osx_geodjango_deps.sh
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,3 @@
    # The GeoDjango installation page [1] makes the OSX setup seem kind of gnarly. homebrew has
    # come a long way and can do a lot of the heavy lifting of building libs needed by GeoDjango.
    # When I get some time I'll submit a patch to that page on the Django site with this info...
    # [1] https://docs.djangoproject.com/en/dev/ref/contrib/gis/install/#macosx

    # Freshen homebrew
    brew update
    brew upgrade
  2. @estebistec estebistec revised this gist Apr 6, 2012. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions osx_geodjango_deps.sh
    Original file line number Diff line number Diff line change
    @@ -12,6 +12,12 @@ brew install postgresql
    brew install postgis
    brew install gdal

    # Switch to postgis version 1.5.3 - 2.0 not supported yet
    # in /usr/local
    git checkout -b postgis1.5.3 cb3d49e
    brew unlink postgis
    brew install postgis

    # Create and start a postgresql DB as your non-root user
    mkdir -p ~/var/data/postgres
    mkdir -p ~/var/log/postgres
  3. @estebistec estebistec revised this gist Apr 1, 2012. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions osx_geodjango_deps.sh
    Original file line number Diff line number Diff line change
    @@ -22,8 +22,8 @@ pg_ctl -D ~/var/data/postgres -l ~/var/log/postgres/server.log start
    # Create the template_postgis postgres DB template
    # Alter the SQL paths as needed for the version of postgresql that you install with brew
    createdb -h localhost template_postgis
    psql -h localhost -d template_postgis -f /usr/local/Cellar/postgresql/9.1.2/share/postgresql/contrib/postgis-1.5/postgis.sql
    psql -h localhost -d template_postgis -f /usr/local/Cellar/postgresql/9.1.2/share/postgresql/contrib/postgis-1.5/spatial_ref_sys.sql
    psql -h localhost -d template_postgis -f /usr/local/share/postgis/postgis.sql
    psql -h localhost -d template_postgis -f /usr/local/share/postgis/spatial_ref_sys.sql

    # Finally, create the GeoDjango DB with the template_postgis template
    createdb -h localhost -T template_postgis geodjango
  4. @estebistec estebistec revised this gist Jan 29, 2012. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions osx_geodjango_deps.sh
    Original file line number Diff line number Diff line change
    @@ -27,3 +27,10 @@ psql -h localhost -d template_postgis -f /usr/local/Cellar/postgresql/9.1.2/shar

    # Finally, create the GeoDjango DB with the template_postgis template
    createdb -h localhost -T template_postgis geodjango

    # Other stuff...

    # Get postgres status
    pg_ctl -D ~/var/data/postgres status
    # Stop your postgres DB
    pg_ctl -D ~/var/data/postgres stop -s -m fast
  5. @estebistec estebistec revised this gist Jan 29, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion osx_geodjango_deps.sh
    Original file line number Diff line number Diff line change
    @@ -13,7 +13,7 @@ brew install postgis
    brew install gdal

    # Create and start a postgresql DB as your non-root user
    mkdir -p ~/var/data/postgres
    mkdir -p ~/var/data/postgres
    mkdir -p ~/var/log/postgres
    touch ~/var/log/postgres/server.log
    initdb ~/var/data/postgres
  6. @estebistec estebistec revised this gist Jan 29, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion osx_geodjango_deps.sh
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    # When I get some time I'll submit a patch to that page on the Django site with this info...
    # [1] https://docs.djangoproject.com/en/dev/ref/contrib/gis/install/#macosx

    # Freshen brew:
    # Freshen homebrew
    brew update
    brew upgrade

  7. @estebistec estebistec revised this gist Jan 29, 2012. No changes.
  8. @estebistec estebistec revised this gist Jan 29, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion osx_geodjango_deps.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    # The GeoDjango installation page [1] makes the OSX setup seem kind of gnarly. homebrew has
    # come a long way and can do a lot of the heavy living of building libs needed by GeoDjango.
    # come a long way and can do a lot of the heavy lifting of building libs needed by GeoDjango.
    # When I get some time I'll submit a patch to that page on the Django site with this info...
    # [1] https://docs.djangoproject.com/en/dev/ref/contrib/gis/install/#macosx

  9. @estebistec estebistec revised this gist Jan 29, 2012. 1 changed file with 12 additions and 8 deletions.
    20 changes: 12 additions & 8 deletions osx_geodjango_deps.sh
    Original file line number Diff line number Diff line change
    @@ -13,13 +13,17 @@ brew install postgis
    brew install gdal

    # Create and start a postgresql DB as your non-root user
    mkdir -p ~/var/postgres
    initdb ~/var/postgres
    pg_ctl -D ~/var/postgres -l ~/var/postgres/server.log start
    mkdir -p ~/var/data/postgres
    mkdir -p ~/var/log/postgres
    touch ~/var/log/postgres/server.log
    initdb ~/var/data/postgres
    pg_ctl -D ~/var/data/postgres -l ~/var/log/postgres/server.log start

    # Create the GeoDjango DB with the postgis schema
    createdb -h localhost geodjango
    psql -h localhost -d geodjango -f /usr/local/Cellar/postgresql/9.1.2/share/postgresql/contrib/postgis-1.5/postgis.sql
    psql -h localhost -d geodjango -f /usr/local/Cellar/postgresql/9.1.2/share/postgresql/contrib/postgis-1.5/spatial_ref_sys.sql
    # Alter the above path as needed for the version of postgresql that you install with brew
    # Create the template_postgis postgres DB template
    # Alter the SQL paths as needed for the version of postgresql that you install with brew
    createdb -h localhost template_postgis
    psql -h localhost -d template_postgis -f /usr/local/Cellar/postgresql/9.1.2/share/postgresql/contrib/postgis-1.5/postgis.sql
    psql -h localhost -d template_postgis -f /usr/local/Cellar/postgresql/9.1.2/share/postgresql/contrib/postgis-1.5/spatial_ref_sys.sql

    # Finally, create the GeoDjango DB with the template_postgis template
    createdb -h localhost -T template_postgis geodjango
  10. @estebistec estebistec created this gist Jan 28, 2012.
    25 changes: 25 additions & 0 deletions osx_geodjango_deps.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    # The GeoDjango installation page [1] makes the OSX setup seem kind of gnarly. homebrew has
    # come a long way and can do a lot of the heavy living of building libs needed by GeoDjango.
    # When I get some time I'll submit a patch to that page on the Django site with this info...
    # [1] https://docs.djangoproject.com/en/dev/ref/contrib/gis/install/#macosx

    # Freshen brew:
    brew update
    brew upgrade

    # The main stuff we need
    brew install postgresql
    brew install postgis
    brew install gdal

    # Create and start a postgresql DB as your non-root user
    mkdir -p ~/var/postgres
    initdb ~/var/postgres
    pg_ctl -D ~/var/postgres -l ~/var/postgres/server.log start

    # Create the GeoDjango DB with the postgis schema
    createdb -h localhost geodjango
    psql -h localhost -d geodjango -f /usr/local/Cellar/postgresql/9.1.2/share/postgresql/contrib/postgis-1.5/postgis.sql
    psql -h localhost -d geodjango -f /usr/local/Cellar/postgresql/9.1.2/share/postgresql/contrib/postgis-1.5/spatial_ref_sys.sql
    # Alter the above path as needed for the version of postgresql that you install with brew