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