Difference between revisions of "GIS preconf code4libcon2009"
From Code4Lib
(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...) |
(No difference)
|
Revision as of 19:48, 8 February 2009
Contents
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
- wget http://aleph.lib.virginia.edu/providence/src.tgz
- 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.
- cd ~
- mkdir /usr/local/pgsql ; mkdir /usr/local/pgsql/data
- export PG_PREFIX=/usr/local/pgsql
- export PGDATA=/usr/local/pgsql/data
- Unpack source: tar -xzvf src.tgz ; cd src
- cd postgresql-8.3.5
- ./configure --prefix=$PG_PREFIX --with-libxml --with-libxslt --enable-thread-safety
- make ; make MAX_CONNECTIONS=10 check (MAX_CONNECTIONS avoids problems caused by limits in your OS on spawning new processes)
- make install
Install PROJ.4 4.6.0
- cd ../proj-4.6.0/
- ./configure --prefix=$PG_PREFIX
- make ; make check
- make install
Install GEOS 3.0.3
- cd ../geos-3.0.3
- ./configure --prefix=$PG_PREFIX
- make ; make check
- make install
Install PostGIS 1.3.5
- cd ../postgis-1.3.5
- ./configure --prefix=$PG_PREFIX --with-proj=$PG_PREFIX --with-pgsql=$PG_PREFIX/bin/pg_config --with-geos=$PG_PREFIX/bin/geos-config
- make
- make install
NB: PostGIS requires installation before running regression checks, because it's just a library of functions for PostgreSQL.
Put it all together
- Add our new commands to the execution path: export PATH=$PG_PREFIX/bin:$PATH
- 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
- start the database: pg_ctl -l $PGDATA/log start
- make check
- pg_ctl stop