[130] | 1 | .. _kernel-installation: |
---|
| 2 | |
---|
[136] | 3 | Installation |
---|
| 4 | ============ |
---|
[130] | 5 | |
---|
| 6 | .. contents:: Table of Contents |
---|
| 7 | :depth: 4 |
---|
| 8 | :backlinks: top |
---|
| 9 | |
---|
[210] | 10 | This page provides documentation on how to compile then install the ZOO Kernel on Unix and Win32 platforms. |
---|
[130] | 11 | |
---|
[210] | 12 | Obtaining the ZOO Kernel Source |
---|
| 13 | ------------------------------- |
---|
| 14 | |
---|
| 15 | Use the following command to get the ZOO Kernel source code through Subversion: |
---|
| 16 | |
---|
| 17 | :: |
---|
| 18 | |
---|
| 19 | svn checkout http://svn.zoo-project.org/svn/trunk zoo-project |
---|
| 20 | |
---|
| 21 | For users which get a developer account, use the following: |
---|
| 22 | |
---|
| 23 | :: |
---|
| 24 | |
---|
| 25 | sed "s:\[tunnels\]:\[tunnels\]\nzoosvn = /usr/bin/ssh -p 1046:g" -i ~/.subversion/config |
---|
| 26 | svn co svn+zoosvn://svn.zoo-project.org/var/svn/repos/trunk zoo-project |
---|
| 27 | |
---|
| 28 | The first line of the instruction above defines a specific tunnel to access the svn server through |
---|
| 29 | the SSH protocol. Indeed, the ZOO SVN server listens on the 1046 (1024+22) port rather than the default one (22). |
---|
| 30 | |
---|
| 31 | Prerequisites |
---|
| 32 | ------------- |
---|
| 33 | |
---|
| 34 | The following libraries are required on your system before you can install the ZOO Kernel: |
---|
| 35 | |
---|
| 36 | - autoconf ( http://www.gnu.org/software/autoconf/ ) |
---|
| 37 | - cgic ( http://www.boutell.com/cgic ) |
---|
| 38 | - cURL ( http://curl.haxx.se ) |
---|
| 39 | - FastCGI ( http://www.fastcgi.com ) |
---|
| 40 | - Flex & Bison ( http://flex.sourceforge.net/ http://www.gnu.org/software/bison/ ) |
---|
| 41 | - libxml2 ( http://xmlsoft.org ) |
---|
| 42 | - OpenSSL ( http://www.openssl.org ) |
---|
| 43 | - Python ( http://www.python.org ) |
---|
| 44 | |
---|
| 45 | Optional libraries include: |
---|
| 46 | |
---|
| 47 | - PHP Embedded (optional) ( http://www.php.net ) |
---|
| 48 | - Java SDK (optional) ( http://java.sun.com ) |
---|
| 49 | - SpiderMonkey (optional) ( http://www.mozilla.org/js/spidermonkey/ ) |
---|
| 50 | |
---|
| 51 | Compile libcgic |
---|
| 52 | --------------- |
---|
| 53 | |
---|
| 54 | The first step is to compile libcgic from the ``zoo-project/thirds`` directory. For such a task, please use |
---|
| 55 | the following command: |
---|
| 56 | |
---|
| 57 | :: |
---|
| 58 | |
---|
| 59 | cd thirds/cgic206 |
---|
| 60 | make |
---|
| 61 | |
---|
| 62 | Make sure that a ``libcgic.a`` is created in your ``zoo-project/thirds/cgic206`` directory. If yes, then |
---|
| 63 | you can go to the next step. |
---|
| 64 | |
---|
| 65 | On Windows, rather than using the make command, please use: |
---|
| 66 | |
---|
| 67 | :: |
---|
| 68 | |
---|
| 69 | nmake /f makefile.vc. |
---|
| 70 | |
---|
| 71 | .. warning:: |
---|
| 72 | If you don't compile libcgic first, and try to compile the ZOO Kernel, you will get an error such as *cannot find -lcgic* |
---|
| 73 | |
---|
[130] | 74 | Unix |
---|
| 75 | ---- |
---|
| 76 | |
---|
[210] | 77 | For Unix users, the ZOO Kernel comes with a GNU autoconf "configure" script that should take care of (hopefully!) |
---|
[130] | 78 | all compilation issues for you. |
---|
| 79 | |
---|
[210] | 80 | The configure script won't work on Windows. See section :ref:`WIN32 <win32>` for details on compiling |
---|
| 81 | on Windows systems. |
---|
[130] | 82 | |
---|
| 83 | For the impatient |
---|
| 84 | ***************** |
---|
| 85 | |
---|
[210] | 86 | To build the ``zoo_loader.cgi`` CGI program with the default options, cd to the directory |
---|
| 87 | where you extracted the ZOO Kernel source code package and use the following commands: |
---|
[130] | 88 | |
---|
| 89 | :: |
---|
| 90 | |
---|
| 91 | $ cd zoo-kernel |
---|
[210] | 92 | $ autoconf |
---|
[130] | 93 | $ ./configure |
---|
| 94 | $ make |
---|
| 95 | |
---|
[210] | 96 | Unless something went wrong, you should have executables in the current directory for the ``zoo_loader.cgi`` |
---|
| 97 | CGI program. You can copy the ``zoo_loader.cgi`` program and the ``main.cfg`` file to your HTTP server's CGI |
---|
[130] | 98 | directory and start using it. |
---|
| 99 | |
---|
| 100 | At this step your ZOO-Kernel should work. Nevertheless, don't forget to correct the main.cfg settings |
---|
[210] | 101 | to set ``tmpPath`` and ``tmpUrl`` to fit your web server configuration. |
---|
[130] | 102 | |
---|
| 103 | Configure Options |
---|
| 104 | ***************** |
---|
| 105 | |
---|
| 106 | Here is the list of available options as returned by *./configure --help*: |
---|
| 107 | |
---|
| 108 | :: |
---|
| 109 | |
---|
| 110 | --with-gdal-config=FILE specify an alternative gdal-config file |
---|
| 111 | --with-xml2config=FILE specify an alternative xml2-config file |
---|
[210] | 112 | --with-python=PATH To enable python support or specify an alternative |
---|
[130] | 113 | directory for python installation, disabled by |
---|
| 114 | default |
---|
[210] | 115 | --with-php=PATH To enable php support or specify an alternative |
---|
[130] | 116 | directory for php installation, disabled by default |
---|
[210] | 117 | --with-perl=PATH To enable perl support or specify an alternative |
---|
[130] | 118 | directory for perl installation, disabled by default |
---|
[210] | 119 | --with-java=PATH To enable java support, specify a JDK_HOME, |
---|
[130] | 120 | disabled by default |
---|
[210] | 121 | --with-js=PATH specify --with-js=path-to-js to enable js support, |
---|
[130] | 122 | specify --with-js on linux debian like, js support |
---|
| 123 | is disabled by default |
---|
| 124 | |
---|
| 125 | All the options are described in more details below. |
---|
| 126 | |
---|
| 127 | (Required) GDAL Support |
---|
| 128 | ^^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 129 | |
---|
| 130 | If your gdal-config program is not found in your PATH then you can use the |
---|
[210] | 131 | ``--with-gdal-config`` option to specify its location. For instance, let's suppose that your gdal-config |
---|
[130] | 132 | was installed in /usr/local/bin and this directory is not in your PATH, then you can use |
---|
| 133 | the following command: |
---|
| 134 | |
---|
| 135 | :: |
---|
| 136 | |
---|
| 137 | $ ./configure --with-gdal-config=/usr/local/bin/gdal-config |
---|
| 138 | |
---|
| 139 | (Required) XML2 Support |
---|
| 140 | ^^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 141 | |
---|
| 142 | If your xml2-config program is not found in your PATH then you can use the |
---|
[210] | 143 | ``--with-xml2config`` option to specify its location. For instance, let's suppose that |
---|
| 144 | your xml2-config was installed in /usr/local/bin and this directory is not in your PATH, |
---|
[130] | 145 | then you can use the following command: |
---|
| 146 | |
---|
| 147 | :: |
---|
| 148 | |
---|
| 149 | $ ./configure --with-xml2config=/usr/local/bin/xml2-config |
---|
| 150 | |
---|
| 151 | (Optional) Python Support |
---|
| 152 | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 153 | |
---|
[210] | 154 | If you want to activate Python support for the ZOO Kernel then you will have to use the |
---|
| 155 | ``--with-python`` option. If your python-config program is found in your PATH then you |
---|
| 156 | don't have to specify the path where Python was installed, such as: |
---|
[130] | 157 | |
---|
| 158 | :: |
---|
| 159 | |
---|
| 160 | $ ./configure --with-python |
---|
| 161 | |
---|
[210] | 162 | This assumes that python-config is found in your PATH. |
---|
[130] | 163 | |
---|
[210] | 164 | In the case that your python-config is not found in your PATH, then you can specify the Python |
---|
| 165 | installation directory you are using. For instance, let's suppose that you installed |
---|
| 166 | Python in /usr/local, then you can use the following command: |
---|
[130] | 167 | |
---|
| 168 | :: |
---|
| 169 | |
---|
| 170 | $ ./configure --with-python=/usr/local |
---|
| 171 | |
---|
[210] | 172 | This assumes that /usr/local/bin/python-config exists. |
---|
[130] | 173 | |
---|
| 174 | (Optional) PHP Support |
---|
| 175 | ^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 176 | |
---|
[210] | 177 | To be able to activate PHP support for the ZOO Kernel you'll need to get a local PHP Embedded |
---|
| 178 | installation; for more information about the required configure options when compiling PHP you |
---|
| 179 | can refer to this page : |
---|
[130] | 180 | |
---|
| 181 | http://zoo-project.org/trac/wiki/ZooKernel/Embed/PHP |
---|
| 182 | |
---|
[210] | 183 | If you want to activate the PHP support for the ZOO Kernel then you will have to use the |
---|
| 184 | ``--with-php`` option. If your php-config program is found in your PATH then you don't have |
---|
| 185 | to specify the path where PHP was installed, then you can use the following commnd: |
---|
[130] | 186 | |
---|
| 187 | :: |
---|
| 188 | |
---|
| 189 | $ ./configure --with-php |
---|
| 190 | |
---|
[210] | 191 | This assumes that php-config is found in your PATH. |
---|
[130] | 192 | |
---|
[210] | 193 | In the case that your php-config is not found in your PATH, then you can specify the PHP installation |
---|
| 194 | directory you are using. For instance, let's suppose that you installed PHP in /usr/local, |
---|
[130] | 195 | then you can use the following command: |
---|
| 196 | |
---|
| 197 | :: |
---|
| 198 | |
---|
| 199 | $ ./configure --with-php=/usr/local |
---|
| 200 | |
---|
[210] | 201 | This assumes that /usr/local/bin/php-config exists. |
---|
[130] | 202 | |
---|
| 203 | (Optional) Perl Support |
---|
| 204 | ^^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 205 | |
---|
[210] | 206 | If you want to activate Perl support for the ZOO Kernel then you will have to use the |
---|
| 207 | ``--with-perl`` option. If you do not set any value to this option, then the perl program will |
---|
| 208 | be searched in your PATH. So in such a case, you can use the following command: |
---|
[130] | 209 | |
---|
| 210 | :: |
---|
| 211 | |
---|
| 212 | $ ./configure --with-perl |
---|
| 213 | |
---|
[210] | 214 | This assumes that perl is found in your PATH. |
---|
[130] | 215 | |
---|
[210] | 216 | In the other case, for custom Perl installations, you can set the installation directory. For instance, |
---|
| 217 | let's suppose that you installed Perl in /usr/local and /usr/local/bin is not in your PATH, |
---|
[130] | 218 | then you can use the following command: |
---|
| 219 | |
---|
| 220 | :: |
---|
| 221 | |
---|
| 222 | $ ./configure --with-perl=/usr/local |
---|
| 223 | |
---|
[210] | 224 | This assumes that /usr/local/bin/perl exists. |
---|
[130] | 225 | |
---|
| 226 | (Optional) Java Support |
---|
| 227 | ^^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 228 | |
---|
[210] | 229 | If you want to activate Java support for the ZOO Kernel then you will have to use the |
---|
| 230 | ``--with-java`` option and set the installation path of your Java SDK. For instance, |
---|
| 231 | let's suppose that your Java SDK was installed in the /usr/lib/jvm/java-6-sun-1.6.0.22/ directory, |
---|
[130] | 232 | then you can use the following command: |
---|
| 233 | |
---|
| 234 | :: |
---|
| 235 | |
---|
| 236 | $ ./configure --with-java=/usr/lib/jvm/java-6-sun-1.6.0.22/ |
---|
| 237 | |
---|
[210] | 238 | This assumes that the include/linux and jre/lib/i386/client/ subdirectories exist in |
---|
[130] | 239 | /usr/lib/jvm/java-6-sun-1.6.0.22/, include/linux contains the jni.h headers file and |
---|
| 240 | jre/lib/i386/client/ contains the libjvm.so file. |
---|
| 241 | |
---|
[210] | 242 | .. note:: |
---|
| 243 | With Mac OS X you only have to set ``macos`` as the value for the ``--with-java`` option |
---|
| 244 | to activate Java support. For example: |
---|
[130] | 245 | |
---|
[210] | 246 | :: |
---|
[130] | 247 | |
---|
[210] | 248 | $ ./configure --with-java=macos |
---|
[130] | 249 | |
---|
| 250 | (Optional) JavaScript Support |
---|
| 251 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
---|
| 252 | |
---|
[210] | 253 | If you want to activate JavaScript support for the ZOO Kernel then you will have to use |
---|
| 254 | the ``--with-js`` option. If you are using a "Debian-like" GNU/Linux distribution then |
---|
| 255 | dpkg will be used to detect if the required packages are installed and you don't have to |
---|
[130] | 256 | specify anything here, so you can use the following command: |
---|
| 257 | |
---|
| 258 | :: |
---|
| 259 | |
---|
| 260 | $ ./configure --with-js |
---|
| 261 | |
---|
[210] | 262 | This assumes that js_api.h and libmozjs.so are found in default directories. |
---|
[130] | 263 | |
---|
[210] | 264 | If you have a custom installation of SpiderMonkey or you are not using a Debian packaging |
---|
[130] | 265 | system, then you'll have to specify the directory where you installed it. For |
---|
[210] | 266 | instance, let's suppose that you installed your SpiderMonkey in /usr, then you'll |
---|
[130] | 267 | have to use the following command: |
---|
| 268 | |
---|
| 269 | :: |
---|
| 270 | |
---|
| 271 | $ ./configure --with-js=/usr |
---|
| 272 | |
---|
[210] | 273 | This assumes that the /usr/include/js exists and contains the js_api.h headers file and |
---|
[130] | 274 | /usr/lib contains libmozjs.so file. |
---|
| 275 | |
---|
[210] | 276 | .. _win32: |
---|
| 277 | |
---|
| 278 | OpenSUSE |
---|
| 279 | ******** |
---|
| 280 | |
---|
[211] | 281 | Zoo-Kernel is maintained as a package in `OpenSUSE Build Service (OBS) <https://build.opensuse.org/package/show?package=zoo-kernel&project=Application%3AGeo>`__. |
---|
| 282 | This way, rpm's are provided for all versions of openSUSE Linux (11.2, 11.3, 11.4, Factory). |
---|
| 283 | |
---|
| 284 | Stable Releases |
---|
| 285 | ^^^^^^^^^^^^^^^ |
---|
| 286 | |
---|
| 287 | For installing Zoo-Kernel in openSUSE there are 3 ways available: |
---|
| 288 | |
---|
| 289 | One Click Installer |
---|
| 290 | ################### |
---|
| 291 | |
---|
| 292 | One-click installer that can be found `here <http://software.opensuse.org/search?q=zoo-kernel&baseproject=openSUSE%3A11.4&lang=en&exclude_debug=true>`__. |
---|
| 293 | For openSUSE 11.4 this is the direct `link <http://software.opensuse.org/ymp/Application:Geo/openSUSE_11.4/zoo-kernel.ymp?base=openSUSE%3A11.4&query=zoo-kernel>`__. |
---|
| 294 | |
---|
| 295 | Yast Software Manager using a GUI |
---|
| 296 | ################################# |
---|
| 297 | |
---|
| 298 | The `Application:Geo <http://download.opensuse.org/repositories/Application:/Geo/>`__ repository has to be added |
---|
| 299 | to the Software Repositories and then Zoo-kernel can be found in Software Management through search. |
---|
| 300 | |
---|
| 301 | Command line (as root for openSUSE 11.4) |
---|
| 302 | ######################################## |
---|
| 303 | |
---|
| 304 | :: |
---|
| 305 | |
---|
| 306 | zypper ar http://download.opensuse.org/repositories/Application:/Geo/openSUSE_11.4/ |
---|
| 307 | zypper refresh |
---|
| 308 | zypper install zoo-kernel |
---|
| 309 | |
---|
| 310 | Unstable Version |
---|
| 311 | ^^^^^^^^^^^^^^^^ |
---|
| 312 | |
---|
| 313 | The latest development version of ZOO-Kernel can be found in OBS under the project `home:tzotsos <https://build.opensuse.org/project/show?project=home%3Atzotsos>`__. |
---|
| 314 | ZOO-Kernel packages are maintained and tested there before being released to the Application:Geo repository. |
---|
| 315 | |
---|
| 316 | Installation methods are identical as the stable version. Make sure to use `this <http://download.opensuse.org/repositories/home:/tzotsos/>`__ repository instead. |
---|
| 317 | |
---|
| 318 | Command line installation (as root for openSUSE 11.4) |
---|
| 319 | ##################################################### |
---|
| 320 | |
---|
| 321 | :: |
---|
| 322 | |
---|
| 323 | zypper ar http://download.opensuse.org/repositories/home:/tzotsos/openSUSE_11.4/ |
---|
| 324 | zypper refresh |
---|
| 325 | zypper install zoo-kernel |
---|
| 326 | zypper install zoo-kernel-grass-bridge |
---|
| 327 | |
---|
| 328 | Additionally, there is the option of adding the zoo-wps-grass-bridge package. This option will automatically install grass7 (svn trunk). |
---|
| 329 | |
---|
| 330 | Try the Installation |
---|
| 331 | ^^^^^^^^^^^^^^^^^^^^ |
---|
| 332 | |
---|
| 333 | - http://localhost/cgi-bin/zoo_loader.cgi?ServiceProvider=&metapath=&Service=WPS&Request=GetCapabilities&Version=1.0.0 |
---|
| 334 | - http://localhost/cgi-bin/zoo_loader.cgi?ServiceProvider=&metapath=&Service=WPS&Request=DescribeProcess&Version=1.0.0&Identifier=HelloPy |
---|
| 335 | - http://localhost/cgi-bin/zoo_loader.cgi?ServiceProvider=&metapath=&Service=WPS&Request=Execute&Version=1.0.0&Identifier=HelloPy&DataInputs=a=myname |
---|
| 336 | |
---|
| 337 | |
---|
[130] | 338 | WIN32 |
---|
| 339 | ----- |
---|
| 340 | |
---|
| 341 | To be written soon ... |
---|
| 342 | |
---|
| 343 | |
---|