source: trunk/docs/tutorial/environment.txt @ 615

Last change on this file since 615 was 348, checked in by neteler, 13 years ago

set correctly svn propset

  • Property svn:eol-style set to native
  • Property svn:keywords set to HeadURL Date Author Id Rev
  • Property svn:mime-type set to text/plain
File size: 5.0 KB
RevLine 
[348]1.. _environment:
2
3Using ZOO from an OSGeoLive virtual machine
4===========================================
5
6Development Environment Description
7-----------------------------------
8
9`OSGeoLive <http://live.osgeo.org/>`__ is a live DVD and virtual machine based on
10`Xubuntu <http://www.xubuntu.org/>`__  that allows you to try a
11wide variety of open source geospatial software without installing anything. It is
12composed entirely of free software and include ZOO 1.0 this year, for testing purpose.
13
14As already said in introduction, an OSGeoLive virtual machine image disk has been
15installed on your computer, allowing you to use ZOO Kernel in a development environment
16directly. Using a virtual machine image disk seems to be the simplest way to use
17ZOO Kernel and to develop ZOO Services locally, as we can ensure that everything
18requested for compile C Services and run Python Services is available and ready to use.
19Every ZOO related material and source code have been placed in */home/user/zoows* directory.
20We will work inside it during this workshop. As the binary version of ZOO Kernel is
21already compiled and stored in */home/user/zoows/sources/zoo-kernel*, you only have to
22copy two important files inside the */usr/lib/cgi-bin directory*: *zoo_loader.cgi*
23and the *main.cfg* in order to make ZOO Kernel available, using the following commands:
24
25::
26
27  sudo cp ~/zoows/sources/zoo-kernel/zoo_loader.cgi /usr/lib/cgi-bin
28  sudo cp ~/zoows/sources/zoo-kernel/main.cfg /usr/lib/cgi-bin
29 
30Please note that we will talk about ZOO Kernel or zoo_loader.cgi script without any
31distinction during this workshop.
32
33The *main.cfg* file contains metadata informations about the identification and provider
34but also some important settings. The file is composed of various sections, namely *main*, 
35*identification* and *provider* per default. Obviously, you are free to add new sections
36to the files if you need them for a specific Service. Nevertheless, you have to know
37that the env section name is used in a specific way. It lets you define environment
38variables that your Service requires during its runtime. For instance, if your Service
39requires to access to a X server running on framebuffer, you can add *DISPLAY=:1* line in
40your env section to take this specificity into account.
41
42Please have a look to this file. Three important parameters are commented below:
43
44serverAddress
45  The url to access to the ZOO Kernel
46
47tmpPath
48  The full path to store temporary files
49
50tmpUrl
51  The url path relative to serverAddress to access temporary directory.
52
53The values of the *main.cfg* file used from the running virtual machine are the following:
54
55::
56
57  serverAddress=http://localhost/zoo
58  tmpPath=/var/www/temp
59  tmpUrl=../temp/
60
61You could have noticed that the *tmpUrl* is a relative url from *serverAddress*, so it must
62be a directory. Even if ZOO Kernel can be used with the full url of the zoo_loader.cgi
63script, for  better readability and fully functional ZOO Kernel, you have to modify the
64default Apache configuration in order to be able to use the http://localhost/zoo/ url
65directly.
66
67First, please create a zoo directory in the existing */var/www* which is used by Apache as
68the DirectoryIndex. Then, please edit the */etc/apache2/sites-available/default* configuration
69file and add the following lines after the Directory block related to */var/www* directory :
70
71::
72
73  <Directory /var/www/zoo/>
74          Options Indexes FollowSymLinks MultiViews
75          AllowOverride All
76          Order allow,deny
77          allow from all
78  </Directory>
79 
80Now create a small *.htaccess* file in the */var/www/zoo* containing the following lines:
81
82::
83
84  RewriteEngine on
85  RewriteRule (.*)/(.*) /cgi-bin/zoo_loader.cgi?metapath=$1 [L,QSA]
86  RewriteRule (.*) /cgi-bin/zoo_loader.cgi [L,QSA]
87
88For this last file to be taken into account by Apache, you must activate the rewrite
89Apache module by copying a load file as bellow :
90
91::
92
93  sudo cp /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/
94
95Now you should be able to access the ZOO Kernel using a simplified by restarting
96your Apache Web server :
97
98::
99
100  sudo /etc/init.d/apache2 restart
101 
102Two other softwares form the OSGeoLive environment will be used during this workshop.
103Geoserver will first be used to provide WFS input data for the ZOO Services we are going
104to develop. The Geoserver sample dataset (United States polygons) will be passed to our
105service during section 3. So please start the Geoserver using the corresponding launcher
106in the Servers folder, as illustrated in the following screenshot :
107
108OpenLayers library is also available on the OSGeoLive virtual machine image disk, and it
109will be used during section 4, for building a simple WPS client application able to query
110the newly developed ZOO Services.
111
112As we planned to use OGR C-API and Python module of the GDAL library, we will need the
113corresponding header files, libraries and associated files. Hopefully everything was
114already available per default and so ready to use on the OSGeoLive packaging.
115
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