Check out the latest version of Routino: svn co http://routino.org/svn/trunk routino
Contents of /branches/destination-access/doc/INSTALL.txt
Parent Directory
|
Revision Log
Revision 1904 -
(show annotations)
(download)
Sun Mar 12 13:57:04 2017 UTC (8 years ago) by amb
File MIME type: text/plain
File size: 13930 byte(s)
Sun Mar 12 13:57:04 2017 UTC (8 years ago) by amb
File MIME type: text/plain
File size: 13930 byte(s)
Merge the changes for version 3.2 into the branch.
1 | Routino : Installation |
2 | ====================== |
3 | |
4 | |
5 | Quick Start Guide |
6 | ----------------- |
7 | |
8 | The instructions below are a complete list of the minimum required to |
9 | get Routino installed and running under Apache on Debian Linux. Other |
10 | Linux versions will be similar and other UNIX based systems will also |
11 | be similar although may have distinct differences. There is some |
12 | support in Routino for compiling on Microsoft Windows which has its own |
13 | installation instructions. |
14 | |
15 | *********************************************************************** |
16 | *** These instructions should not be considered as complete or a *** |
17 | *** secure installation for the reasons given in more detail below. *** |
18 | *********************************************************************** |
19 | |
20 | The starting point for the installation is in the Routino source code |
21 | directory after it has been uncompressed. Most of the steps will need |
22 | to be run as the root user. |
23 | |
24 | The first thing to do is to install the packages which are required for |
25 | compilation of Routino as described in the Pre-Requisites section |
26 | below. |
27 | |
28 | apt-get install gcc make libc6-dev libz-dev libbz2-dev |
29 | |
30 | After this the programs can be compiled: |
31 | |
32 | make |
33 | |
34 | The files for the web interface can now be copied to the web server |
35 | directory. On Debian this is '/var/www' (or more recently '/var/www/html') |
36 | and the files changed to be owned by the user Apache runs as. The |
37 | instructions below are based on the assumption that the files are placed in |
38 | '/var/www', replace this with the chosen installation location if different. |
39 | |
40 | cp -a web /var/www/routino |
41 | chown -R www-data:www-data /var/www/routino |
42 | |
43 | To be able to use Routino some data will need to be processed and a |
44 | script is provided for this. This will download the data for the UK |
45 | which may take a while and then process it. |
46 | |
47 | cd /var/www/routino/data |
48 | sh -x create.sh |
49 | |
50 | The routino web pages also requires either the OpenLayers or Leaflet |
51 | Javascript library to be downloaded and installed and scripts are |
52 | provided for this. |
53 | |
54 | cd /var/www/routino/www/openlayers |
55 | sh -x install.sh |
56 | |
57 | cd /var/www/routino/www/leaflet |
58 | sh -x install.sh |
59 | |
60 | To make full use of the location search feature on the Routino web page |
61 | you will need to install some extra perl packages. |
62 | |
63 | apt-get install libwww-perl liburi-perl libjson-pp-perl |
64 | |
65 | Finally to make the web pages work you will need to add the extra lines |
66 | to the Apache configuration file as described in the Configuration of |
67 | Web Server section below. You don't have to use 'vi' and can use any |
68 | text editor. |
69 | |
70 | vi /etc/apache2/sites-enabled/000-default |
71 | apache2ctl restart |
72 | |
73 | Now everything should be set up and the web page should work if |
74 | accessed at 'http://localhost/routino/www/routino/router.html'. |
75 | |
76 | When everything is working you should read the rest of this document |
77 | carefully and make the following changes: |
78 | * Download your choice of OSM data - edit the file data/create.sh and |
79 | run it again. |
80 | * Edit the www/routino/mapprops.js file to match the downloaded data |
81 | and personal map preferences. |
82 | * Move the files in the web server directory so that only the |
83 | contents of the www directory are accessible by the web server. |
84 | * Edit the file www/routino/paths.pl to reference the new file |
85 | locations. |
86 | |
87 | |
88 | Pre-Requisites |
89 | -------------- |
90 | |
91 | The programs are written in standard C language with minimal external |
92 | requirements so only a small set of development tools are required |
93 | (gcc, make). The compilation tools to use and the command line options |
94 | are defined in the file 'Makefile.conf'. |
95 | |
96 | There is some support for multi-threading that uses pthreads and |
97 | additional development libraries for this may be required (on Linux |
98 | this might be part of the standard C language development files). The |
99 | multi-threading is enabled by default but can be disabled at compile |
100 | time by commenting out two lines in the file 'Makefile.conf'. |
101 | |
102 | To use the built-in gzip file decompression function and to process all |
103 | PBF format files the zlib (or libz) development library is required (on |
104 | Linux this might be in a package called libz-dev). The gzip function is |
105 | enabled by default but can be disabled by commenting out two lines in |
106 | the file 'Makefile.conf'. |
107 | |
108 | To use the built-in bzip2 file decompression functions the bzip2 (or |
109 | libbz2) development library is required (on Linux this might be in a |
110 | package called libbz2-dev). The bzip2 function is enabled by default |
111 | but can be disabled by commenting out two lines in the file |
112 | 'Makefile.conf'. |
113 | |
114 | To use the built-in xz file decompression functions the liblzma |
115 | development library is required (on Linux this might be in a package |
116 | called liblzma-dev). The xz function is not enabled by default but can |
117 | be enabled by uncommenting two lines in the file 'Makefile.conf'. |
118 | |
119 | To compile the source code from subversion requires the Perl |
120 | Graphics::Magick module to generate the web page icons (on Linux this |
121 | might be in a package called libgraphics-magick-perl). The released |
122 | source code packages contains the icons so this package is not required |
123 | for compilation. |
124 | |
125 | To use the web page interface an http server is required. Instructions |
126 | below are for Apache but any server that supports CGIs should work. |
127 | |
128 | The web pages use the Perl scripting language and a number of the |
129 | default Perl modules. To use the search function on the router web page |
130 | the Perl module JSON::PP must be installed (on Linux this might be in a |
131 | package called libjson-pp-perl if not part of the standard Perl |
132 | installation). |
133 | |
134 | Compilation |
135 | ----------- |
136 | |
137 | To compile the programs just type 'make' at the top level of the source |
138 | tree. |
139 | |
140 | This program has been written to run on Linux, no cross-platform |
141 | compatibility has been specifically included but on the other hand |
142 | other platforms have not knowingly been excluded either. |
143 | |
144 | Any information on improving the compilation process on anything other |
145 | than x86 Linux is welcome. |
146 | |
147 | |
148 | Installation |
149 | ------------ |
150 | |
151 | After compilation the executable files are copied into the directory |
152 | web/bin and the default XML configuration files are copied into the |
153 | directory web/data. This is in preparation for using the supplied |
154 | example web pages but is also a useful location to copy the files from |
155 | for normal use. |
156 | |
157 | The required executable files are 'planetsplitter', 'router' and |
158 | 'filedumper' and the '*-slim' versions of the same files. They can be |
159 | copied to any location and need no special installation environment. |
160 | The 'filedumperx' executable is for debugging and not required. |
161 | |
162 | The configuration files are called 'profiles.xml', 'tagging.xml' and |
163 | 'translations.xml'. The names of the configuration files can be |
164 | specified on the command line but by default are also looked for in the |
165 | directory that contains the routing database with these names. |
166 | |
167 | |
168 | Example Web Page |
169 | ---------------- |
170 | |
171 | The directory 'web' contains a set of files that can be used to create |
172 | a working set of web pages with interfaces to the routing algorithm. |
173 | |
174 | The files in the 'web' directory will require copying to a location |
175 | that is accessible by a web server. After copying the files some of |
176 | them need to be edited; search through the files for lines that contain |
177 | the words "EDIT THIS" and make appropriate edits. The files that need |
178 | editing are 'paths.pl' (to set the directory paths) and 'mapprops.js' (to |
179 | set the map properties). |
180 | |
181 | |
182 | Configuration of web files |
183 | -------------------------- |
184 | |
185 | The assumption in this description is that the whole of the directory |
186 | called web is copied into a directory that is accessible by an Apache |
187 | web server. |
188 | |
189 | ************************************************************************** |
190 | **** This is not a secure configuration but an easy one to configure. **** |
191 | **** Only the directory 'www' should be accessible by the web server. **** |
192 | **** Do not use this configuration unmodified in a public web server. **** |
193 | ************************************************************************** |
194 | |
195 | The directory structure is as follows: |
196 | |
197 | web/ |
198 | | |
199 | + /bin/ <- The Routino executable files (when compiled). |
200 | | |
201 | + /data/ <- The Routino database and default configuration |
202 | | files. |
203 | | |
204 | + /results/ <- An empty directory to store the results. |
205 | | |
206 | + /www/ <- The files that must be available to the web |
207 | | server are below this level. |
208 | | |
209 | + /openlayers/ <- A directory to hold the OpenLayers library |
210 | | (optional; leaflet can be used instead). |
211 | | |
212 | + /leaflet/ <- A directory to hold the Leaflet library. |
213 | | (optional; openlayers can be used instead). |
214 | | |
215 | + /routino/ <- The main HTML, Javascript, CSS and CGI files. |
216 | | |
217 | + /documentation/ <- The HTML version of the Routino documentation. |
218 | |
219 | The directory 'bin' will be filled by running the compilation process. |
220 | For a secure installation the 'bin' directory should be outside of the |
221 | web server, the file 'www/routino/paths.pl' contains the path to the |
222 | 'bin' directory. |
223 | |
224 | The directory 'data' must contain the Routino database and is also the |
225 | default location for the configuration files. The routing database is |
226 | created by downloading the OSM files for the region of interest and |
227 | running the 'planetsplitter' program. There is a script in the |
228 | directory that will download the OSM files and create the required |
229 | database. The script should be edited to set the names of the files to |
230 | be downloaded. For a secure installation the 'data' directory should |
231 | be outside of the web server, the file 'www/routino/paths.pl' contains |
232 | the path to the 'data' directory. |
233 | |
234 | The directory 'results' is a temporary directory that it used to hold |
235 | the GPX and text files generated by the Routino router. The directory |
236 | must be writable by the web server process since it is the CGI scripts |
237 | that are run by the web server that writes the results here. For a |
238 | secure installation the results directory should be outside of the web |
239 | server, the file 'www/routino/paths.pl' contains the path to the |
240 | results directory. |
241 | |
242 | The directory 'www' and its sub-directories are the only ones that need |
243 | to be within the web server accessible directory. |
244 | |
245 | A Javascript map drawing library is required and either OpenLayers or |
246 | Leaflet can be used. The library is loaded dynamically when the HTML is |
247 | opened based on the value that is selected in 'mapprops.js'. |
248 | |
249 | The directory 'www/openlayers' is for the OpenLayers Javascript library |
250 | that can be downloaded from 'http://www.openlayers.org/'. (This version |
251 | of Routino has been tested with OpenLayers library versions 2.12 and |
252 | 2.13.1). The file 'www/openlayers/OpenLayers.js' and the directories |
253 | 'www/openlayers/img/' and 'www/openlayers/theme/' must all exist. There |
254 | is a script in the 'www/openlayers' directory that will automatically |
255 | download the files, create an optimised 'OpenLayers.js' and copy the |
256 | files to the required locations. |
257 | |
258 | The directory 'www/leaflet' is for the Leaflet Javascript library that |
259 | can be downloaded from 'http://leafletjs.com/'. (This version of Routino |
260 | has been tested with Leaflet library versions 0.7.1 and 0.7.2). The files |
261 | 'www/leaflet/leaflet.js' and 'www/leaflet/leaflet.css' and the directory |
262 | 'www/leaflet/images/' must all exist. There is a script in the |
263 | 'www/leaflet' directory that will automatically download the files. |
264 | |
265 | The directory 'www/routino' contains the main HTML, Javascript and CSS |
266 | files as well as the CGI scripts that perform the server-side routing |
267 | functions. The description below lists all of the files that contain |
268 | editable information. |
269 | |
270 | paths.pl |
271 | This contains the names of the directories that contain the |
272 | executable files, router database and temporary results; the |
273 | prefix for the routing database; and the names of the |
274 | executables. |
275 | |
276 | mapprops.js |
277 | The parameters in this file control the Javascript map library |
278 | (defaults to OpenLayers), the boundary of the visible map |
279 | (defaults to UK), the minimum and maximum zoom levels (defaults |
280 | to between 4 and 15 inclusive), the source of map tiles |
281 | (defaults to the main OpenStreetMap tile server), the data |
282 | editing and browsing URLs (default to the OpenStreetMap website) |
283 | and the number of waypoints allowed (defaults to 9). |
284 | |
285 | The directory www/routino/documentation contains the HTML version of |
286 | the Routino documentation. |
287 | |
288 | |
289 | Configuration of Web Server |
290 | --------------------------- |
291 | |
292 | The file 'www/routino/.htaccess' contains all of the Apache configuration |
293 | options that are required to get the example web pages running. The |
294 | only problem is that some of the configuration options in that file |
295 | will not work unless they are allowed by the 'AllowOverride' option in |
296 | the main Apache server configuration file. |
297 | |
298 | If you have copied the routino 'web' directory into '/var/www' and named |
299 | it 'routino' then the entry that you need in your Apache configuration |
300 | file is this one: |
301 | |
302 | <Directory /var/www/routino> |
303 | AllowOverride Options=MultiViews,ExecCGI FileInfo Limit |
304 | </Directory> |
305 | |
306 | This can be placed anywhere between the <VirtualHost *:80> and |
307 | </VirtualHost> tags which should be at the start and end of the file. |
308 | |
309 | |
310 | -------- |
311 | |
312 | Copyright 2008-2016 Andrew M. Bishop. |
Properties
Name | Value |
---|---|
cvs:description | Description of compilation and installation. |