Installazione PostgreSQL / PostGIS in ubuntu
Per installare postgreSQL e postGIS in ubuntu è necessario eseguire i seguenti
- sudo apt-get install postgresql postgresql-client postgresql-contrib pgadmin3
- sudo apt-get install postgresql-8.2-postgis
infine configurare il template postGIS per la generazione dei nuovi db GIS:
- sudo su postgres
- createdb postgistemplate
- createlang plpgsql postgistemplate
- psql -d postgistemplate -f /usr/share/postgresql-8.2-postgis/lwpostgis.sql
- psql -d postgistemplate -f /usr/share/postgresql-8.2-postgis/spatial_ref_sys.sql
per testare la corretta installazione:
- $ psql -d postgistemplate -c "SELECT postgis_full_version();"
postgis_full_version
----------------------------------------------------------------------------------
POSTGIS="1.3.5" GEOS="3.1.0-CAPI-1.5.0" PROJ="Rel. 4.6.1, 21 August 2008" USE_STATS
(1 riga)



