Chapter 2. Installation

Table of Contents
PostGIS
JDBC
Loader/Dumper

PostGIS

The PostGIS module is a extension to the PostgreSQL backend server. As such, PostGIS requires a full copy of the PostgreSQL source tree in order to compile. The PostgreSQL source code is available athttp://www.postgresql.org.

PostGIS 0.5 has been built and tested against PostgreSQL 7.1.2. It will probably work with any of the 7.1.x versions. It will not work with any version prior to 7.1.

  1. Before you can compile the postgis server modules, you must compile and install the PostgreSQL package.

  2. Retrieve the PostGIS source archive from http://postgis.refractions.net/postgis-0.5.tar.gz. Uncompress and untar the archive in the "contrib" directory of the PostgreSQL source tree.

    cd [postgresql source tree]/contrib
    zcat postgis-0.5.tar.gz | tar xvf -

  3. Once your PostgreSQL installation is up-to-date, enter the "postgis" directory, and run the compile and install commands.

    cd ./postgis-0.5
    make
    make install

  4. Before you can use the PostGIS objects in your database, you must load the object and function definitions.

    psql -d [yourdatabase] < postgis.sql

    The PostGIS server extensions are now loaded and ready to use.