source: trunk/docs/install/installation.rst @ 917

Last change on this file since 917 was 917, checked in by djay, 5 years ago

Merge prototype-v0 branch in trunk

  • Property svn:keywords set to Date Author
  • Property svn:mime-type set to text/plain
File size: 15.4 KB
Line 
1.. _install-installation:
2
3Installation on Unix/Linux
4==========================
5
6To build and install ZOO-Project on your Web Server you will need 4
7steps :
8
9.. contents::
10    :local:
11    :depth: 1
12    :backlinks: top
13
14
15Build cgic
16----------
17
18Run the following commands from the ``thirds/cgic`` directory to build
19the cgic library.
20
21::
22
23   cd thirds/cgic
24   make
25
26The cgic library originaly come from `http://www.boutell.com/cgic
27<http://www.boutell.com/cgic>`_.
28
29.. warning::
30
31   You may need to edit the ``Makefile`` in case you are using a 64 bits
32   platform for building and your fcgi library is not located in ``/usr/lib64``.
33
34Install ZOO-Kernel
35------------------
36
37
38For the impatient
39.................
40
41Run the following commands from the directory where you :ref:`install-download` and extracted the ZOO Kernel source code in order to build the ``zoo_loader.cgi`` CGI program with default options.
42
43::
44
45   cd zoo-project/zoo-kernel
46   autoconf 
47   ./configure
48   make
49   make install
50
51This should produce executables for the *zoo_loader.cgi* CGI program
52(located per default in ``/usr/lib/cgi-bin/``) and a shared library
53``libzoo_service``  (located per default in ``/usr/local/lib``).
54
55.. warning::
56
57   Edit ZOO-Kernel installation settings in the ``main.cfg`` file (set
58   ``tmpPath`` and ``tmpUrl`` to fit your web server configuration).
59
60
61Configure options
62.................
63
64This section provides information on :ref:`kernel_index` configure options. It is recommanded to also read the :ref:`kernel_config` section for configuration technical details.
65
66
67Here is the list of available options in the same order as returned by
68``./configure --help`` command:
69
70.. contents::
71    :local:
72    :depth: 2
73    :backlinks: top
74
75Specific CGI Directory
76**********************
77
78In the case your ``cgi-bin`` is not located in ``/usr/lib/`` as it is
79assumed per default, then you can specify a specific target location
80by using the following option:
81
82.. code::
83
84    ./configure --with-cgi-dir=/Lbrary/WebServer/CGI-Executables
85
86This way, when you will run the ``make install`` command, the
87ZOO-Kernel will be deployed in the specified directory (so,
88`/Lbrary/WebServer/CGI-Executables`` in this example).
89
90Specific main.cfg location  (Optional)
91**************************************
92
93Per default, the ZOO-Kernel search for the ``main.cfg`` file from its
94installation directory but, in case you want to store this file in
95another place, then you can use the ``--with-etc-dir`` option so it
96will search for the ``main.cfg`` file in the ``sysconfdir`` directory.
97
98For instance, you can define that the directory to store the
99``main.cfg`` file is the ``/etc/zoo-project`` directory, by using the
100following command:
101
102.. code::
103
104    ./configure --with-etc-dir=yes --sysconfdir=/etc/zoo-project
105
106
107.. _zoo_install_db_backend:
108
109Use a Database Backend (Optional)
110**********************************
111
112If you want to share the ongoing informations of running services
113between various ZOO-Kernel instances then you should use this
114option: ``--with-db-backend``. This way, both the *GetStatus*,
115*GetResult* and *Dismiss* requests can be run from any host accessing
116the same database. Obviously, this will require that the ZOO-Kernel is
117able to access the Database server. To learn how to configure this
118connection and how to create this database please refer to :ref:`[1]
119<zoo_activate_db_backend>` and :ref:`[2] <zoo_create_db_backend>`
120respectively.
121
122.. note::
123    By now, the ZOO-Kernel is not able to handle correctly the
124    *Dismiss* request from any host. Nevertheless, it will provide
125    valid response from any host, but only the host which is really
126    handling the service will be able to stop it and remove all the
127    linked files.
128
129.. _zoo_create_db_backend:
130
131To create a new database to be used by the ZOO-Kernel, you have
132to load the `schema.sql
133<http://zoo-project.org/trac/browser/trunk/zoo-project/zoo-kernel/sql/schema.sql>`_
134file. For instance, you may run the following:
135
136.. code::
137
138    createdb zoo_project
139    psql zoo_project -f zoo-project/zoo-kernel/sql/schema.sql
140
141.. note::
142    You can choose another schema to store ZOO-Kernel specific
143    informations. In such a case, you would need to edit the
144    schema.sql file to uncomment line `33
145    <http://zoo-project.org/trac/browser/trunk/zoo-project/zoo-kernel/sql/schema.sql#L33>`_
146    and `34
147    <http://zoo-project.org/trac/browser/trunk/zoo-project/zoo-kernel/sql/schema.sql#L34>`_.
148
149Metadata Database (Optional)
150*****************************
151
152.. _zoo_create_metadb:
153
154It is possible to use a PostgreSQL database to store metadata
155information about WPS Services. This support is optional and require
156to be activated by using the ``--with-metadb=yes`` option.
157
158To create the database for storing the metadata informations about the
159WPS Services, you may use the following command:
160
161.. code::
162
163    createdb zoo_metadb
164    psql zoo_metadb -f zoo-project/zoo-kernel/sql/zoo_collectiondb.sql
165
166In case you want to convert an existing zcfg file then, you can use
167the ``zcfg2sql`` tool from the command line. It can be found in
168``thirds/zcfg2sql`` and can be build simply by running the ``make``
169command. After compilation you only need to give it the path of the
170zcfg file you want to obtain the SQL queries required to store the
171metadata informations in the database rather than in zcfg file.
172
173For instance you may use the following command:
174
175.. code::
176
177    #Direct import in the zoo_metadb database
178    ./zcfg2sql /Path/To/MyZCFGs/myService.zcfg | psql zoo_metadb
179    #Create a SQL file for a futur import
180    ./zcfg2sql /Path/To/MyZCFGs/myService.zcfg > myService.sql
181
182
183
184YAML Support (Optional)
185************************
186
187If ``yaml.h`` file is not found in your ``/usr/include`` directory and
188``libyaml.so`` is not found in ``/usr/lib``, a ``--with-yaml`` option
189can be used to specify its location. For instance, if the header file
190lies in ``/usr/local/include`` and the shared library is located in
191``/usr/local/lib``, you may use the following command:
192
193::
194
195  $ ./configure --with-yaml=/usr/local
196
197
198FastCGI Support (Required)
199***************************
200
201If your FastCGI library is not available in the default search path, a
202``--with-fastcgi`` option can be used to specify its location. For
203instance, if ``libfcgi.so`` lies in ``/usr/local/lib`` which is not in
204your ``LD_SEARCH_PATH``, you may use the following command:
205
206::
207
208  $ ./configure --with-fastcgi=/usr/local
209
210
211
212GDAL Support (Required)
213************************
214
215If gdal-config program is not found in your ``PATH``, a
216``--with-gdal-config`` option can be used to specify its location. For
217instance, if ``gdal-config`` lies in ``/usr/local/bin`` which is not in
218your ``PATH``, you may use the following command:
219
220::
221
222  $ ./configure --with-gdal-config=/usr/local/bin/gdal-config
223
224
225GEOS Support (Optional)
226************************
227
228If ``geos-config`` program is not found in your ``PATH``, a
229``--with-geosconfig`` option can be used to specify its location. For
230instance, if ``geos-config`` lies in ``/usr/local/bin`` which is not in
231your ``PATH``, you may use the following command:
232
233::
234
235  $ ./configure --with-geosconfig=/usr/local/bin/geos-config
236
237
238CGAL Support (Optional)
239************************
240
241If ``CGAL/Delaunay_triangulation_2.h`` program is not found in your
242``/usr/include`` directory, a ``--with-cgal`` option can be used to
243specify its location. For instance, if the file lies in
244``/usr/local/include`` which is not in your PATH, you may use the
245following command:
246
247::
248
249  $ ./configure --with-cgal=/usr/local
250
251
252
253MapServer Support (Optional)
254*****************************
255
256
257In order to activate the WMS, WFS and WCS output support using
258MapServer, the ``--with-mapserver`` option must be used. The path to
259``mapserver-config`` which is located in the source code of MapServer
260must also be set, using the following command:
261
262::
263
264  $ ./configure --with-mapserver=/path/to/your/mapserver_config/
265
266
267Read more about the :ref:`kernel-mapserver`.
268
269XML2 Support (Required)
270************************
271
272If xml2-config program is not found in PATH, a *--with-xml2config* option can be used  to specify its location. For instance, if xml2-config is installed in ``/usr/local/bin`` which is not in PATH, you may use the following command:
273
274::
275
276  $ ./configure --with-xml2config=/usr/local/bin/xml2-config
277
278Python Support (Optional)
279**************************
280
281The ``--with-python=yes`` option is required to activate the :ref:`kernel_index` Python support, using the following command:
282
283::
284
285  $ ./configure --with-python=yes
286
287This assumes that python-config is found in your ``PATH``. If not,
288then you can specify the Python installation directory using the
289following command (with Python installed in the ``/usr/local``
290directory):
291
292::
293
294  $ ./configure --with-python=/usr/local
295
296
297Python Version
298##############
299
300If multiple Python versions are available and you want to use a
301specific one, then you can use the ``--with-pyvers`` option as shown
302bellow:
303
304::
305
306  $ ./configure --with-pyvers=2.7
307
308
309.. _js-support:
310
311JavaScript Support (Optional)
312******************************
313
314In order to activate the JavaScript support for ZOO-Kernel,
315the ``--with-js=yes`` configure option must be specified. If you are using
316a "Debian-like" GNU/Linux distribution then  dpkg will be used to
317detect if the required packages are installed and you don't have to
318specify anything here. The following command is only needed (assuming
319that js_api.h and libmozjs.so are found in default directories):
320
321
322::
323
324  $ ./configure --with-js=yes
325
326If you want to use a custom installation of `SpiderMonkey
327<https://developer.mozilla.org/en/SpiderMonkey>`__ , or if you are not
328using a Debian packaging  system, then you'll have to specify the
329directory where it is installed. For  instance, if SpiderMonkey is in
330``/usr/local/``, then the following command must be used:
331
332::
333
334  $ ./configure --with-js=/usr/local
335
336
337PHP Support (Optional)
338***********************
339
340The ``--with-php=yes`` option is required to activate the
341:ref:`kernel_index` PHP support`, using the following command:
342
343::
344
345  $ ./configure --with-php=yes
346
347This assumes that ``php-config`` can be found in the ``<PATH>/bin``
348directory . So, supposing the your ``php-config`` can be found in
349``/usr/local/bin``, then use the following command:
350
351::
352
353  $ ./configure --with-php=/usr/local
354
355.. warning::
356    ZOO-Kernel optional PHP support requires a local PHP Embedded installation. Read more `here <http://zoo-project.org/trac/wiki/ZooKernel/Embed/PHP>`__.
357
358
359Java Support (Optional)
360************************
361
362In order to activate the Java support for ZOO-Kernel, the
363`--with-java` configure option must be specified and sets the
364installation path of your Java SDK. For instance,  if Java SDK is
365installed in the ``/usr/lib/jvm/java-6-sun-1.6.0.22/`` directory,
366then the following command can be used:
367
368::
369
370  $ ./configure --with-java=/usr/lib/jvm/java-6-sun-1.6.0.22/
371
372This assumes that the ``include/linux`` and ``jre/lib/i386/client/``
373subdirectories exist in ``/usr/lib/jvm/java-6-sun-1.6.0.22/``, and
374that the ``include/linux`` directory contains the ``jni.h`` headers file
375and that the ``jre/lib/i386/client/`` directory contains the ``libjvm.so``
376file.
377
378.. note::
379   You can use the `--with-java-rpath` option to produce a binary
380   aware of the libjvm location.
381
382
383.. note::
384   With Mac OS X you only have to set *macos* as the value for the
385   ``--with-java`` option to activate Java support. For example:
386
387   ::
388
389     $ ./configure --with-java=macos
390
391
392Perl Support (Optional)
393************************
394
395The ``--with-perl=yes`` option can be used for activating the
396ZOO-Kernel Perl support, as follow:
397
398::
399
400  $ ./configure --with-perl=yes
401
402This assumes that perl is found in your PATH. For instance, if Perl is
403installed in ``/usr/local`` and ``/usr/local/bin`` is not found in
404your ``PATH``, then the following command can be used (this assumes
405that ``/usr/local/bin/perl`` exists):
406
407::
408
409  $ ./configure --with-perl=/usr/local
410
411
412Orfeo Toolbox Support (Optional)
413*********************************
414
415In order to activate the optional Orfeo Toolbox support, the
416``--with-otb`` option must be used, using the following command:
417
418::
419
420  $ ./configure --with-otb=/path/to/your/otb/
421
422
423Read more about the :ref:`kernel-orfeotoolbox`.
424
425.. warning::
426    To build the Orfeo Toolbox support you will require ITK, the
427    default version of ITK is 4.5, in case you use another version,
428    please make sure to use the ``--with-itk-version`` to specificy
429    what is the version available on your system.
430
431SAGA GIS Support (Optional)
432****************************
433
434
435In order to activate the optional SAGA GIS support, the *--with-saga* option must be used, using the following command:
436
437::
438
439  $ ./configure --with-saga=/path/to/your/saga/
440
441
442Read more about the :ref:`kernel-sagagis`.
443
444.. warning::
445    In case wx-config is not in your ``PATH`` please, make sure to use
446    the ``--with-wx-config``  to specify its location.
447
448Translation support (Optional)
449******************************
450
451The ZOO-Kernel is able to translate the messages it produces in different
452natural languages. This requires that you download `the messages file
453<https://www.transifex.com/projects/p/zoo-kernel-internationalization/>`_
454translated in your language, if any. Then, for this translation
455support to work, you have to generate manually the requested file on
456your system. For instance for the French translation, you may use the
457following command:
458
459.. code::
460
461    msgfmt messagespo_fr_FR.utf8.po -o /usr/share/locale/fr/LC_MESSAGES/zoo-kernel.mo
462
463The ZOO-Kernel is also able to handle translation of
464ZOO-Services. Please, refer to :ref:`this document
465<service_translation>` for more details on the procedure to add new
466ZOO-Service translation files.
467
468.. warning::
469    The location of the final ``.mo`` file may vary depending on your
470    system setup.
471
472
473Install ZOO-Services
474--------------------
475
476.. warning::
477    We present here a global installation procedure for basics
478    ZOO-Services, for details about automatic installation of services
479    provided by :ref:`kernel-orfeotoolbox` or :ref:`kernel-sagagis`,
480    please refer to there specific documentations.
481
482Depending on the programming language used to implement the
483ZOO-Services you want to install, you will need to build a
484Services Provider. In the case of *C* and *Fotran*, you would create a
485shared library exporting the functions corresponding to all the
486ZOO-Services provided by this Services Provider. In case of *Java*,
487you will need to build a Java Class. In any other programming
488language, you should simply have to install the ServiceProvider and
489the zcfg files.
490
491If building a Shared library or a Java class is required, then you
492should find a ``Makefile`` in the service directory which is
493responsible to help you build this Services Provider. So you should
494simply run the `make` command from the Service directory to generate
495the required file.
496
497Then you simply need to copy the content of the ``cgi-env`` directory
498in ``cgi-bin``.
499
500To install the ``ogr/base-vect-ops`` Services Provider, supposing that
501your ``cgi-bin`` directory is ``/usr/local/lib`` use the following
502commands:
503
504.. code::
505
506    cd zoo-project/zoo-services/ogr/base-vect-ops
507    make
508    cp cgi-env/*.* /usr/lib/cgi-bin
509
510.. note::
511    You may also run ``make install`` directly after ``make``.
512
513
514To install the hello-py Services Provider, use the following commands:
515
516.. code::
517
518    cd zoo-project/zoo-services/hello-py/
519    cp cgi-env/* /usr/lib/cgi-bin
520
521
522Testing your installation
523-------------------------
524
525To test your installation yous should first be able to run the
526following command from the ``cgi-bin`` directory:
527
528.. code::
529
530    ./zoo_loader.cgi "request=GetCapabilities&service=WPS"
531
532
Note: See TracBrowser for help on using the repository browser.

Search

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