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

Last change on this file since 254 was 240, checked in by jmckenna, 14 years ago

separate install docs

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

Search

Context Navigation

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