GIS preconf code4libcon2009

Revision as of 19:48, 8 February 2009 by Bess (Talk | contribs) (New page: = Open Source GIS Pre-conference at code4libcon 2009 = Please try to install the software before the conference so we can have as much time as possible to actually play with GIS, and as l...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Revision as of 19:48, 8 February 2009 by Bess (Talk | contribs) (New page: = Open Source GIS Pre-conference at code4libcon 2009 = Please try to install the software before the conference so we can have as much time as possible to actually play with GIS, and as l...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Open Source GIS Pre-conference at code4libcon 2009

Please try to install the software before the conference so we can have as much time as possible to actually play with GIS, and as little time as possible debugging installations. Here are Adam's original instructions (edited slightly so they format clearly on the wiki):

NB: Do not install this software as 'root'. It will not run as 'root' for security.

Download the source code

  1. wget http://aleph.lib.virginia.edu/providence/src.tgz
  2. Unpack the source: tar -xzvf src.tgz ; cd src

Install PostgreSQL 8.3.5

You can place PostgreSQL anywhere you like, but if at all possible, I strongly recommend using the default "/usr/local/pgsql". You may also put the PostgreSQL data directory where you choose.

  1. cd ~
  2. mkdir /usr/local/pgsql ; mkdir /usr/local/pgsql/data
  3. export PG_PREFIX=/usr/local/pgsql
  4. export PGDATA=/usr/local/pgsql/data
  5. Unpack source: tar -xzvf src.tgz ; cd src
  6. cd postgresql-8.3.5
  7. ./configure --prefix=$PG_PREFIX --with-libxml --with-libxslt --enable-thread-safety
  8. make ; make MAX_CONNECTIONS=10 check (MAX_CONNECTIONS avoids problems caused by limits in your OS on spawning new processes)
  9. make install

Install PROJ.4 4.6.0

  1. cd ../proj-4.6.0/
  2. ./configure --prefix=$PG_PREFIX
  3. make ; make check
  4. make install

Install GEOS 3.0.3

  1. cd ../geos-3.0.3
  2. ./configure --prefix=$PG_PREFIX
  3. make ; make check
  4. make install

Install PostGIS 1.3.5

  1. cd ../postgis-1.3.5
  2. ./configure --prefix=$PG_PREFIX --with-proj=$PG_PREFIX --with-pgsql=$PG_PREFIX/bin/pg_config --with-geos=$PG_PREFIX/bin/geos-config
  3. make
  4. make install

NB: PostGIS requires installation before running regression checks, because it's just a library of functions for PostgreSQL.

Put it all together

  1. Add our new commands to the execution path: export PATH=$PG_PREFIX/bin:$PATH
  2. initialize a database directory in $PGDATA, with a default character encoding of UTF-8 and a root db user with the same name as our login name: initdb -U `whoami` -E UTF-8 -W
  3. start the database: pg_ctl -l $PGDATA/log start
  4. make check
  5. pg_ctl stop