source: branches/branch-1.6/docs/install/windows.rst @ 932

Last change on this file since 932 was 771, checked in by djay, 8 years ago

Remove the default java.library.path definition and use an optional [java] section instead (where the key java.library.path, amongst other, may be defined). Change _ function name to translate in the Java ZOO-API. Use a ogr.zoo_project package containing the ZOO class. Fix the hello-java service and update doc consequently

  • Property svn:keywords set to Date Author
  • Property svn:mime-type set to text/plain
File size: 13.4 KB
Line 
1.. include:: <xhtml1-lat1.txt>
2.. include:: <xhtml1-symbol.txt>
3
4.. _install-onwindows:
5
6             
7Installation on Windows |trade|
8====================
9
10Install 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` and make sure the
27   `jvm.dll` can be found.
28
29
30Using the installer
31...................
32
33Prior to run the ZOO-Project-Installer, please make sure you have IIS
34and `Python <https://www.python.org/downloads/windows/>`__ setup on
35your machine. Then download the `ZOO-Project-Installer
36<https://bintray.com/gfenoy/ZOO-Project/Windows-Binaries/view>`__
37corresponding to your platform. The first time you will run the
38installer binary, you may be prompted to authorize it to run. Once the
39installer has been run, simply access the following link:
40http://localhost/zoo-demo/ to access your local demo application.
41
42Install by hand
43...................
44
45Prior to run the ZOO-Project-Installer, please make sure you have IIS
46and `Python <https://www.python.org/downloads/windows/>`__ setup on
47your machine. Then download the `ZOO-Project
48<https://bintray.com/gfenoy/ZOO-Project/Windows-Binaries/view>`__
49archive corresponding to your platform. Uncompress it, then move
50`cgi-bin`, `data` and `tmp` from uncompressed folder to `c:\\inetpub`,
51also move `wwwroot\\zoo-demo` and `wwwroot\\tmp` to
52`c:\\inetpub\\wwwroot`. To finish the installation, run the folllowing
53command as administrator to allow the `zoo_loader.cgi` to run from
54http://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     appcmd.exe set config /section:isapiCgiRestriction /+[path='c:\inetpub\cgi-bin\zoo_loader.cgi',description='ZOO-Project',allowed='True']
62
63
64
65Compile 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
72The following steps are for use with the Microsoft Visual Studio
73compiler (and tested with MSVC 2010).
74
751. 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
792. 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   
853. Execute:
86
87   ::
88   
89     nmake /f makefile.vc
90     
914. 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     
1005. Copy the files ``zoo_loader.cgi``, ``libzoo_service.dll``  and
101   ``main.cfg`` into your cgi-bin directory.
102
1036. 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 &lt;request&gt; was not specified</ows:ExceptionText>
121       </ows:Exception>
122     </ows:ExceptionReport>
123     
1247. 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     
1598. 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
183Build options
184.............
185
186Various build options can be set in the ``nmake.opt`` file to define
187the location of the built libraries you want to use to build your
188ZOO-Kernel. Some are optional and some are required, they are listed
189below exhaustively:
190
191.. contents::
192    :local:
193    :depth: 1
194    :backlinks: top
195
196
197gettext (Required)
198******************
199
200The location of the libintl (built when building gettext) should be
201specified by defining the ``INTL_DIR`` environment variable. It
202supposes that the header and the ``intl.lib`` file are available.
203
204So for instance, in case you build the gettext in
205``\buildkit\srcs\gettext-0.14.6``, you may define the following before
206running ``nmake /f makefile.vc``:
207
208.. code::
209
210    set INTL_DIR=\buildkit\srcs\gettext-0.14.6\gettext-runtime\intl
211
212
213libCURL (Required)
214******************
215
216The location of the libCURL should be specified by defining
217the ``CURL_DIR`` environment variable. It supposes that there are 2
218sub-directory ``include`` containing the libCURL header and ``lib``
219which contains the ``libcurl.lib`` file.
220
221So for instance, in case you build the libCURL in
222``\buildkit\srcs\curl-7.38.0``, you may define the following before
223running ``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
230libFCGI (Required)
231******************
232
233The location of the libFCGI should be specified by defining the
234``FCGI_DIR`` environment variable. It supposes that there are 2
235sub-directory ``include`` containing the FastCGI header and
236``libfcgi/Release`` which contains the ``libfcgi.lib`` file.
237
238So for instance, in case you build the libXML2 library in
239``\buildkit\srcs\fcgi-2.4.1``, you may define the following before
240running ``nmake /f makefile.vc``:
241
242.. code::
243
244    set FCGI_DIR=\buildkit\srcs\fcgi-2.41.1
245
246libXML2 (Required)
247******************
248
249The location of the libXML2 should be specified by defining the
250``XML2_DIR`` environment variable. It supposes that there are 2
251sub-directory ``include`` containing the libXML2 header and
252``win32\bin.msvc`` which contains the ``libxml2.lib`` file.
253
254So for instance, in case you build the libXML2 library in
255``\buildkit\srcs\libxml2-2.9.0``, you may define the following before
256running ``nmake /f makefile.vc``:
257
258.. code::
259
260    set XML2_DIR=\buildkit\srcs\libxml2-2.9.0
261
262OpenSSL (Required)
263******************
264
265The location of the OpenSSL library should be specified by defining
266the ``SSL_DIR`` environment variable. It supposes that there are 2
267sub-directory ``inc32`` containing the header files and
268``out32dll`` which contains the ``ssleay32.lib`` file.
269
270So for instance, in case you build the libXML2 library in
271``\buildkit\srcs\openssl-1.0.2c``, you may define the following before
272running ``nmake /f makefile.vc``:
273
274.. code::
275
276    set SSL_DIR=\buildkit\srcs\openssl-1.0.2c
277
278GDAL (Required)
279******************
280
281The location of the GDAL library should be specified by defining
282the ``GDAL_DIR`` environment variable. It corresponds to the path
283where you uncompress and built GDAL, it supposes that you have the
284``gdal_i.lib`` file available in this directory.
285
286So for instance, in case you build the libXML2 library in
287``\buildkit\srcs\gdal-1.10.1``, you may define the following before
288running ``nmake /f makefile.vc``:
289
290.. code::
291
292    set GDAL_DIR=\buildkit\srcs\gdal-1.10.1
293
294MapServer (Optional)
295********************
296
297The location of the MapServer library path should be specified by
298defining the ``MS_DIR`` environment variable. It corresponds to the
299path where you build MapServer on your system, this directory should
300contain the ``nmake.opt`` file used.
301
302So for instance, in case you build Python in
303``\buildkit\srcs\mapserver-6.2.0``, you may define the following before
304running ``nmake /f makefile.vc``:
305
306.. code::
307
308    set MS_DIR=\buildkit\srcs\mapserver-6.2.0
309
310
311Python (Optional)
312*****************
313
314The location of the Python binaries path should be specified by
315defining the ``PY_DIR`` environment variable. It corresponds to the
316path 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
320So for instance, in case you build Python in
321``\buildkit\srcs\Python-2.7``, you may define the following before
322running ``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
329JavaScript (Optional)
330*********************
331
332The location of libmozjs should be specified by defining the
333``JS_DIR`` environment variable. It corresponds to the path where you
334build libmozjs on your system, it supposes that the header and
335the ``mozjs185-1.0.lib`` file are available in this directory.
336
337So for instance, in case you build libmozjs in
338``\buildkit\srcs\js-1.8.5``, you may define the following before
339running ``nmake /f makefile.vc``:
340
341.. code::
342
343    set JS_DIR=\buildkit\srcs\js-1.8.5
344
345PHP (Optional)
346*****************
347
348The location of PHP should be specified by defining the ``PHP_DIR``
349environment variable. It corresponds to the path where you build PHP
350on your system. The location of the ``php5embed.lib`` files should be
351specified by setting the ``PHP_LIB`` environment variable.
352
353So for instance, in case you build PHP in
354``\buildkit\srcs\php-5.5.10``, you may define the following before
355running ``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
362Database backend (Optional)
363***************************
364
365ZOO-Kernel can use a database backend to store ongoing status
366informations of running services, for activating this operation mode,
367you should define the evironment variable ``DB`` and set it to any
368value. So, to activate this option, you may use the following before
369running ``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
382Optionally Compile Individual Services
383.............................................................
384
385An example could be the *OGR base-vect-ops* provider located in the ``zoo-project\zoo-services\ogr\base-vect-ops`` directory. 
386
3871. 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   
3952. Copy all the files inside ``zoo-services\ogr\base-vect-ops\cgi-env`` into your ``cgi-bin`` directory
396
3973. Test this service provider through the following URL:
398
399http://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
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