open source

Postgis 2.0.0 installation from sourceInstallazione di postgis 2.0.0 da sorgenti

Here you are the procedure I follow to install postgis 2.0.0 from source:

  • compile and install  updating GEOS library  from source;
  • execute “ldconfig” command;
  • execute the command a posted here:
tar xvfz postgis-2.0.0.tar.gz
cd postgis-2.0.0
./configure --with-raster --with-topology --with-gui
make
make install
createdb yourdatabase
createlang plpgsql yourdatabase
psql -d yourdatabase -f postgis.sql
psql -d yourdatabase -f postgis_comments.sql
psql -d yourdatabase -f spatial_ref_sys.sql
psql -d yourdatabase -f rtpostgis.sql
psql -d yourdatabase -f raster_comments.sql
psql -d yourdatabase -f topology/topology.sql
psql -d yourdatabase -f doc/topology_comments.sql

SO: Ubuntu 11.10

Ho appena terminato con successo l’installazione di postgis 2.0.0 da codice sorgente scaricato da qui con la seguente procedura:

  • installazione  delle librerie GEOS aggiornate compilandole dai sorgenti scaricati da qui;
  • esecuzione del comando “ldconfig”;
  • esecuzione della procedura pubblicata qui;
tar xvfz postgis-2.0.0.tar.gz
cd postgis-2.0.0
./configure --with-raster --with-topology --with-gui
make
make install
createdb yourdatabase
createlang plpgsql yourdatabase
psql -d yourdatabase -f postgis.sql
psql -d yourdatabase -f postgis_comments.sql
psql -d yourdatabase -f spatial_ref_sys.sql
psql -d yourdatabase -f rtpostgis.sql
psql -d yourdatabase -f raster_comments.sql
psql -d yourdatabase -f topology/topology.sql
psql -d yourdatabase -f doc/topology_comments.sql

SO: Ubuntu 11.10

Installation and configuration of a geodatabase Installazione e configurazione di un database geografico

Procedure:

  1. repository and software installation:
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
sudo apt-get install -y postgresql-9.0 postgresql-server-dev-9.0 postgresql-contrib-9.0 projlibgeos-3.2.2 libgeos-c1 libgeos-dev libgdal1-1.8.0 libgdal1-dev build-essential libxml2 libxml2-dev checkinstall
wget http://postgis.refractions.net/download/postgis-1.5.3.tar.gztar zxvf postgis-1.5.3.tar.gz && cd postgis-1.5.3/
sudo ./configure && sudo make && sudo checkinstall --pkgname postgis-1.5.3 --pkgversion 1.5.3-src --default

2. creation of the geodatabase template

sudo su postgrescreatedb --template template0 template_giscreatelang plpgsql template_gis
psql -U postgres -d template_gis -f /usr/share/postgresql/9.0/contrib/postgis-1.5/postgis.sql
psql -U postgres -d postgis -f /usr/share/postgresql/9.0/contrib/postgis-1.5/spatial_ref_sys.sql
psql -U postgres -d postgis -c"select postgis_lib_version();"

4. Creation of the geodatabase and optionally his admin user:

CREATE USER dbuser PASSWORD 'secret';
CREATE DATABASE dbname OWNER dbuser TEMPLATE template_gis
\connect dbname
GRANT ALL ON geometry_columns TO dbuser;
GRANT SELECT ON spatial_ref_sys TO dbuser;

SO: Ubuntu 12.04 LTS 64 bit
Fonts: (Nicolo Rigacci, Simon Tokumine)

1. Installazione software e repository:

sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
sudo apt-get install -y postgresql-9.0 postgresql-server-dev-9.0 postgresql-contrib-9.0 projlibgeos-3.2.2 libgeos-c1 libgeos-dev libgdal1-1.8.0 libgdal1-dev build-essential libxml2 libxml2-dev checkinstall
wget http://postgis.refractions.net/download/postgis-1.5.3.tar.gztar zxvf postgis-1.5.3.tar.gz && cd postgis-1.5.3/
sudo ./configure && sudo make && sudo checkinstall --pkgname postgis-1.5.3 --pkgversion 1.5.3-src --default

2. creazione template Database geografico

sudo su postgrescreatedb --template template0 template_giscreatelang plpgsql template_gis
psql -U postgres -d template_gis -f /usr/share/postgresql/9.0/contrib/postgis-1.5/postgis.sql
psql -U postgres -d postgis -f /usr/share/postgresql/9.0/contrib/postgis-1.5/spatial_ref_sys.sql
psql -U postgres -d postgis -c"select postgis_lib_version();"

3. creazione_di_un_database_geografico

A partire dal template creato si crea un database geografico. Per semplicità di amministrazione si crea un utente che sarà proprietario del database:

CREATE USER dbuser PASSWORD 'secret';
CREATE DATABASE dbname OWNER dbuser TEMPLATE template_gis
\connect dbname
GRANT ALL ON geometry_columns TO dbuser;
GRANT SELECT ON spatial_ref_sys TO dbuser;

SO: Ubuntu 12.04 LTS 64 bit
Fonti: (Nicolo Rigacci, Simon Tokumine)