= ZOO Kernel Installation = The ZOO installation process requires the following libraries to be installed on your linux/mac system: * FastCGI ( http://www.fastcgi.com ) * cgic ( http://www.boutell.com/cgic ) * libxml2 ( http://xmlsoft.org ) * cURL ( http://curl.haxx.se ) * OpenSSL ( http://www.openssl.org ) * Python ( http://www.python.org ) * PHP Embedded (optional) ( http://www.php.net ) * Java SDK (optional) ( http://java.sun.com ) * SpiderMonkey (optional) ( http://www.mozilla.org/js/spidermonkey/) = Getting the code from SVN = Please use the following command to get the ZOO Kernel source code : {{{ svn checkout http://svn.zoo-project.org/svn/trunk zoo }}} = Compiling ZOO Kernel = Please use the following command to compile ZOO Kernel source code. Please use ./configure --help to get more informations about options. {{{ cd trunk/zoo-kernel ./configure --with-js=/usr/ \ --with-gdal-config=/usr/bin/gdal-config \ --with-php=/usr/lib/php5.2.10/ \ --with-java=/opt/sun-jdk-1.6.0.02/ make zoo_loader.cgi }}} = Install ZOO Kernel and ZOO ServiceProvider = 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). {{{ # Install ZOO Kernel cp main.cfg /var/www/localhost/cgi-bin cp zoo_loader.cgi /var/www/localhost/cgi-bin # Install ZOO ServiceProvider cp ../zoo-services/hello-py/cgi-env/*.zcfg /var/www/localhost/cgi-bin cp ../zoo-services/hello-py/*.py /var/www/localhost/cgi-bin/ }}} 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. Apache ZOO .htaccess Then, create and edit a file called .htaccess in a zoo directory in your Apache DocumentRoot, using the following command: {{{ mkdir /var/www/localhost/htdocs/zoo/ cat > /var/www/localhost/htdocs/zoo/.htaccess << EOF RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !=%{DOCUMENT_ROOT}/login.php RewriteRule (.*)/(.*)/(.*) /cgi-bin/zoo_loader.cgi?ServiceProvider=$2&metapath=$1 [L,QSA] RewriteRule (.*)/(.*)/ /cgi-bin/zoo_loader.cgi?ServiceProvider=$2&metapath=$1 [L,QSA] RewriteRule (.*)/(.*) /cgi-bin/zoo_loader.cgi?ServiceProvider=$1&metapath= [L,QSA] EOF }}} = Test your ZOO installation = Finally, run the following GetCapabilities, DescribeProcess and Execute requests to test your ZOO Kernel installation : {{{ http://my.website/zoo/?Service=WPS&Request=GetCapabilities&Version=1.0.0 http://my.website/zoo/?Service=WPS&Request=DescribeProcess&Version=1.0.0&Identifier=HelloPy http://my.website/zoo/?Service=WPS&Request=Execute&Version=1.0.0&Identifier=HelloPy&DataInputs=a=My%20Name }}} You are done, congrats ! You can now use the ZOO Services or create your own.