pgRouting

Changeset 224

Show
Ignore:
Timestamp:
09/15/08 18:33:50 (2 months ago)
Author:
daniel
Message:

Install pgRouting and create database

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/workshop/FOSS4G2008/Docs/05_pgrouting.install.chapter

    r222 r224  
     1= Installation on Ubuntu 8.04 (with PostgreSQL 8.3) with TSP and Driving Distance (Extras) = 
     2 
     3The workshop will use a virtual machine image running Xubuntu 8.04 with  
     4preinstalled pgRouting. If you want to compile pgrouting yourself you can  
     5proceed like we did for the workshop installation.  
     6 
     7Help for installation on other platforms can be found here:  
     8http://pgrouting.postlbs.org/wiki/pgRoutingDocs#Installation 
     9 
     10== 1. Install required packages == 
     11{{{ 
     12sudo apt-get install build-essential subversion cmake 
     13sudo apt-get install libboost-graph* 
     14sudo apt-get install postgresql-8.3-postgis postgresql-server-dev-8.3 
     15}}} 
     16 
     17For Driving Distance algorithm (optional) 
     18CGAL library can be easily installed using the Ubuntu multiverse repository. 
     19{{{ 
     20sudo apt-get install libcgal* 
     21}}} 
     22 
     23For TSP algorithm (optional) 
     24{{{ 
     25wget http://downloads.sourceforge.net/gaul/gaul-devel-0.1849-0.tar.gz?modtime=1114163427&big_mirror=0 
     26tar -xzf gaul-devel-0.1849-0.tar.gz 
     27cd gaul-devel-0.1849-0/ 
     28./configure --disable-slang 
     29make 
     30sudo make install 
     31}}} 
     32 
     33== 2. Compile pgRouting core (with TSP and DD flag on) == 
     34{{{ 
     35svn checkout http://pgrouting.postlbs.org/svn/pgrouting/trunk pgrouting 
     36 
     37cd pgrouting/ 
     38cmake -DWITH_TSP=ON -DWITH_DD=ON . 
     39make 
     40sudo make install 
     41}}} 
     42 
     43== 3. Setup PostgreSQL == 
     44Set local database connections to "trust" in "pg_hba.conf" to be able to work  
     45with PostgreSQL as user "postgres". Then restart PostgreSQL. 
     46{{{ 
     47sudo gedit /etc/postgresql/8.3/main/pg_hba.conf  
     48sudo /etc/init.d/postgresql-8.3 restart 
     49}}} 
     50 
     51== 4. Create routing database == 
     52To test your installation create a first routing database and load the routing 
     53functions into this database. 
     54 
     55{{{ 
     56createdb -U postgres routing 
     57createlang -U postgres plpgsql routing 
     58}}} 
     59 
     60Add PostGIS functions 
     61{{{ 
     62psql -U postgres -f /usr/share/postgresql-8.3-postgis/lwpostgis.sql routing 
     63psql -U postgres -f /usr/share/postgresql-8.3-postgis/spatial_ref_sys.sql routing 
     64}}} 
     65 
     66Add pgRouting functions 
     67{{{ 
     68psql -U postgres -f /usr/share/postlbs/routing_core.sql routing 
     69psql -U postgres -f /usr/share/postlbs/routing_core_wrappers.sql routing 
     70psql -U postgres -f /usr/share/postlbs/routing_topology.sql routing 
     71}}} 
     72 
     73Add TSP functions (optional) 
     74{{{ 
     75psql -U postgres -f /usr/share/postlbs/routing_tsp.sql routing 
     76psql -U postgres -f /usr/share/postlbs/routing_tsp_wrappers.sql routing 
     77}}} 
     78 
     79Add Driving Distance functions (optional) 
     80{{{ 
     81psql -U postgres -f /usr/share/postlbs/routing_dd.sql routing 
     82psql -U postgres -f /usr/share/postlbs/routing_dd_wrappers.sql routing 
     83}}}