source: trunk/docs/kernel/install-mac.txt @ 271

Last change on this file since 271 was 271, checked in by nbozon, 13 years ago

svn keywords added to every file where it makes svn

File size: 7.6 KB
Line 
1.. _kernel-installation-mac:
2
3Mac OS X
4========
5
6:Last Updated: $Date$
7:Id:    $Id$
8:Author: $Author$
9:HeadURL: $HeadURL$
10
11.. contents:: Table of Contents
12    :depth: 2
13    :backlinks: top
14
15Using the Installer
16-------------------
17
181. To install a default build of the ZOO-Project on your Mac OS X computer use the `installer <http://www.zoo-project.org/trac/raw-attachment/wiki/ZooDocumentation/ZOOKernel/MacOSX_installation/ZOO-Project-Installer.pkg>`__.
19
20   .. note::
21      The installer assumes that you are using the distributed Apache2 version that comes with your Mac.  The installer will
22      place ZOO-Kernel and ZOO-Services into your cgi-bin at ``/Library/WebServer/CGI-Executables``, and the zoo-demo folder
23      will be placed within your document root at ``/Library/WebServer/Documents``
24
252. Make sure that your Apache server is running, and then access the ZOO Project Demo at:
26
27      http://localhost/zoo-demo/spatialtools.html
28     
293. To add additional services, please follow the following intructions to compile your own ZOO Project instance.
30
31Compiling from Source
32---------------------
33
341. Install `Xcode <http://developer.apple.com/technologies/tools/>`__.
35
362. Before you start downloading the ZOO-Project source code, you'll need to install some tools required to
37   compile ZOO-Kernel properly.
38
39   First of all install PROJ, GEOS and GDAL frameworks from `here <http://www.kyngchaos.com/software/frameworks>`__.
40
41   At this step, you should get the following directories on your local hard drive :
42
43   ::
44   
45     /Library/Frameworks/PROJ.framework
46     /Library/Frameworks/GEOS.framework
47     /Library/Frameworks/GDAL.framework
48
493. Then, create a ``src`` directory and inside that directory download the `gettext source code <http://www.gnu.org/software/gettext/#TOCdownloading>`__ and uncompress it.
50
51   now, compile gettext with the following commands to produce a universal binary :
52
53   ::
54   
55     cd gettext-0.18.1.1
56     CFLAGS="-O -g -arch i386 -arch ppc -arch x86_64"  \
57       LDFLAGS="-arch i386 -arch ppc -arch x86_64"   ./configure
58     make
59     sudo make install
60
614. Compile and install your ZOO-Kernel
62
63   - Download source from SVN, and use the following command to compile libcgic :
64
65     ::
66     
67       svn co http://svn.zoo-project.org/svn/trunk zoo
68       cd zoo/thirds/cgic206
69       make
70
71   - If you produced the ``libcgic.a`` file, you can run ``autoconf`` and then ``configure`` from zoo-kernel directory.
72
73     ::
74     
75       cd zoo/zoo-kernel
76       autoconf
77       ./configure --with-python --with-java=macos \
78          --with-gdal-config=/Library/Frameworks/GDAL.framework/Versions/1.8/Programs/gdal-config
79
80     Obviously, if you don't need Python or Java support then you should remove the corresponding configure option.
81
82     .. note::
83        Note that we used the --with-java=macos configure option. Due to the generic location of the JDK on all
84        Mac OS X platforms, you don't have to provide its full path.
85
86   - Now, run the following commands to compile and deploy your ZOO-Kernel on your Apache server :
87
88     ::
89     
90       make
91       cp zoo_loader.cgi main.cfg /Library/WebServer/CGI-Executables
92
93     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 .
94
95     If everything is ok, you can follow the next steps to deploy new Services Providers.
96     
97     .. note::
98        If you are using your own libs (not the default libs on your system) then you must take care to create
99        universal versions of those libs, as the ZOO-Kernel will try to create a universal binary.  If you are
100        not following this advice, you might receive compile errors of ``symbol(s) not found for architecture ppc`` or ``file was built for
101        unsupported file format which is not the architecture being linked (ppc)``.
102     
103Deploy the OGR Services Provider
104--------------------------------
105
106Requirements
107************
108
109Before your try to use any service, please set the correct path in the ``main.cfg`` for tmpPath and tmpUrl.
110
111You can use the following setup :
112
113::
114
115  tmpPath = /Library/WebServer/Documents/tmp
116  tmpUrl = ../../tmp
117
118Obviously you'll then need to create this directory, using the following command :
119
120::
121
122  mkdir /Library/WebServer/Documents/tmp
123
124C Version
125*********
126
127To compile the base-vect-ops ServicesProvider you'll need to edit the Makefile in *zoo/zoo-services/ogr/base-vect-ops/*
128directory. Add "-I/Library//Frameworks/GEOS.framework/Versions/3/Headers/" to the CFLAGS value on the first line.
129To compile, add GDAL framework to the PATH environmenet variable, to ensure that gdal-config tool will be found,
130run make and then copy cgi-env files in the /Library/WebServer/CGI-Executables directory.
131
132::
133
134  cd zoo/zoo-services/ogr/base-vect-ops/
135  export PATH=$PATH:/Library/Frameworks/GDAL.framework/Versions/1.7/Programs/
136  make
137  cp cgi-env/* /Library/WebServer/CGI-Executables
138
139You can test using this `url <http://localhost/cgi-bin/zoo_loader.cgi?request=Execute&service=WPS&version=1.0.0&Identifier=Buffer&DataInputs=BufferDistance=1@datatype=interger;InputPolygon=Reference@xlink:href=http%3A%2F%2Fwww.zoo-project.org%3A8082%2Fgeoserver%2Fows%3FSERVICE%3DWFS%26REQUEST%3DGetFeature%26VERSION%3D1.0.0%26typename%3Dtopp%3Astates%26SRS%3DEPSG%3A4326%26FeatureID%3Dstates.15>`__
140if everything is ok with your setup.
141
142Python Version
143**************
144
145**Requirements**
146
147First of all run python from a Terminal.app and try the following import from the python interpreter :
148
149::
150
151  import osgeo.ogr
152  import libxml2
153
154If you get an issue when importing the libxml2 module from your python interpreter then that means you
155need to install the Python support for the libxml2 library which is already installed on your Mac OS X environment.
156To accomplish this, you have first to determine what version of libxml2 is installed on your platform, using the following command:
157
158xml2-config --version
159
160Download the source corresponding to your version (i.e. on 10.6.6 you get 2.7.3) from the libxml2 
161`download page <ftp://xmlsoft.org/libxml2/>`__ into your ``src`` directory then uncompress it.
162
163Use the following command to install the python support :
164
165::
166
167  cd src/libxml2-2.7.3/python/
168  python setup.py install
169
170**Deploy OGR Python Services Provider**
171
172- Now copy the ``zoo-services/ogt/base-vect-ops/cgi-env`` files into ``/Library/WebServer/CGI-Executables``.
173
174You can test using this `url <http://localhost/cgi-bin/zoo_loader.cgi?request=Execute&service=WPS&version=1.0.0&Identifier=BufferPy&DataInputs=BufferDistance=1@datatype=interger;InputPolygon=Reference@xlink:href=http%3A%2F%2Fwww.zoo-project.org%3A8082%2Fgeoserver%2Fows%3FSERVICE%3DWFS%26REQUEST%3DGetFeature%26VERSION%3D1.0.0%26typename%3Dtopp%3Astates%26SRS%3DEPSG%3A4326%26FeatureID%3Dstates.15>`__
175if everything is ok with your setup.
176
177Test using Local Demo Page
178--------------------------
179
180- Download the `OpenLayers <http://openlayers.org>`__ library and uncompress it in your personal Sites directory
181  (located in your home directory).
182 
183- Rename the OpenLayers directory as openlayers.
184
185- Download this `zip archive <http://www.zoo-project.org/trac/raw-attachment/wiki/ZooDocumentation/ZOOKernel/MacOSX_installation/zoo-demo.zip>`__
186  and then uncompress it in your personal Sites directory.
187 
188- Load your local demo pages using urls similar to the following (replacing MyUserName by your MacOS user name) :
189
190    *  http://localhost/~MyUserName/zoo-demo/spatialtools.html
191    *  http://localhost/~MyUserName/zoo-demo/spatialtools-py.html
192
193
Note: See TracBrowser for help on using the repository browser.

Search

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