Code

Changes between Version 54 and Version 55 of GeoDjangoInstall


Ignore:
Timestamp:
08/16/08 14:15:43 (6 years ago)
Author:
springmeyer
Comment:

Notes on creating a db for GeoDjango

Legend:

Unmodified
Added
Removed
Modified
  • GeoDjangoInstall

    v54 v55  
    122122 
    123123Next, create a role and database for your application, and allow it to access PostGIS functionality. 
     124 
     125Start by switching into the `postgres user` 
    124126{{{ 
    125127# su - postgres 
     128}}} 
     129As the `postgres` user (the user who initialized the database cluster) now do: 
     130{{{ 
    126131$ createuser <user> 
     132}}} 
     133If you get any error see http://www.postgresql.org/docs/8.3/interactive/tutorial-createdb.html 
     134{{{ 
    127135$ createdb -O <user> <db_name> 
    128136$ createlang plpgsql <db_name> 
    129137}}} 
    130138Now, load the postgis sql functions and spatial_ref_table of projection information. 
    131  * Note:PostGIS SQL files are ''ususally'' installed in the PostgreSQL share directory (`/usr/postgres/8.2/share` in the example below; use the `pg_config --sharedir` command to determine this directory on your system, which can vary widely depending on your PostgreSQL version and install method as well as how you install postgis, ie from source or with apt-get). 
     139Note: PostGIS SQL files are ''ususally'' installed in the PostgreSQL share directory (`/usr/postgres/8.2/share` in the example below; use the `pg_config --sharedir` command to determine this directory on your system, which can vary widely depending on your PostgreSQL version and install method as well as how you install postgis, ie from source or with apt-get). 
    132140{{{ 
    133141$ psql -d <db_name> -f /usr/postgres/8.2/share/lwpostgis.sql # check your PostgreSQL Version, 8.x