Version 8 (modified by djay, 14 years ago)


How to install ZOO-Project on MacOS X


In this page you'll find all the required informations to build and run your ZOO-Kernel using a demo page.


First of all, you'll need XCode.

Before you start downloading ZOO-Project source code, you'll need ot install somme tools required to compile ZOO-Kernel properly.

First of all install PROJ, GEOS and GDAL frameworks from here.

At this step, you should get the following directories on your local hard drive :


Then, create a src directory and download inside the gettext source code and uncompress it.

Now, compile gettext with the following commands to produce an universal binary :

cd gettext-
CFLAGS="-O -g -arch i386 -arch ppc -arch x86_64"  \
  LDFLAGS="-arch i386 -arch ppc -arch x86_64"   ./configure
sudo make install

Compiling and installing your ZOO-Kernel

Download source from SVN, then edit the Makefile in zoo/thirds/cgic206/ directory to add on line 5 -arch i386 -arch ppc -arch x86_64 to the LIB value. Then, use the following command to compile libcgic :

svn co http://svn.zoo-project.org/svn/trunk zoo
cd zoo/thirds/cgic206

If you produce the libcgic.a file, you can start run autoconf and then configure from zoo-kernel directory.

cd zoo/zoo-kernel
./configure --with-gdal-config=/Library//Frameworks/GDAL.framework/Versions/1.7/Programs/gdal-config --with-python 

Now you need to edit the Makefile to do the following modifications :

  • on line 6 : add "-arch i386 -arch ppc -arch x86_64" to the CFLAGS value
  • on line 93 : add "-lcrypto -lintl /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation" at the end

Now, run the following content to compile and then deploy your ZOO-Kernel in your Apache server :

cp zoo_loader.cgi main.cfg /Library/WebServer/CGI-Executables

You should be ready to request your ZOO-Kernel installation using the following link : http://localhost/cgi-bin/zoo_loader.cgi?request=GetCapabilities&service=WPS .

If everything is ok, then you can follow next steps to deploy new Services Providers.

Deploy OGR Services Provider


Before your try to use any service, please set correct path in the main.cfg for tmpPath and tmpUrl.

You can use the following setup :

tmpPath = /Library/WebServer/Documents/tmp
tmpUrl = ../../tmp

Obviously you'll then need to create this directory, using the following command :

mkdir /Library/WebServer/Documents

C Version

To compile the base-vect-ops ServicesProvider you'll need to edit the Makefile in zoo/zoo-services/ogr/base-vect-ops/ directory. Add "-I/Library//Frameworks/GEOS.framework/Versions/3/Headers/" to the CFLAGS value on the first line. To compile, add GDAL framework to the PATH environmenet variable, to ensure that gdal-config tool will be found, run make and then copy cgi-env files in the /Library/WebServer/CGI-Executables directory.

cd zoo/zoo-services/ogr/base-vect-ops/
export PATH=$PATH:/Library/Frameworks/GDAL.framework/Versions/1.7/Programs/
cp cgi-env/* /Library/WebServer/CGI-Executables

You can test using this url if everything is ok with your setup.

Python Version


First of all run python from a Terminal.app and try the following import from the python interpreter :

import osgeo.ogr
import libxml2

If you don't get any trouble here then that means that you don't need to follow instructions from the next section, else you'll need.

Install LibXML2 Python Module

If you get an issue when importing the libxml2 module from your python interpreter then that mean you need to install the Python support for the libxml2 library which is already installed on you MacOS X environment. To accomplish this, you have first to determine what is the libxml2 installed on your platform, using the following command:

xml2-config --version

Download the source corresponding to your version (i.e. on 10.6.6 you get 2.7.3) from the libxml2 download page in src directory then uncompress it.

Use the following command to install the python support :

cd src/libxml2-2.7.3/python/
python setup.py install

Deploy OGR Python Services Provider

Now copy the zoo-services/ogt/base-vect-ops/cgi-env files into /Library/WebServer/CGI-Executables.

You can test using this url if everything is ok with your setup.

Test using Local Demo Page

Download the OpenLayers library and uncompress it in your personnal Sites directory (located in your home directory). Rename the OpenLayers directory as openlayers. Download this zip archive then uncompress it in your personnal Sites directory. Load your local demo pages using the urls looking like the following (replacing MyUserName by your MacOS user name) :

Attachments (2)


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