Next: GRASS
Up: Building and Installing QGIS
Previous: GEOS
Contents
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.
- Download PostGIS source from http://postgis.refractions.net
- 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.
- Change to the postgis subdirectory
- Edit the Makefile to enable GEOS support (see the note above)
- PostGIS provides a manual in the doc/html subdirectory that explains the build process (see the Installation section)
- 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