next up previous contents
Next: GRASS Up: Building and Installing QGIS Previous: GEOS   Contents

PostGIS

NOTE - You must edit the PostGIS Makefile and make sure that USE_GEOS=1 is set. Also adjust GEOS_DIR to point to your GEOS installation directory.

  1. Download PostGIS source from http://postgis.refractions.net

  2. Untar PostGIS into the contrib subdirectory of the postgresql build directory. The contrib subdirectory is located in the directory created in step 3 of the PostgreSQL installation process.
  3. Change to the postgis subdirectory
  4. Edit the Makefile to enable GEOS support (see the note above)
  5. PostGIS provides a manual in the doc/html subdirectory that explains the build process (see the Installation section)
  6. The quick and dirty steps to install PostGIS are:
       cd contrib
       gunzip postgis-0.8.0.tar.gz 
       tar xvf postgis-0.8.0.tar 
       cd postgis-0.8.0 
       make 
       make install 
       createlang plpgsql yourtestdatabase 
       psql -d yourtestdatabase -f postgis.sql 
       psql -d yourtestdatabase -f spatial_ref_sys.sql
    
The better way to install PostGIS is to carefully follow the instructions in the PostGIS manual in the doc/html subdirectory or the online manual at http://postgis.refractions.net/docs



Gary Sherman 2004-10-01