source: branches/PublicaMundi_David-devel/docs/install/installation.rst @ 711

Last change on this file since 711 was 711, checked in by djay, 9 years ago

Various fixes

  • Property svn:keywords set to Date Author
File size: 16.2 KB
RevLine 
[659]1.. _install-installation:
2
3Installation on Unix/Linux
[696]4==========================
[659]5
[696]6To build and install ZOO-Project on your Web Server you will need 4
7steps :
8
9 * build the cgic library,
10 * install the ZOO-Kernel,
11 * install the ZOO-Services,
12 * testing your installation.
13
14Build cgic
15----------
16
17Run the following commands from the ``thirds/cgic`` directory to build
18the cgic library.
19
20::
21
22   cd thirds/cgic
23   make
24
25The cgic library originaly come from `http://www.boutell.com/cgic
26<http://www.boutell.com/cgic>`_.
27
28.. warning:: 
29
30   You may need to edit the ``Makefile`` in case you are using a 64 bits
31   platform for building and your fcgi library is not located in ``/usr/lib64``.
32
33Install the ZOO-Kernel
34----------------------
35
36
[659]37For the impatient
[696]38.................
[659]39
40Run 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.
41
42::
43
[696]44   cd zoo-project/zoo-kernel
[659]45   autoconf 
46   ./configure
47   make
[696]48   make install
[659]49
[696]50This should produce executables for the *zoo_loader.cgi* CGI program
51(located per default in ``/usr/lib/cgi-bin/``) and a shared library
52``libzoo_service``  (located per default in ``/usr/local/lib``).
[659]53
54.. warning:: 
55
[696]56   Edit ZOO-Kernel installation settings in the ``main.cfg`` file (set
57   ``tmpPath`` and ``tmpUrl`` to fit your web server configuration).
[659]58
59
[696]60Configure options
61.................
[659]62
[696]63This section provides information on :ref:`kernel_index` configure options. It is recommanded to also read the :ref:`kernel_config` section for configuration technical details.
[659]64
[696]65Here is the list of available options as returned by ``./configure --help`` command:
[659]66
[696]67.. list-table:: Configure Options
68   :header-rows: 1
[659]69
[696]70   * - Option
71     - Description
72   * - ``--with-cgi-dir=PATH``
73     - Specifies an alternative cgi directory path (default:
74       /usr/lib/cgi-bin)
75   * - ``--with-db-backend``
76     - Relies on a database for storing status messages and response
77       files
78   * - ``--with-yaml=PATH``
79     - Specifies an alternative location for the yaml library
80   * - ``--with-fastcgi=PATH``
81     - Specifies an alternative location for the fastcgi library
82   * - ``--with-gdal-config=FILE``
83     - Specifies an alternative gdal-config file
84   * - ``--with-xml2config=FILE``
85     - Specifies an alternative xml2-config file
86   * - ``--with-python=PATH``
87     - Enables python support or specifies an alternative directory
88       for python installation (disabled by default)
89   * - ``--with-pyvers=NUM``
90     - Uses a specific python version
91   * - ``--with-js=PATH`` 
92     - Enables javascript support, disabled by default
93   * - ``--with-php=PATH`` 
94     - Enables php support or specify an alternative directory for php
95       installation, disabled by default
96   * - ``--with-java=PATH``
97     - Enables java support or specifies a JDK_HOME, disabled by
98       default
99   * - ``--with-ruby=PATH``
100     - To enable ruby support or specify an alternative directory for
101       ruby installation, disabled by default
102   * - ``--with-rvers=NUM``
103     - To use a specific ruby version
104   * - ``--with-perl=PATH``
105     - Enables perl support or specifies an alternative directory for
106       perl installation, disabled by default
107   * - ``--with-mapserver=PATH``
108     - Specifies the path for MapServer compiled source tree
109   * - ``--with-itk=PATH`` 
110     - Specifies an alternative location for the ITK library
111   * - ``--with-itk-version=VERSION``
112     - Specifies an alternative version for the ITK library
113   * - ``--with-otb=PATH``
114     - Enables optional OrfeoToolbox support
115   * - ``--with-wx-config=PATH``
116     - Specifies an alternative path for the wx-config tool
117   * - ``--with-saga=PATH``
118     - Enables optional SAGA GIS support
[659]119
120
[696]121.. code ::
[659]122
[696]123  --with-cgi-dir=PATH     Specifies an alternative cgi directory path (
124                          default: /usr/lib/cgi-bin)
125  --with-db-backend       Relies on a database for storing status messages and
126                          response files
127  --with-yaml=PATH        Specifies an alternative location for the yaml
128                          library
129  --with-fastcgi=PATH     Specifies an alternative location for the fastcgi
130                          library
131  --with-xml2config=FILE  Specifies an alternative xml2-config file
132  --with-xsltconfig=FILE  Specifies an alternative xslt-config file
133  --with-gdal-config=FILE Specifies an alternative gdal-config file
134  --with-proj=PATH        Specifies an alternative location for PROJ4 setup
135  --with-geosconfig=FILE  Specifies an alternative geos-config file
136  --with-cgal=PATH        Specifies an alternative location for CGAL setup
137  --with-mapserver=PATH   Specifies the path for MapServer compiled source
138                          tree
139  --with-python=PATH      To enable python support or Specifies an alternative
140                          directory for python installation, disabled by
141                          default
142  --with-pyvers=NUM       To use a specific python version
143  --with-js=PATH          Specifies --with-js=path-to-js to enable js support,
144                          specify --with-js on linux debian like, js support
145                          is disabled by default
146  --with-php=PATH         To enable php support or specify an alternative
147                          directory for php installation, disabled by default
148  --with-java=PATH        To enable java support, specify a JDK_HOME, disabled
149                          by default
150  --with-ruby=PATH        To enable ruby support or specify an alternative
151                          directory for ruby installation, disabled by default
152  --with-rvers=NUM        To use a specific ruby version
153  --with-perl=PATH        To enable perl support or specify an alternative
154                          directory for perl installation, disabled by default
155  --with-itk=PATH         Specifies an alternative location for the itk
156                          library
157  --with-itk-version=VERSION
158                          Specifies an alternative version for the itk library
159  --with-otb=PATH         Specifies an alternative location for the otb
160                          library
161  --with-wx-config=PATH   Specifies an alternative path for the wx-config tool
162  --with-saga=PATH        Specifies an alternative location for the SAGA-GIS
163                          library
[659]164
165
166
167
[696]168::
[659]169
[696]170  --with-cgi-dir=PATH     Specifies an alternative cgi directory path (default: /usr/lib/cgi-bin)
171  --with-db-backend       Relies on a database for storing status messages and response files
172  --with-yaml=PATH        Specifies an alternative location for the yaml library
173  --with-fastcgi=PATH     Specifies an alternative location for the fastcgi library
174  --with-gdal-config=FILE Specifies an alternative gdal-config file
175  --with-xml2config=FILE  Specifies an alternative xml2-config file
176  --with-python=PATH      Enables python support or specifies an alternative directory for python installation (disabled by default)
177  --with-pyvers=NUM       Uses a specific python version
178  --with-js=PATH          Enables javascript support, disabled by default
179  --with-php=PATH         Enables php support or specify an alternative directory for php installation, disabled by default
180  --with-java=PATH        Enables java support or specifies a JDK_HOME, disabled by default
181  --with-ruby=PATH        To enable ruby support or specify an alternative directory for ruby installation, disabled by default
182  --with-rvers=NUM        To use a specific ruby version
183  --with-perl=PATH        Enables perl support or specifies an alternative directory for perl installation, disabled by default
184  --with-mapserver=PATH   Specifies the path for MapServer compiled source tree
185  --with-itk=PATH          Specifies an alternative location for the ITK library
186  --with-itk-version=VERSION          Specifies an alternative version for the ITK library     
187  --with-otb=PATH         Enables optional OrfeoToolbox support
188  --with-wx-config=PATH   Specifies an alternative path for the wx-config tool
189  --with-saga=PATH        Enables optional SAGA GIS support
[659]190
[696]191All the options are described in more details in the following sections.
[659]192
[696]193GDAL Support (Required)
194........................
[659]195
[696]196If gdal-config program is not found in your ``PATH``, a
197``--with-gdal-config`` option can be used to specify its location. For
198instance, if ``gdal-config`` lies in ``/usr/local/bin`` which is not in
199your PATH, you may use the following command:
[659]200
[696]201::
[659]202
[696]203  $ ./configure --with-gdal-config=/usr/local/bin/gdal-config
[659]204
[696]205XML2 Support (Required)
206........................
[659]207
[696]208If 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:
[659]209
[696]210::
[659]211
[696]212  $ ./configure --with-xml2config=/usr/local/bin/xml2-config
[659]213
[711]214.. _zoo_install_db_backend:
215
[700]216Use a Database Backend (Optional)
217..................................
[659]218
[700]219If you want to share the ongoing informations of running services
220between various ZOO-Kernel instances then you should activate this
221option. This way, both the *GetStatus*, *GetResult* and *Dismiss*
222requests can be run from any host accessing the same database.
223
224.. note::
225    By now, the ZOO-Kernel is not able to handle correctly the
226    *Dismiss* request from any host. Nevertheless, it will provide
227    valid response from any host, but only the host which is really
228    handling the service will be able to stop it and remove all the
229    linked files.
230
231
232
[696]233Python Support (Optional)
234..............................................
[659]235
[696]236The ``--with-python=yes`` option is required to activate the :ref:`kernel_index` Python support, using the following command:
[659]237
[696]238::
[659]239
[696]240  $ ./configure --with-python=yes
[659]241
[696]242This assumes that python-config is found in your ``PATH``. If not,
243then you can specify the Python installation directory using the
244following command (with Python installed in the ``/usr/local``
245directory):
[659]246
[696]247::
[659]248
[696]249  $ ./configure --with-python=/usr/local
[659]250
251
[696]252Python Version
253**************
[659]254
[696]255If multiple Python versions are available and you want to use a
256specific one, then you can use the ``--with-pyvers`` option as shown
257bellow:
[659]258
[696]259::
[659]260
[696]261  $ ./configure --with-pyvers=2.7
[659]262
263
[696]264PHP Support (Optional)
265..............................................
[659]266
[696]267The ``--with-php=yes`` option is required to activate the
268:ref:`kernel_index` PHP support`, using the following command:
[659]269
[696]270::
[659]271
[696]272  $ ./configure --with-php=yes
[659]273
[696]274This assumes that ``php-config`` can be found in the ``<PATH>/bin``
275directory . So, supposing the your ``php-config`` can be found in
276``/usr/local/bin``, then use the following command:
[659]277
[696]278::
[659]279
[696]280  $ ./configure --with-php=/usr/local
[659]281
[696]282.. warning::
283    ZOO-Kernel optional PHP support requires a local PHP Embedded installation. Read more `here <http://zoo-project.org/trac/wiki/ZooKernel/Embed/PHP>`__.
[659]284
285
[696]286Perl Support (Optional)
287..............................................
[659]288
[696]289The ``--with-perl=yes`` option can be used for activating the
290ZOO-Kernel Perl support, as follow:
[659]291
[696]292::
[659]293
[696]294  $ ./configure --with-perl=yes
[659]295
[696]296This assumes that perl is found in your PATH. For instance, if Perl is
297installed in ``/usr/local`` and ``/usr/local/bin`` is not found in
298your ``PATH``, then the following command can be used (this assumes
299that ``/usr/local/bin/perl`` exists):
[659]300
[696]301::
[659]302
[696]303  $ ./configure --with-perl=/usr/local
[659]304
305
[696]306Java Support (Optional)
307..............................................
[659]308
[696]309In order to activate the Java support for ZOO-Kernel, the
310`--with-java` configure option must be specified and sets the
311installation path of your Java SDK. For instance,  if Java SDK is
312installed in the ``/usr/lib/jvm/java-6-sun-1.6.0.22/`` directory,
313then the following command can be used:
[659]314
[696]315::
[659]316
[696]317  $ ./configure --with-java=/usr/lib/jvm/java-6-sun-1.6.0.22/
[659]318
[696]319This assumes that the ``include/linux`` and ``jre/lib/i386/client/``
320subdirectories exist in ``/usr/lib/jvm/java-6-sun-1.6.0.22/``, and
321that the ``include/linux`` directory contains the ``jni.h`` headers file
322and that the ``jre/lib/i386/client/`` directory contains the ``libjvm.so``
323file.
[659]324
325
[696]326.. note:: 
327   With Mac OS X you only have to set *macos* as the value for the
328   ``--with-java`` option to activate Java support. For example:
[659]329
[696]330   ::
[659]331
[696]332     $ ./configure --with-java=macos
[659]333
[696]334.. _js-support:
[659]335
[696]336JavaScript Support (Optional)
337..............................................
[659]338
[696]339In order to activate the JavaScript support for ZOO-Kernel,
340the ``--with-js=yes`` configure option must be specified. If you are using
341a "Debian-like" GNU/Linux distribution then  dpkg will be used to
342detect if the required packages are installed and you don't have to
343specify anything here. The following command is only needed (assuming
344that js_api.h and libmozjs.so are found in default directories):
[659]345
346
[696]347::
[659]348
[696]349  $ ./configure --with-js=yes
[659]350
[696]351If you want to use a custom installation of `SpiderMonkey
352<https://developer.mozilla.org/en/SpiderMonkey>`__ , or if you are not
353using a Debian packaging  system, then you'll have to specify the
354directory where it is installed. For  instance, if SpiderMonkey is in
355``/usr/local/``, then the following command must be used:
[659]356
[696]357::
[659]358
[696]359  $ ./configure --with-js=/usr/local
[659]360
361
[696]362MapServer Support (Optional)
363..............................................
[659]364
365
[696]366In order to activate the WMS, WFS and WCS output support using
367MapServer, the ``--with-mapserver`` option must be used. The path to
368``mapserver-config`` which is located in the source code of MapServer
369must also be set, using the following command:
[659]370
[696]371::
[659]372
[696]373  $ ./configure --with-mapserver=/path/to/your/mapserver_config/
[659]374
375
[696]376Read more about the :ref:`kernel-mapserver`.
[659]377
378
[696]379Orfeo Toolbox Support (Optional)
380.....................................................
[659]381
[696]382In order to activate the optional Orfeo Toolbox support, the
383``--with-otb`` option must be used, using the following command:
[659]384
[696]385::
[659]386
[696]387  $ ./configure --with-otb=/path/to/your/otb/
[659]388
389
[696]390Read more about the :ref:`kernel-orfeotoolbox`.
[659]391
[696]392.. warning::
393    To build the Orfeo Toolbox support you will require ITK, the
394    default version of ITK is 4.5, in case you use another version,
395    please make sure to use the ``--with-itk-version`` to specificy
396    what is the version available on your system.
[659]397
[696]398SAGA GIS Support (Optional)
399.....................................................
[659]400
401
[696]402In order to activate the optional SAGA GIS support, the *--with-saga* option must be used, using the following command:
[659]403
404::
405
[696]406  $ ./configure --with-saga=/path/to/your/saga/
[659]407
408
[696]409Read more about the :ref:`kernel-sagagis`.
[659]410
[696]411.. warning::
412    In case wx-config is not in your ``PATH`` please, make sure to use
413    the ``--with-wx-config``  to specify its location.
[659]414
[696]415Install ZOO-Services
416--------------------
[659]417
[696]418.. warning::
419    We present here a global installation procedure for basics
420    ZOO-Services, for details about automatic installation of services
421    provided by :ref:`kernel-orfeotoolbox` or :ref:`kernel-sagagis`,
422    please refer to there specific documentations.
[659]423
[696]424Depending on the programming language used to implement the
425ZOO-Services you want to install, you will need to build a
426Services Provider. In the case of *C* and *Fotran*, you would create a
427shared library exporting the functions corresponding to all the
428ZOO-Services provided by this Services Provider. In case of *Java*,
429you will need to build a Java Class. In any other programming
430language, you should simply have to install the ServiceProvider and
431the zcfg files.
[659]432
[696]433If building a Shared library or a Java class is required, then you
434should find a ``Makefile`` in the service directory which is
435responsible to help you build this Services Provider. So you should
436simply run the `make` command from the Service directory to generate
437the required file.
[659]438
[696]439Then you simply need to copy the content of the ``cgi-env`` directory
440in ``cgi-bin``.
[659]441
[696]442To install the ``ogr/base-vect-ops`` Services Provider, supposing that
443your ``cgi-bin`` directory is ``/usr/local/lib`` use the following
444commands:
[659]445
[696]446.. code::
[659]447
[696]448    cd zoo-project/zoo-services/ogr/base-vect-ops
449    make
450    cp cgi-env/*.* /usr/lib/cgi-bin
[659]451
[696]452.. note::
453    You may also run ``make install`` directly after ``make``.
[659]454
455
[696]456To install the hello-py Services Provider, use the following commands:
[659]457
[696]458.. code::
459
460    cd zoo-project/zoo-services/hello-py/
461    cp cgi-env/* /usr/lib/cgi-bin
462
463
464Testing your installation
465-------------------------
466
467To test your installation yous should first be able to run the
468following command from the ``cgi-bin`` directory:
469
470.. code::
471
472    ./zoo_loader.cgi "request=GetCapabilities&service=WPS"
473
474
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