= ZOO Kernel Installation = The ZOO installation process requires the following libraries to be installed on your system: * Flex & Bison ( http://flex.sourceforge.net/ http://www.gnu.org/software/bison/ ) * 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/ ) * autoconf ( http://www.gnu.org/software/autoconf/ ) == Getting the code from SVN == Please use the following command to get the ZOO Kernel source code : {{{ #!sh svn checkout http://svn.zoo-project.org/svn/trunk zoo-project }}} For users which get a developer account, use the following : {{{ #!sh sed "s:\[tunnels\]:\[tunnels\]\nzoosvn = /usr/bin/ssh -p 1046:g" -i ~/.subversion/config svn co svn+zoosvn://svn.zoo-project.org/var/svn/repos/trunk zoo-project }}} The first line of the instruction above consist in defining a specific tunnel to access the svn server through ssh protocol. Indeed, the ZOO SVN server listen on the 1046 (1024+22) port rather than the default one (22). == Compiling ZOO Kernel == === Unix / Linux === Please use the following command to compile ZOO Kernel source code. Please use ./configure --help to get more informations about options. {{{ cd zoo-project/zoo-kernel autoconf ./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 }}} === Win32 === On Win32 platform you can compile the ZOO Kernel using the following command. Please, first edit the makefile.vc to follow your local path to find required libraries. Don't forget to set environement variables before compilation (like the {{{PATH}}} to be able to use Flex and Bison binaries during the compilation process). {{{ #!sh cd .\zoo-project\zoo-kernel\ nmake /f makefile.vc }}} == 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. Especialy please edit the {{{tmpPath}}} and {{{tmpurl}}} which was used by some processes respectively to store temporary files on and retrieve them from your web server. == 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.