root/branches/workshop/FOSS4G2008/Docs/05_pgrouting.install.chapter

Revision 231, 3.1 KB (checked in by daniel, 2 years ago)

workshop: topology chapter and installation updates

Line 
1= Installation on Ubuntu 8.04 (with PostgreSQL 8.3) with TSP and Driving Distance (Extras) =
2
3To build pgRouting the following libraries are required:
4 * pgRouting source code (http://pgrouting.postlbs.org)
5 * C and C++ compilers
6 * PostgreSQL version >= 8.0
7 * PostGIS version >= 1.0
8 * The Boost Graph Library (BGL). Version >= 1.33 which contains the astar.hpp (http://www.boost.org/libs/graph/doc/index.html)
9 * For TSP (optional): The Genetic Algorithm Utility Library (GAUL) (http://gaul.sourceforge.net)
10 * For Driving Distance (optional): Computational Geometry Algorithms Library (CGAL) version >= 3.2 (http://www.cgal.org)
11
12The workshop will use a virtual machine image running Xubuntu 8.04 with
13preinstalled pgRouting. You can download the virtual machine image from
14http://files.postlbs.org/foss4g2008/
15
16For installation instructions on other platforms take a look at the pgRouting
17documentation pages: http://pgrouting.postlbs.org/wiki/pgRoutingDocs#Installation
18pgRouting on the workshops virtual machine image has been installed like this:
19
20== 1. Install required packages ==
21{{{
22sudo apt-get install build-essential subversion cmake
23sudo apt-get install libboost-graph*
24sudo apt-get install postgresql-8.3-postgis postgresql-server-dev-8.3
25}}}
26
27For Driving Distance algorithm (optional)
28CGAL library can be easily installed using the Ubuntu multiverse repository.
29{{{
30sudo apt-get install libcgal*
31}}}
32
33For TSP algorithm (optional)
34{{{
35wget http://downloads.sourceforge.net/gaul/gaul-devel-0.1849-0.tar.gz?modtime=1114163427&big_mirror=0
36tar -xzf gaul-devel-0.1849-0.tar.gz
37cd gaul-devel-0.1849-0/
38./configure --disable-slang
39make
40sudo make install
41}}}
42
43== 2. Compile pgRouting core (with TSP and DD flag on) ==
44{{{
45svn checkout http://pgrouting.postlbs.org/svn/pgrouting/trunk pgrouting
46
47cd pgrouting/
48cmake -DWITH_TSP=ON -DWITH_DD=ON .
49make
50sudo make install
51}}}
52
53== 3. Setup PostgreSQL ==
54Set local database connections to "trust" in "pg_hba.conf" to be able to work
55with PostgreSQL as user "postgres". Then restart PostgreSQL.
56{{{
57sudo gedit /etc/postgresql/8.3/main/pg_hba.conf
58sudo /etc/init.d/postgresql-8.3 restart
59}}}
60
61== 4. Create routing database ==
62To test your installation create a first routing database and load the routing
63functions into this database.
64
65{{{
66createdb -U postgres routing
67createlang -U postgres plpgsql routing
68}}}
69
70Add PostGIS functions
71{{{
72psql -U postgres -f /usr/share/postgresql-8.3-postgis/lwpostgis.sql routing
73psql -U postgres -f /usr/share/postgresql-8.3-postgis/spatial_ref_sys.sql routing
74}}}
75
76Add pgRouting functions
77{{{
78psql -U postgres -f /usr/share/postlbs/routing_core.sql routing
79psql -U postgres -f /usr/share/postlbs/routing_core_wrappers.sql routing
80psql -U postgres -f /usr/share/postlbs/routing_topology.sql routing
81}}}
82
83Add TSP functions (optional)
84{{{
85psql -U postgres -f /usr/share/postlbs/routing_tsp.sql routing
86psql -U postgres -f /usr/share/postlbs/routing_tsp_wrappers.sql routing
87}}}
88
89Add Driving Distance functions (optional)
90{{{
91psql -U postgres -f /usr/share/postlbs/routing_dd.sql routing
92psql -U postgres -f /usr/share/postlbs/routing_dd_wrappers.sql routing
93}}}
94
95Now we can proceed to the next step to load the network data.
Note: See TracBrowser for help on using the browser.