source: trunk/docs/install/windows.rst @ 761

Last change on this file since 761 was 761, checked in by djay, 6 years ago

Add specific section to install ZOO-Project windows binaries via the Installer or by hand.

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

Search

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