Changes between Version 2 and Version 3 of GeoDjangoUbuntuInstall
- Timestamp:
- Aug 16, 2008, 2:26:48 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GeoDjangoUbuntuInstall
v2 v3 67 67 {{{ 68 68 sudo vim /etc/postgresql/8.2/main/pg_hba.conf 69 # change ident sameuser to trust69 # change ident sameuser to trust - WARNING SECURITY RISK 70 70 # comment out this line to allow, for instance, to django/psycopg2 to connect without password 71 71 local all postgres ident sameuser … … 90 90 91 91 === Step 6 === 92 Create your PostGIS database92 Create your PostGIS `template_postgis` database 93 93 {{{ 94 94 # Switch to the default postgres user … … 100 100 # Load the required procedural language for postgis 101 101 createlang plpgsql -d template_postgis -U postgres 102 # Load optional languages 103 # Load postgis functions and spatial reference info 104 # which likely was installed in the postgres share directory 105 pg_config --sharedir 106 /usr/local/pgsql/share 107 # Also look for lwpostgis.sql and spatial_ref_sys.sql in: 102 }}} 103 104 Now you are ready to actually load the postgis functions and tables as sql inserts 105 * Note: the two postgis sql files (lwpostgis.sql and spatial_ref_sys.sql) were likely installed in the postgres share directory 106 {{{ 107 pg_config --sharedir # will give you that dir 108 # Also look in: 108 109 ls /usr/share/ # or /usr/local/share/ 110 }}} 111 Try: 112 {{{ 109 113 psql -d template_postgis -U postgres -f /usr/share/postgresql-8.3-postgis/lwpostgis.sql 110 114 # Note: ignore any NOTICES, like 'psql:/usr/share/lwpostgis.sql:44: NOTICE: type "histogram2d" is not yet defined' 111 # You should see output like: 115 }}} 116 * You should see output like: 117 {{{ 112 118 BEGIN 113 119 CREATE FUNCTION … … 117 123 CREATE AGGREGATE 118 124 COMMIT 119 # If you get an error about not being able to find `geos` add: 120 /usr/local/lib to /etc/ld.so.conf 121 # And run: 125 }}} 126 * If you get an error about not being able to find `geos` add /usr/local/lib to /etc/ld.so.conf and run: 127 {{{ 122 128 ldconfig # Then restart PostgreSQL 123 # Then load the geographic projections table 129 }}} 130 Then load the geographic projections table: 131 {{{ 124 132 psql -d template_postgis -U postgres -f /usr/share/postgresql-8.3-postgis/spatial_ref_sys.sql 125 133 }}}