| 1 | .. include:: <xhtml1-lat1.txt> |
---|
| 2 | .. include:: <xhtml1-symbol.txt> |
---|
| 3 | |
---|
| 4 | .. _install-onwindows: |
---|
| 5 | |
---|
| 6 | |
---|
| 7 | Installation on Windows |trade| |
---|
| 8 | ==================== |
---|
| 9 | |
---|
| 10 | Install ZOO-Project binaries |
---|
| 11 | ------------------------------- |
---|
| 12 | |
---|
| 13 | .. note:: |
---|
| 14 | The content of the ZOO-Project Windows-Binaries is based on |
---|
| 15 | `GISInternals SDK <http://www.gisinternals.com/release.php>`__, |
---|
| 16 | make sure to refer to license informations. |
---|
| 17 | |
---|
| 18 | .. note:: |
---|
| 19 | When using the ZOO-Project Windows-Binaries, you can decide if you |
---|
| 20 | want the Java support activated or not (which is the case per |
---|
| 21 | default). Indeed, once your installation has been done, you will |
---|
| 22 | have both a `zoo_loader.cgi` and `zoo_loader_java.cgi` which |
---|
| 23 | correspond respectively to the ZOO-Kernel without and with Java |
---|
| 24 | support activated. So, in case you want to use the Java support, |
---|
| 25 | simply rename the `zoo_loader_jave.cgi` file located in |
---|
| 26 | `c:\\inetpub\\cgi-bin` to `zoo_loader.cgi`. |
---|
| 27 | |
---|
| 28 | |
---|
| 29 | Using the installer |
---|
| 30 | ................... |
---|
| 31 | |
---|
| 32 | Prior to run the ZOO-Project-Installer, please make sure you have IIS |
---|
| 33 | and `Python <https://www.python.org/downloads/windows/>`__ setup on |
---|
| 34 | your machine. Then download the `ZOO-Project-Installer |
---|
| 35 | <https://bintray.com/gfenoy/ZOO-Project/Windows-Binaries/view>`__ |
---|
| 36 | corresponding to your platform. The first time you will run the |
---|
| 37 | installer binary, you may be prompted to authorize it to run. Once the |
---|
| 38 | installer has been run, simply access the following link: |
---|
| 39 | http://localhost/zoo-demo/ to access your local demo application. |
---|
| 40 | |
---|
| 41 | Install by hand |
---|
| 42 | ................... |
---|
| 43 | |
---|
| 44 | Prior to run the ZOO-Project-Installer, please make sure you have IIS |
---|
| 45 | and `Python <https://www.python.org/downloads/windows/>`__ setup on |
---|
| 46 | your machine. Then download the `ZOO-Project |
---|
| 47 | <https://bintray.com/gfenoy/ZOO-Project/Windows-Binaries/view>`__ |
---|
| 48 | archive corresponding to your platform. Uncompress it, then move |
---|
| 49 | `cgi-bin`, `data` and `tmp` from uncompressed folder to `c:\\inetpub`, |
---|
| 50 | also move `wwwroot\\zoo-demo` and `wwwroot\\tmp` to |
---|
| 51 | `c:\\inetpub\\wwwroot`. To finish the installation, run the folllowing |
---|
| 52 | command as administrator to allow the `zoo_loader.cgi` to run from |
---|
| 53 | http://localhost/cgi-bin/zoo_loader.cgi: |
---|
| 54 | |
---|
| 55 | :: |
---|
| 56 | |
---|
| 57 | cd C:\Windows\System32\inetsrv |
---|
| 58 | appcmd.exe add vdirs /app.name:"Default Web Site/" /path:/cgi-bin /physicalPath:c:\inetpub\cgi-bin |
---|
| 59 | appcmd set config /section:handlers /+[name='CGI-exe1',path='*.cgi',verb='*',modules='CgiModule'] |
---|
| 60 | |
---|
| 61 | |
---|
| 62 | |
---|
| 63 | |
---|
| 64 | Compile ZOO-Project from source |
---|
| 65 | ------------------------------- |
---|
| 66 | |
---|
| 67 | .. warning:: |
---|
| 68 | Ensure to first perform the :ref:`prerequisite steps |
---|
| 69 | <install-prereq>` before compiling the ZOO Kernel. |
---|
| 70 | |
---|
| 71 | The following steps are for use with the Microsoft Visual Studio |
---|
| 72 | compiler (and tested with MSVC 2010). |
---|
| 73 | |
---|
| 74 | 1. Make sure the gnuwin32 tools ``bison.exe`` and ``flex.exe`` are found |
---|
| 75 | in your path. You can download the GNUwin32 tools `here |
---|
| 76 | <http://www.zoo-project.org/dl/tool-win32.zip>`__. |
---|
| 77 | |
---|
| 78 | 2. Modify the ``nmake.opt`` file to point to your local libraries. Note |
---|
| 79 | that you can also use definition directly in the command line if |
---|
| 80 | you prefer. See :ref:`win_configure_options` for details about this |
---|
| 81 | options. |
---|
| 82 | |
---|
| 83 | |
---|
| 84 | 3. Execute: |
---|
| 85 | |
---|
| 86 | :: |
---|
| 87 | |
---|
| 88 | nmake /f makefile.vc |
---|
| 89 | |
---|
| 90 | 4. A file ``zoo_loader.cgi`` and ``libzoo_service.dll`` should be |
---|
| 91 | created. Note that if another file named |
---|
| 92 | ``zoo_loader.cgi.manifest`` is also created, you will have to run |
---|
| 93 | another command: |
---|
| 94 | |
---|
| 95 | :: |
---|
| 96 | |
---|
| 97 | nmake /f makefile.vc embed-manifest |
---|
| 98 | |
---|
| 99 | 5. Copy the files ``zoo_loader.cgi``, ``libzoo_service.dll`` and |
---|
| 100 | ``main.cfg`` into your cgi-bin directory. |
---|
| 101 | |
---|
| 102 | 6. Using the command prompt, test the ZOO-Kernel by executing the |
---|
| 103 | following command: |
---|
| 104 | |
---|
| 105 | :: |
---|
| 106 | |
---|
| 107 | D:\ms4w\Apache\cgi-bin> zoo_loader.cgi |
---|
| 108 | |
---|
| 109 | which should display a message such as: |
---|
| 110 | |
---|
| 111 | :: |
---|
| 112 | |
---|
| 113 | Content-Type: text/xml; charset=utf-8 |
---|
| 114 | Status: 200 OK |
---|
| 115 | |
---|
| 116 | <?xml version="1.0" encoding="utf-8"?> |
---|
| 117 | <ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://schemas.opengis.net/ows/1.1.0/owsExceptionReport.xsd" xml:lang="en-US" version="1.1.0"> |
---|
| 118 | <ows:Exception exceptionCode="MissingParameterValue"> |
---|
| 119 | <ows:ExceptionText>Parameter <request> was not specified</ows:ExceptionText> |
---|
| 120 | </ows:Exception> |
---|
| 121 | </ows:ExceptionReport> |
---|
| 122 | |
---|
| 123 | 7. Edit the ``main.cfg`` file so that it contains values describing |
---|
| 124 | your WPS service. An example of such a file running on Windows is: |
---|
| 125 | |
---|
| 126 | :: |
---|
| 127 | |
---|
| 128 | [main] |
---|
| 129 | encoding = utf-8 |
---|
| 130 | version = 1.0.0 |
---|
| 131 | serverAddress = http://localhost/ |
---|
| 132 | lang = en-CA |
---|
| 133 | tmpPath=/ms4w/tmp/ms_tmp/ |
---|
| 134 | tmpUrl = /ms_tmp/ |
---|
| 135 | |
---|
| 136 | [identification] |
---|
| 137 | title = The Zoo WPS Development Server |
---|
| 138 | abstract = Development version of ZooWPS. See http://www.zoo-project.org |
---|
| 139 | fees = None |
---|
| 140 | accessConstraints = none |
---|
| 141 | keywords = WPS,GIS,buffer |
---|
| 142 | |
---|
| 143 | [provider] |
---|
| 144 | providerName=Gateway Geomatics |
---|
| 145 | providerSite=http://www.gatewaygeomatics.com |
---|
| 146 | individualName=Jeff McKenna |
---|
| 147 | positionName=Director |
---|
| 148 | role=Dev |
---|
| 149 | adressDeliveryPoint=1101 Blue Rocks Road |
---|
| 150 | addressCity=Lunenburg |
---|
| 151 | addressAdministrativeArea=False |
---|
| 152 | addressPostalCode=B0J 2C0 |
---|
| 153 | addressCountry=ca |
---|
| 154 | addressElectronicMailAddress=info@gatewaygeomatics.com |
---|
| 155 | phoneVoice=False |
---|
| 156 | phoneFacsimile=False |
---|
| 157 | |
---|
| 158 | 8. Open a web browser window, and execute a GetCapababilites request on your WPS service: http://localhost/cgi-bin/zoo_loader.cgi?request=GetCapabilities&service=WPS |
---|
| 159 | |
---|
| 160 | The response should be displayed in your browser, such as: |
---|
| 161 | |
---|
| 162 | :: |
---|
| 163 | |
---|
| 164 | <wps:Capabilities xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsGetCapabilities_response.xsd" service="WPS" xml:lang="en-US" version="1.0.0"> |
---|
| 165 | <ows:ServiceIdentification> |
---|
| 166 | <ows:Title>The Zoo WPS Development Server</ows:Title> |
---|
| 167 | <ows:Abstract> |
---|
| 168 | Development version of ZooWPS. See http://www.zoo-project.org |
---|
| 169 | </ows:Abstract> |
---|
| 170 | <ows:Keywords> |
---|
| 171 | <ows:Keyword>WPS</ows:Keyword> |
---|
| 172 | <ows:Keyword>GIS</ows:Keyword> |
---|
| 173 | <ows:Keyword>buffer</ows:Keyword> |
---|
| 174 | </ows:Keywords> |
---|
| 175 | <ows:ServiceType>WPS</ows:ServiceType> |
---|
| 176 | <ows:ServiceTypeVersion>1.0.0</ows:ServiceTypeVersion> |
---|
| 177 | ... |
---|
| 178 | |
---|
| 179 | |
---|
| 180 | .. _win_configure_options: |
---|
| 181 | |
---|
| 182 | Build options |
---|
| 183 | ............. |
---|
| 184 | |
---|
| 185 | Various build options can be set in the ``nmake.opt`` file to define |
---|
| 186 | the location of the built libraries you want to use to build your |
---|
| 187 | ZOO-Kernel. Some are optional and some are required, they are listed |
---|
| 188 | below exhaustively: |
---|
| 189 | |
---|
| 190 | .. contents:: |
---|
| 191 | :local: |
---|
| 192 | :depth: 1 |
---|
| 193 | :backlinks: top |
---|
| 194 | |
---|
| 195 | |
---|
| 196 | gettext (Required) |
---|
| 197 | ****************** |
---|
| 198 | |
---|
| 199 | The location of the libintl (built when building gettext) should be |
---|
| 200 | specified by defining the ``INTL_DIR`` environment variable. It |
---|
| 201 | supposes that the header and the ``intl.lib`` file are available. |
---|
| 202 | |
---|
| 203 | So for instance, in case you build the gettext in |
---|
| 204 | ``\buildkit\srcs\gettext-0.14.6``, you may define the following before |
---|
| 205 | running ``nmake /f makefile.vc``: |
---|
| 206 | |
---|
| 207 | .. code:: |
---|
| 208 | |
---|
| 209 | set INTL_DIR=\buildkit\srcs\gettext-0.14.6\gettext-runtime\intl |
---|
| 210 | |
---|
| 211 | |
---|
| 212 | libCURL (Required) |
---|
| 213 | ****************** |
---|
| 214 | |
---|
| 215 | The location of the libCURL should be specified by defining |
---|
| 216 | the ``CURL_DIR`` environment variable. It supposes that there are 2 |
---|
| 217 | sub-directory ``include`` containing the libCURL header and ``lib`` |
---|
| 218 | which contains the ``libcurl.lib`` file. |
---|
| 219 | |
---|
| 220 | So for instance, in case you build the libCURL in |
---|
| 221 | ``\buildkit\srcs\curl-7.38.0``, you may define the following before |
---|
| 222 | running ``nmake /f makefile.vc``: |
---|
| 223 | |
---|
| 224 | .. code:: |
---|
| 225 | |
---|
| 226 | set CURL_DIR=\buildkit\srcs\curl-7.38.0\builds\libcurl-vc10-x86-release-dll-ssl-dll-zlib-dll-ipvs6-sspi |
---|
| 227 | |
---|
| 228 | |
---|
| 229 | libFCGI (Required) |
---|
| 230 | ****************** |
---|
| 231 | |
---|
| 232 | The location of the libFCGI should be specified by defining the |
---|
| 233 | ``FCGI_DIR`` environment variable. It supposes that there are 2 |
---|
| 234 | sub-directory ``include`` containing the FastCGI header and |
---|
| 235 | ``libfcgi/Release`` which contains the ``libfcgi.lib`` file. |
---|
| 236 | |
---|
| 237 | So for instance, in case you build the libXML2 library in |
---|
| 238 | ``\buildkit\srcs\fcgi-2.4.1``, you may define the following before |
---|
| 239 | running ``nmake /f makefile.vc``: |
---|
| 240 | |
---|
| 241 | .. code:: |
---|
| 242 | |
---|
| 243 | set FCGI_DIR=\buildkit\srcs\fcgi-2.41.1 |
---|
| 244 | |
---|
| 245 | libXML2 (Required) |
---|
| 246 | ****************** |
---|
| 247 | |
---|
| 248 | The location of the libXML2 should be specified by defining the |
---|
| 249 | ``XML2_DIR`` environment variable. It supposes that there are 2 |
---|
| 250 | sub-directory ``include`` containing the libXML2 header and |
---|
| 251 | ``win32\bin.msvc`` which contains the ``libxml2.lib`` file. |
---|
| 252 | |
---|
| 253 | So for instance, in case you build the libXML2 library in |
---|
| 254 | ``\buildkit\srcs\libxml2-2.9.0``, you may define the following before |
---|
| 255 | running ``nmake /f makefile.vc``: |
---|
| 256 | |
---|
| 257 | .. code:: |
---|
| 258 | |
---|
| 259 | set XML2_DIR=\buildkit\srcs\libxml2-2.9.0 |
---|
| 260 | |
---|
| 261 | OpenSSL (Required) |
---|
| 262 | ****************** |
---|
| 263 | |
---|
| 264 | The location of the OpenSSL library should be specified by defining |
---|
| 265 | the ``SSL_DIR`` environment variable. It supposes that there are 2 |
---|
| 266 | sub-directory ``inc32`` containing the header files and |
---|
| 267 | ``out32dll`` which contains the ``ssleay32.lib`` file. |
---|
| 268 | |
---|
| 269 | So for instance, in case you build the libXML2 library in |
---|
| 270 | ``\buildkit\srcs\openssl-1.0.2c``, you may define the following before |
---|
| 271 | running ``nmake /f makefile.vc``: |
---|
| 272 | |
---|
| 273 | .. code:: |
---|
| 274 | |
---|
| 275 | set SSL_DIR=\buildkit\srcs\openssl-1.0.2c |
---|
| 276 | |
---|
| 277 | GDAL (Required) |
---|
| 278 | ****************** |
---|
| 279 | |
---|
| 280 | The location of the GDAL library should be specified by defining |
---|
| 281 | the ``GDAL_DIR`` environment variable. It corresponds to the path |
---|
| 282 | where you uncompress and built GDAL, it supposes that you have the |
---|
| 283 | ``gdal_i.lib`` file available in this directory. |
---|
| 284 | |
---|
| 285 | So for instance, in case you build the libXML2 library in |
---|
| 286 | ``\buildkit\srcs\gdal-1.10.1``, you may define the following before |
---|
| 287 | running ``nmake /f makefile.vc``: |
---|
| 288 | |
---|
| 289 | .. code:: |
---|
| 290 | |
---|
| 291 | set GDAL_DIR=\buildkit\srcs\gdal-1.10.1 |
---|
| 292 | |
---|
| 293 | MapServer (Optional) |
---|
| 294 | ******************** |
---|
| 295 | |
---|
| 296 | The location of the MapServer library path should be specified by |
---|
| 297 | defining the ``MS_DIR`` environment variable. It corresponds to the |
---|
| 298 | path where you build MapServer on your system, this directory should |
---|
| 299 | contain the ``nmake.opt`` file used. |
---|
| 300 | |
---|
| 301 | So for instance, in case you build Python in |
---|
| 302 | ``\buildkit\srcs\mapserver-6.2.0``, you may define the following before |
---|
| 303 | running ``nmake /f makefile.vc``: |
---|
| 304 | |
---|
| 305 | .. code:: |
---|
| 306 | |
---|
| 307 | set MS_DIR=\buildkit\srcs\mapserver-6.2.0 |
---|
| 308 | |
---|
| 309 | |
---|
| 310 | Python (Optional) |
---|
| 311 | ***************** |
---|
| 312 | |
---|
| 313 | The location of the Python binaries path should be specified by |
---|
| 314 | defining the ``PY_DIR`` environment variable. It corresponds to the |
---|
| 315 | path where you build Python on your system. The location of the |
---|
| 316 | ``pythonXX.lib`` files should be specified by setting the |
---|
| 317 | ``PY_LIBRARY`` environment variable. |
---|
| 318 | |
---|
| 319 | So for instance, in case you build Python in |
---|
| 320 | ``\buildkit\srcs\Python-2.7``, you may define the following before |
---|
| 321 | running ``nmake /f makefile.vc``: |
---|
| 322 | |
---|
| 323 | .. code:: |
---|
| 324 | |
---|
| 325 | set PY_DIR=\buildkit\srcs\Python-2.7 |
---|
| 326 | set PY_LIBRARY=\buildkit\srcs\Python-2.7\PCBuild\python27.lib |
---|
| 327 | |
---|
| 328 | JavaScript (Optional) |
---|
| 329 | ********************* |
---|
| 330 | |
---|
| 331 | The location of libmozjs should be specified by defining the |
---|
| 332 | ``JS_DIR`` environment variable. It corresponds to the path where you |
---|
| 333 | build libmozjs on your system, it supposes that the header and |
---|
| 334 | the ``mozjs185-1.0.lib`` file are available in this directory. |
---|
| 335 | |
---|
| 336 | So for instance, in case you build libmozjs in |
---|
| 337 | ``\buildkit\srcs\js-1.8.5``, you may define the following before |
---|
| 338 | running ``nmake /f makefile.vc``: |
---|
| 339 | |
---|
| 340 | .. code:: |
---|
| 341 | |
---|
| 342 | set JS_DIR=\buildkit\srcs\js-1.8.5 |
---|
| 343 | |
---|
| 344 | PHP (Optional) |
---|
| 345 | ***************** |
---|
| 346 | |
---|
| 347 | The location of PHP should be specified by defining the ``PHP_DIR`` |
---|
| 348 | environment variable. It corresponds to the path where you build PHP |
---|
| 349 | on your system. The location of the ``php5embed.lib`` files should be |
---|
| 350 | specified by setting the ``PHP_LIB`` environment variable. |
---|
| 351 | |
---|
| 352 | So for instance, in case you build PHP in |
---|
| 353 | ``\buildkit\srcs\php-5.5.10``, you may define the following before |
---|
| 354 | running ``nmake /f makefile.vc``: |
---|
| 355 | |
---|
| 356 | .. code:: |
---|
| 357 | |
---|
| 358 | set PHP_DIR=\buildkit\srcs\php-5.5.10 |
---|
| 359 | set PHP_LIB=\buildkit\srcs\php-5.5.10\Release_TS\php5embed.lib |
---|
| 360 | |
---|
| 361 | Database backend (Optional) |
---|
| 362 | *************************** |
---|
| 363 | |
---|
| 364 | ZOO-Kernel can use a database backend to store ongoing status |
---|
| 365 | informations of running services, for activating this operation mode, |
---|
| 366 | you should define the evironment variable ``DB`` and set it to any |
---|
| 367 | value. So, to activate this option, you may use the following before |
---|
| 368 | running ``nmake /f makefile.vc``: |
---|
| 369 | |
---|
| 370 | .. code:: |
---|
| 371 | |
---|
| 372 | set DB=activated |
---|
| 373 | |
---|
| 374 | .. note:: |
---|
| 375 | To learn how to setup the corresponding database, please refer to |
---|
| 376 | :ref:`this section <zoo_create_db_backend>`. |
---|
| 377 | |
---|
| 378 | |
---|
| 379 | |
---|
| 380 | |
---|
| 381 | Optionally Compile Individual Services |
---|
| 382 | ............................................................. |
---|
| 383 | |
---|
| 384 | An example could be the *OGR base-vect-ops* provider located in the ``zoo-project\zoo-services\ogr\base-vect-ops`` directory. |
---|
| 385 | |
---|
| 386 | 1. First edit the *makefile.vc* located in that directory, and execute: |
---|
| 387 | |
---|
| 388 | :: |
---|
| 389 | |
---|
| 390 | nmake /f makefile.vc |
---|
| 391 | |
---|
| 392 | Inside that same directory, the *ogr_service.zo* file should be created. |
---|
| 393 | |
---|
| 394 | 2. Copy all the files inside ``zoo-services\ogr\base-vect-ops\cgi-env`` into your ``cgi-bin`` directory |
---|
| 395 | |
---|
| 396 | 3. Test this service provider through the following URL: |
---|
| 397 | |
---|
| 398 | http://localhost/cgi-bin/zoo_loader.cgi?request=Execute&service=WPS&version=1.0.0&Identifier=Buffer&DataInputs=BufferDistance=1@datatype=interger;InputPolygon=Reference@xlink:href=http%3A%2F%2Fwww.zoo-project.org%3A8082%2Fgeoserver%2Fows%3FSERVICE%3DWFS%26REQUEST%3DGetFeature%26VERSION%3D1.0.0%26typename%3Dtopp%3Astates%26SRS%3DEPSG%3A4326%26FeatureID%3Dstates.15 |
---|
| 399 | |
---|
| 400 | The response displayed in your browser should contain: |
---|
| 401 | |
---|
| 402 | :: |
---|
| 403 | |
---|
| 404 | <wps:ProcessSucceeded>Service "Buffer" run successfully.</wps:ProcessSucceeded> |
---|
| 405 | |
---|