Installation on Xubuntu 7.04

1. Install required packages

sudo apt-get install build-essential subversion cmake
sudo apt-get install libboost-graph*

sudo apt-get install libgeos-dev proj flex
sudo apt-get install postgresql-server-dev-8.2 postgresql-client-8.2 postgresql-dev postgresql-8.2

2. Compile PostGIS

wget http://www.postgis.org/download/postgis-1.3.1.tar.gz
tar -xzf postgis-1.3.1.tar.gz 

cd postgis-1.3.1/
sudo make install

3. Setup PostgreSQL

Set local database connections to "trust" in "pg_hba.conf" to be able to work with PostgreSQL as user "postgres". Then restart PostgreSQL.

sudo mousepad /etc/postgresql/8.2/main/pg_hba.conf
sudo /etc/init.d/postgresql-8.2 restart

4. Compile pgRouting core (without extras)

cd ..
svn checkout http://pgrouting.postlbs.org/svn/pgrouting/trunk pgrouting

cd pgrouting/
cmake .
sudo make  install

5. Create routing database

createdb -U postgres routing
createlang -U postgres plpgsql routing

# Add PostGIS functions
psql -U postgres -f /usr/share/lwpostgis.sql routing
psql -U postgres -f /usr/share/spatial_ref_sys.sql routing

# Add core pgRouting functions
psql -U postgres -f /usr/share/postlbs/routing_core.sql routing
psql -U postgres -f /usr/share/postlbs/routing_core_wrappers.sql routing
psql -U postgres -f /usr/share/postlbs/routing_topology.sql routing