Changes between Version 2 and Version 3 of GeoDjangoDebianLennyInstall


Ignore:
Timestamp:
09/04/08 09:52:59 (7 years ago)
Author:
jbronn
Comment:

Updated errors.

Legend:

Unmodified
Added
Removed
Modified
  • GeoDjangoDebianLennyInstall

    v2 v3  
    99= Create a database template =
    1010This database could be used for recreating your geodjango powering databases
    11 {{{
    12 sudo su postgres createdb postgis_template
    13 sudo su postgres createlang plpgsql postgis_template
    14 sudo su postgres psql -f /usr/share/postgresql-8.3-postgis/lwpostgis.sql postgis_template
    15 sudo su postgres psql -f /usr/share/postgresql-8.3-postgis/spatial_ref_sys.sql postgis_template
     11{{{
     12$ sudo su - postgres
     13$ createdb -E UTF8 template_postgis # Create the template spatial database.
     14$ createlang -d template_postgis plpgsql # Adding PLPGSQL language support.
     15$ psql -d template_postgis -f /usr/share/postgresql-8.3-postgis/lwpostgis.sql
     16$ psql -d template_postgis -f /usr/share/postgresql-8.3-postgis/spatial_ref_sys.sql
     17$ psql -d template_postgis # Enabling users to alter spatial tables.
     18template_postgis=# GRANT ALL ON geometry_columns TO PUBLIC;
     19template_postgis=# GRANT ALL ON spatial_ref_sys TO PUBLIC;
    1620}}}
    1721
     
    2024{{{
    2125export DJANGO_SETTINGS_MODULE=myproject.settings
    22 export GEOS_LIBRARY_PATH=/usr/lib
    2326python
    2427}}}
     
    3841
    3942= Creating a database =
    40 Now when creating a new database, use postgis_template as template :)
     43Now when creating a new database, use postgis_template as template (substitute in the appropriate database owner and the database name:
    4144{{{
    42 sudo su postgres createdb -t postgis_template mynewdb
     45sudo su postgres createdb -T postgis_template -O db_user db_name
    4346}}}
    4447
Back to Top