Revised by APR - 05/11/07 +++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ Z-Pulley Inc. Initial machine configuration Sigler Built Intel Box, 2 Gig main memory 1 - 300 Gig UATA drive Ubuntu 7.04 + updates All tar balls and packages located in: usr/local/src/package_name +++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ We are going to install the base GIS packages used by many of the open source solutions: PROJ GDAL GEOS PostgreSQL PostGIS +++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++ 1) Proj.4 wget ftp://ftp.remotesensing.org/proj/proj-4.5.0.tar.gz wget ftp://ftp.remotesensing.org/proj/proj-datumgrid-1.3.zip tar -xzvf proj-4.5.0.tar.gz cd proj-4.5.0 cd nad/ ls cp ../../proj-datumgrid-1.3.zip . unzip proj-datumgrid-1.3.zip cd .. ./configure make sudo make install +++++++++++++++++++++++++++++++++++ 2) GDAL wget http://download.osgeo.org/gdal/gdal-1.4.1.tar.gz tar -xzvf gdal-1.4.1.tar.gz cd gdal-1.4.1 ./configure make ogr-all make install +++++++++++++++++++++++++++++++++++ 3) GEOS ### Note older 2.x series of GEOS to allow tip build of QGIS http://geos.refractions.net/geos-2.2.3.tar.bz2 tar -xjvf geos-2.2.3.tar.bz2 cd geos-2.2.3 ./configure make make install +++++++++++++++++++++++++++++++++++ 4) POSTGRESQL wget http://ftp2.us.postgresql.org/postgresql//source/v8.2.4/postgresql-8.2.4.tar.gz NOTE the LDFLAGS here... this is to support GEOS for postGIS LDFLAGS=-lstdc++ ./configure --with-perl --prefix=/usr/local/pgsql_8_2_4 gmake gmake install Add the shared library path to /etc/ld.so.conf : /usr/local/pgsql_8_2_4/lib Run /sbin/ldconfig Run make install in the ./doc directory to install the documentation Finally add the following to the profile file to make paths available: PATH=$PATH:/usr/local/pgsql_8_2_4/bin MANPATH=$MANPATH:/usr/local/pgsql_8_2_4/man export PATH export MANPATH Add the postgres user (as root) /usr/sbin/useradd postgres passwd xxxxxxx Make a database and launch Postgres sudo mkdir /usr/local/pgsql_8_2_4/data sudo chown postgres /usr/local/pgsql_8_2_4/data LOG IN AS POSTGRES!!! cd /usr/local/pgsql_8_2_4/ /usr/local/pgsql_8_2_4/bin/initdb ./data /usr/local/pgsql_8_2_4/bin/postmaster -D ./data/ > ./data/logfile.txt 2>&1 & LOG OUT AS POSTGRES Test it out psql -l createuser aaronr Shall the new role be a superuser? (y/n) y CREATE ROLE +++++++++++++++++++++++++++++++++++ 5) POSTGIS Just make sure that the Postgresql is configured with the LDFLAGS variable set and that the GEOS software is downloaded and installed from Refractions. wget http://postgis.refractions.net/download/postgis-1.2.1.tar.gz tar -xzvf postgis-1.2.1.tar.gz cd postgis-1.2.1 ./configure --with-proj --with-geos --with-pgsql make make install createdb -O aaronr test_db createlang -U aaronr plpgsql test_db psql -f /usr/local/pgsql_8_2_4/share/lwpostgis.sql -d test_db (if you get an error here it is most likely because you did not do an /sbin/ldconfig after changing /etc/ld.so.conf to contain the /usr/local/lib directory.)