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

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

Small fixes in the main documentation.

  • Property svn:keywords set to Date Author
File size: 15.6 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
214
[696]215Python Support (Optional)
216..............................................
[659]217
[696]218The ``--with-python=yes`` option is required to activate the :ref:`kernel_index` Python support, using the following command:
[659]219
[696]220::
[659]221
[696]222  $ ./configure --with-python=yes
[659]223
[696]224This assumes that python-config is found in your ``PATH``. If not,
225then you can specify the Python installation directory using the
226following command (with Python installed in the ``/usr/local``
227directory):
[659]228
[696]229::
[659]230
[696]231  $ ./configure --with-python=/usr/local
[659]232
233
[696]234Python Version
235**************
[659]236
[696]237If multiple Python versions are available and you want to use a
238specific one, then you can use the ``--with-pyvers`` option as shown
239bellow:
[659]240
[696]241::
[659]242
[696]243  $ ./configure --with-pyvers=2.7
[659]244
245
[696]246PHP Support (Optional)
247..............................................
[659]248
[696]249The ``--with-php=yes`` option is required to activate the
250:ref:`kernel_index` PHP support`, using the following command:
[659]251
[696]252::
[659]253
[696]254  $ ./configure --with-php=yes
[659]255
[696]256This assumes that ``php-config`` can be found in the ``<PATH>/bin``
257directory . So, supposing the your ``php-config`` can be found in
258``/usr/local/bin``, then use the following command:
[659]259
[696]260::
[659]261
[696]262  $ ./configure --with-php=/usr/local
[659]263
[696]264.. warning::
265    ZOO-Kernel optional PHP support requires a local PHP Embedded installation. Read more `here <http://zoo-project.org/trac/wiki/ZooKernel/Embed/PHP>`__.
[659]266
267
[696]268Perl Support (Optional)
269..............................................
[659]270
[696]271The ``--with-perl=yes`` option can be used for activating the
272ZOO-Kernel Perl support, as follow:
[659]273
[696]274::
[659]275
[696]276  $ ./configure --with-perl=yes
[659]277
[696]278This assumes that perl is found in your PATH. For instance, if Perl is
279installed in ``/usr/local`` and ``/usr/local/bin`` is not found in
280your ``PATH``, then the following command can be used (this assumes
281that ``/usr/local/bin/perl`` exists):
[659]282
[696]283::
[659]284
[696]285  $ ./configure --with-perl=/usr/local
[659]286
287
[696]288Java Support (Optional)
289..............................................
[659]290
[696]291In order to activate the Java support for ZOO-Kernel, the
292`--with-java` configure option must be specified and sets the
293installation path of your Java SDK. For instance,  if Java SDK is
294installed in the ``/usr/lib/jvm/java-6-sun-1.6.0.22/`` directory,
295then the following command can be used:
[659]296
[696]297::
[659]298
[696]299  $ ./configure --with-java=/usr/lib/jvm/java-6-sun-1.6.0.22/
[659]300
[696]301This assumes that the ``include/linux`` and ``jre/lib/i386/client/``
302subdirectories exist in ``/usr/lib/jvm/java-6-sun-1.6.0.22/``, and
303that the ``include/linux`` directory contains the ``jni.h`` headers file
304and that the ``jre/lib/i386/client/`` directory contains the ``libjvm.so``
305file.
[659]306
307
[696]308.. note:: 
309   With Mac OS X you only have to set *macos* as the value for the
310   ``--with-java`` option to activate Java support. For example:
[659]311
[696]312   ::
[659]313
[696]314     $ ./configure --with-java=macos
[659]315
[696]316.. _js-support:
[659]317
[696]318JavaScript Support (Optional)
319..............................................
[659]320
[696]321In order to activate the JavaScript support for ZOO-Kernel,
322the ``--with-js=yes`` configure option must be specified. If you are using
323a "Debian-like" GNU/Linux distribution then  dpkg will be used to
324detect if the required packages are installed and you don't have to
325specify anything here. The following command is only needed (assuming
326that js_api.h and libmozjs.so are found in default directories):
[659]327
328
[696]329::
[659]330
[696]331  $ ./configure --with-js=yes
[659]332
[696]333If you want to use a custom installation of `SpiderMonkey
334<https://developer.mozilla.org/en/SpiderMonkey>`__ , or if you are not
335using a Debian packaging  system, then you'll have to specify the
336directory where it is installed. For  instance, if SpiderMonkey is in
337``/usr/local/``, then the following command must be used:
[659]338
[696]339::
[659]340
[696]341  $ ./configure --with-js=/usr/local
[659]342
343
[696]344MapServer Support (Optional)
345..............................................
[659]346
347
[696]348In order to activate the WMS, WFS and WCS output support using
349MapServer, the ``--with-mapserver`` option must be used. The path to
350``mapserver-config`` which is located in the source code of MapServer
351must also be set, using the following command:
[659]352
[696]353::
[659]354
[696]355  $ ./configure --with-mapserver=/path/to/your/mapserver_config/
[659]356
357
[696]358Read more about the :ref:`kernel-mapserver`.
[659]359
360
[696]361Orfeo Toolbox Support (Optional)
362.....................................................
[659]363
[696]364In order to activate the optional Orfeo Toolbox support, the
365``--with-otb`` option must be used, using the following command:
[659]366
[696]367::
[659]368
[696]369  $ ./configure --with-otb=/path/to/your/otb/
[659]370
371
[696]372Read more about the :ref:`kernel-orfeotoolbox`.
[659]373
[696]374.. warning::
375    To build the Orfeo Toolbox support you will require ITK, the
376    default version of ITK is 4.5, in case you use another version,
377    please make sure to use the ``--with-itk-version`` to specificy
378    what is the version available on your system.
[659]379
[696]380SAGA GIS Support (Optional)
381.....................................................
[659]382
383
[696]384In order to activate the optional SAGA GIS support, the *--with-saga* option must be used, using the following command:
[659]385
386::
387
[696]388  $ ./configure --with-saga=/path/to/your/saga/
[659]389
390
[696]391Read more about the :ref:`kernel-sagagis`.
[659]392
[696]393.. warning::
394    In case wx-config is not in your ``PATH`` please, make sure to use
395    the ``--with-wx-config``  to specify its location.
[659]396
[696]397Install ZOO-Services
398--------------------
[659]399
[696]400.. warning::
401    We present here a global installation procedure for basics
402    ZOO-Services, for details about automatic installation of services
403    provided by :ref:`kernel-orfeotoolbox` or :ref:`kernel-sagagis`,
404    please refer to there specific documentations.
[659]405
[696]406Depending on the programming language used to implement the
407ZOO-Services you want to install, you will need to build a
408Services Provider. In the case of *C* and *Fotran*, you would create a
409shared library exporting the functions corresponding to all the
410ZOO-Services provided by this Services Provider. In case of *Java*,
411you will need to build a Java Class. In any other programming
412language, you should simply have to install the ServiceProvider and
413the zcfg files.
[659]414
[696]415If building a Shared library or a Java class is required, then you
416should find a ``Makefile`` in the service directory which is
417responsible to help you build this Services Provider. So you should
418simply run the `make` command from the Service directory to generate
419the required file.
[659]420
[696]421Then you simply need to copy the content of the ``cgi-env`` directory
422in ``cgi-bin``.
[659]423
[696]424To install the ``ogr/base-vect-ops`` Services Provider, supposing that
425your ``cgi-bin`` directory is ``/usr/local/lib`` use the following
426commands:
[659]427
[696]428.. code::
[659]429
[696]430    cd zoo-project/zoo-services/ogr/base-vect-ops
431    make
432    cp cgi-env/*.* /usr/lib/cgi-bin
[659]433
[696]434.. note::
435    You may also run ``make install`` directly after ``make``.
[659]436
437
[696]438To install the hello-py Services Provider, use the following commands:
[659]439
[696]440.. code::
441
442    cd zoo-project/zoo-services/hello-py/
443    cp cgi-env/* /usr/lib/cgi-bin
444
445
446Testing your installation
447-------------------------
448
449To test your installation yous should first be able to run the
450following command from the ``cgi-bin`` directory:
451
452.. code::
453
454    ./zoo_loader.cgi "request=GetCapabilities&service=WPS"
455
456
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