source: branches/branch-1.4/docs/kernel/install-debian.txt @ 782

Last change on this file since 782 was 414, checked in by djay, 12 years ago

Small fix in the package name which cause trouble. Thank to István and Yoshida for providing feedbacks.

  • Property svn:eol-style set to native
  • Property svn:keywords set to HeadURL Date Author Id Rev
  • Property svn:mime-type set to text/plain
File size: 6.0 KB
Line 
1.. _kernel-installation-debian:
2
3Debian / Ubuntu
4===============
5
6:Authors: Nicolas Bozon, Gérald Fenoy, Jeff McKenna, Luca Delucchi
7:Last Updated: $Date: 2013-06-21 16:55:49 +0000 (Fri, 21 Jun 2013) $
8
9.. contents:: Table of Contents
10    :depth: 2
11    :backlinks: top
12
13.. note::
14   An Ubuntu 10.4 with ZOO virtual image is available at http://www.zoo-project.org/Ubuntu10.4_ZOO.zip
15   (root: ZOO.test)
16
17Ubuntu 12.04 dependencies
18--------------------------------------
19
20- install default dependencies
21
22::
23
24  sudo apt-get install flex bison libfcgi-dev libxml2 libxml2-dev curl openssl autoconf apache2 python-software-properties subversion libmozjs185-dev python-dev build-essential
25
26- add ubuntugis repository to obtain the newer GIS libraries
27
28::
29
30  sudo add-apt-repository ppa:ubuntugis/ppa
31  sudo apt-get update
32
33
34- install geographic library
35
36::
37
38  sudo apt-get install libgdal1-dev
39
40- download ZOO  source
41
42Debian 7.0 dependencies
43--------------------------------------
44
45- install dependencies
46
47::
48
49  apt-get install flex bison libfcgi-dev libxml2 libxml2-dev curl openssl autoconf apache2 python-software-properties subversion python-dev libgdal1-dev build-essential libmozjs185-dev
50
51
52Installation Workflow
53--------------------------------------
54
55.. note :: In the following lines you will find ``as administrator user`` note,
56           on Ubuntu you have to add ``sudo`` at the beginning of line, on Debian
57           you can use ``su -c COMMAND``)
58
59::
60
61  svn checkout http://svn.zoo-project.org/svn/trunk zoo-project
62
63- install cgic from packages
64
65::
66
67  cd zoo-project/thirds/cgic206/
68
69- compile
70
71::
72
73  make
74
75- if you want use Mapserver (optional) for WMS, WFS and WCS output read :ref:`mapserver`
76
77- go to kernel path
78
79::
80
81  cd ../../zoo-project/zoo-kernel/
82
83- create configure file
84
85::
86
87  autoconf
88
89- run configure
90
91::
92
93  ./configure --with-js --with-python
94
95.. note:: For PHP, you must make sure to compile PHP with `--enable-embed <http://www.zoo-project.org/trac/wiki/ZooKernel/Embed/PHP#ConfigureandInstallPHPEmbedlibrary>`__.
96
97.. note:: To use MapServer add the option ``--with-mapserver=/path/to/mapserver/source``
98
99- compile
100
101::
102
103  make
104
105- copy necessary files into your cgi-bin (as administrator user)
106
107
108::
109
110  cp main.cfg /usr/lib/cgi-bin
111  cp zoo_loader.cgi /usr/lib/cgi-bin
112
113- install ZOO ServiceProvider, in this case we try Python service (as administrator user)
114
115::
116
117  cp ../zoo-services/hello-py/cgi-env/*.zcfg /usr/lib/cgi-bin
118  cp ../zoo-services/hello-py/*.py /usr/lib/cgi-bin/
119
120- change some information in the main.cfg (as administrator user)
121
122::
123
124  nano /usr/lib/cgi-bin/main.cfg
125  - serverAddress = http://127.0.0.1
126
127
128- try the installation
129
130  - http://127.0.0.1/cgi-bin/zoo_loader.cgi?ServiceProvider=&metapath=&Service=WPS&Request=GetCapabilities&Version=1.0.0
131  - http://127.0.0.1/cgi-bin/zoo_loader.cgi?ServiceProvider=&metapath=&Service=WPS&Request=DescribeProcess&Version=1.0.0&Identifier=HelloPy
132  - http://127.0.0.1/cgi-bin/zoo_loader.cgi?ServiceProvider=&metapath=&Service=WPS&Request=Execute&Version=1.0.0&Identifier=HelloPy&DataInputs=a=myname
133
134.. note::
135   If you have some problem in the execute request using Python service, add the following to ``main.cfg``:
136
137   ::
138   
139     [env]
140     PYTHONPATH=<YOUR_PYTHONPATH>
141
142
143Rewrite rule configuration
144-----------------------------
145
146- for better readability and fully functional ZOO Kernel, you have to modify the default
147  Apache configuration in order to be able to use the http://localhost/zoo/ url directly.
148  Run (as administrator user)
149
150::
151
152    nano /usr/lib/cgi-bin/main.cfg
153    - serverAddress = http://localhost/zoo
154
155- first, please create a ``zoo`` directory in ``/var/www/`` which is used by Apache as the
156  DocumentRoot (as administrator user)
157
158::
159
160  mkdir /var/www/zoo
161
162- Then, please edit the ``/etc/apache2/sites-available/default`` configuration file and add the following
163  lines after the Directory block related to /var/www directory (as administrator user)
164
165::
166
167  <Directory /var/www/zoo/>
168      Options Indexes FollowSymLinks MultiViews
169      AllowOverride All
170      Order allow,deny
171      allow from all
172  </Directory>
173
174- now create a small .htaccess file in the ``/var/www/zoo`` containing the following lines (as administrator user)
175
176::
177
178  RewriteEngine on
179  RewriteRule call/(.*)/(.*) /cgi-bin/zoo_loader.cgi?request=Execute&service=WPS&version=1.0.0&Identifier=$1&DataInputs=sid=$2&RawDataOutput=Result [L,QSA]
180  RewriteRule (.*)/(.*) /cgi-bin/zoo_loader.cgi?metapath=$1 [L,QSA]
181  RewriteRule (.*) /cgi-bin/zoo_loader.cgi [L,QSA]
182
183
184- for this last file to be taken into account by Apache, you must activate the
185  rewrite Apache module by copying a load file as bellow (as administrator user)
186
187::
188
189  cp /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/
190
191- or using the a2enmod tool this way (as administrator user)
192
193::
194
195  a2enmod rewrite
196
197- now you should be able to access the ZOO Kernel using a simplified by restarting
198  your Apache Web server (as administrator user)
199
200::
201  /etc/init.d/apache2 restart
202
203- now you can try:
204
205  - http://localhost/zoo/?Service=WPS&Request=GetCapabilities&Version=1.0.0
206  - http://localhost/zoo/?Service=WPS&Request=DescribeProcess&Version=1.0.0&Identifier=HelloPy
207  - http://localhost/zoo/?Service=WPS&Request=Execute&Version=1.0.0&Identifier=HelloPy&DataInputs=a=myname
208
209.. _mapserver:
210
211Compile MapServer
212------------------
213
214- install MapServer dependencies (as administrator user)
215
216::
217
218  apt-get install git libfreetype6-dev libproj-dev libkml-dev libcairo-dev libxml2-dev libgd2-xpm-dev libxslt1-dev
219
220- extract MapServer from git repository
221
222::
223
224  git clone https://github.com/mapserver/mapserver.git
225  cd mapserver
226  git checkout branch-6-2
227  git pull
228
229- now compile MapServer
230
231::
232
233  ./configure --with-ogr --with-gdal --with-wfsclient --with-wmsclient --with-tiff --with-jpeg --with-gd --with-wcs --with-sos --with-xml2-config --with-wfs --with-fastcgi --with-proj --with-cairo --with-kml=yes --with-xslt --with-threads --with-geos
234  make
235
236- now install MapServer (as administrator user)
237
238::
239
240  make install
241
242- now add path to libraries path (as administrator user)
243
244::
245
246  nano /etc/ld.so.conf.d/mapserver.conf
247  - /usr/local/lib/
248
249- run as administrator
250
251::
252
253  ldconfig
Note: See TracBrowser for help on using the repository browser.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png