| 1 | = ZOO Kernel Installation = |
| 2 | |
| 3 | The ZOO installation process requires the following libraries to be installed on your linux/mac system: |
| 4 | |
| 5 | * FastCGI ( http://www.fastcgi.com ) |
| 6 | * cgic ( http://www.boutell.com/cgic ) |
| 7 | * libxml2 ( http://xmlsoft.org ) |
| 8 | * cURL ( http://curl.haxx.se ) |
| 9 | * OpenSSL ( http://www.openssl.org ) |
| 10 | * Python ( http://www.python.org ) |
| 11 | * PHP Embedded (optional) ( http://www.php.net ) |
| 12 | * Java SDK (optional) ( http://java.sun.com ) |
| 13 | * SpiderMonkey (optional) ( http://www.mozilla.org/js/spidermonkey/) |
| 14 | |
| 15 | = Getting the code from SVN = |
| 16 | |
| 17 | Please use the following command to get the ZOO Kernel source code : |
| 18 | |
| 19 | {{{ |
| 20 | svn checkout http://svn.zoo-project.org/svn/trunk zoo |
| 21 | }}} |
| 22 | |
| 23 | = Compiling ZOO Kernel = |
| 24 | |
| 25 | Please use the following command to compile ZOO Kernel source code. Please use |
| 26 | ./configure --help to get more informations about options. |
| 27 | |
| 28 | {{{ |
| 29 | cd trunk/zoo-kernel |
| 30 | ./configure --with-js=/usr/ \ |
| 31 | --with-gdal-config=/usr/bin/gdal-config \ |
| 32 | --with-php=/usr/lib/php5.2.10/ \ |
| 33 | --with-java=/opt/sun-jdk-1.6.0.02/ |
| 34 | make zoo_loader.cgi |
| 35 | }}} |
| 36 | |
| 37 | = Install ZOO Kernel and ZOO ServiceProvider = |
| 38 | |
| 39 | Assuming that your Apache server handle cgi-scripts located in /var/www/localhost/cgi-bin, you must copy the zoo_loader.cgi script in this directory as the main.cfg file (see bellow). |
| 40 | |
| 41 | {{{ |
| 42 | # Install ZOO Kernel |
| 43 | cp main.cfg /var/www/localhost/cgi-bin |
| 44 | cp zoo_loader.cgi /var/www/localhost/cgi-bin |
| 45 | # Install ZOO ServiceProvider |
| 46 | cp ../zoo-services/hello-py/cgi-env/*.zcfg /var/www/localhost/cgi-bin |
| 47 | cp ../zoo-services/hello-py/*.py /var/www/localhost/cgi-bin/ |
| 48 | }}} |
| 49 | |
| 50 | The main configuration file is named main.cfg and contains configuration parameters that can be accessed from your service (using the main_cfg parameter) or by the ZOO Kernel. Please edit main.cfg according to your environment. |
| 51 | Apache ZOO .htaccess |
| 52 | |
| 53 | Then, create and edit a file called .htaccess in a zoo directory in your Apache DocumentRoot, using the following command: |
| 54 | |
| 55 | {{{ |
| 56 | mkdir /var/www/localhost/htdocs/zoo/ |
| 57 | cat > /var/www/localhost/htdocs/zoo/.htaccess << EOF |
| 58 | RewriteEngine on |
| 59 | RewriteCond %{REQUEST_FILENAME} !-f |
| 60 | RewriteCond %{REQUEST_FILENAME} !-d |
| 61 | RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !=%{DOCUMENT_ROOT}/login.php |
| 62 | RewriteRule (.*)/(.*)/(.*) /cgi-bin/zoo_loader.cgi?ServiceProvider=$2&metapath=$1 [L,QSA] |
| 63 | RewriteRule (.*)/(.*)/ /cgi-bin/zoo_loader.cgi?ServiceProvider=$2&metapath=$1 [L,QSA] |
| 64 | RewriteRule (.*)/(.*) /cgi-bin/zoo_loader.cgi?ServiceProvider=$1&metapath= [L,QSA] |
| 65 | EOF |
| 66 | }}} |
| 67 | |
| 68 | = Test your ZOO installation = |
| 69 | |
| 70 | Finally, run the following GetCapabilities, DescribeProcess and Execute requests to test your ZOO Kernel installation : |
| 71 | |
| 72 | {{{ |
| 73 | http://my.website/zoo/?Service=WPS&Request=GetCapabilities&Version=1.0.0 |
| 74 | http://my.website/zoo/?Service=WPS&Request=DescribeProcess&Version=1.0.0&Identifier=HelloPy |
| 75 | http://my.website/zoo/?Service=WPS&Request=Execute&Version=1.0.0&Identifier=HelloPy&DataInputs=a=My%20Name |
| 76 | }}} |
| 77 | |
| 78 | You are done, congrats ! You can now use the ZOO Services or create your own. |