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

Last change on this file since 654 was 349, checked in by neteler, 13 years ago

fix double LF

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