source: branches/PublicaMundi_David-devel/docs/_build/html/_sources/install/install-onmacos.txt @ 659

Last change on this file since 659 was 659, checked in by nbozon, 9 years ago

Massive update of zoo docs

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