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