Changeset 222 for trunk/docs/kernel


Ignore:
Timestamp:
Jun 1, 2011, 8:18:36 PM (14 years ago)
Author:
jmckenna
Message:

add mac os x install notes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/kernel/installation.txt

    r215 r222  
    508508
    509509- install some dependencies
     510
    510511::
    511512
     
    624625To be written soon ...
    625626
    626 
     627Mac OS X
     628--------
     629
     630Using the Installer
     631*******************
     632
     6331. 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>`__.
     634
     635   .. note::
     636      The installer assumes that you are using the distributed Apache2 version that comes with your Mac.  The installer will
     637      place ZOO-Kernel and ZOO-Services into your cgi-bin at ``/Library/WebServer/CGI-Executables``, and the zoo-demo folder
     638      will be placed within your document root at ``/Library/WebServer/Documents``
     639
     6402. Make sure that your Apache server is running, and then access the ZOO Project Demo at:
     641
     642      http://localhost/zoo-demo/spatialtools.html
     643     
     6443. To add additional services, please follow the following intructions to compile your own ZOO Project instance.
     645
     646Compiling from Source
     647*********************
     648
     6491. Install `Xcode <http://developer.apple.com/technologies/tools/>`__.
     650
     6512. Before you start downloading the ZOO-Project source code, you'll need to install some tools required to
     652   compile ZOO-Kernel properly.
     653
     654   First of all install PROJ, GEOS and GDAL frameworks from `here <http://www.kyngchaos.com/software/frameworks>`__.
     655
     656   At this step, you should get the following directories on your local hard drive :
     657
     658   ::
     659   
     660     /Library/Frameworks/PROJ.framework
     661     /Library/Frameworks/GEOS.framework
     662     /Library/Frameworks/GDAL.framework
     663
     6643. Then, create a ``src`` directory and inside that directory download the `gettext source code <http://www.gnu.org/software/gettext/#TOCdownloading>`__ and uncompress it.
     665
     666   now, compile gettext with the following commands to produce a universal binary :
     667
     668   ::
     669   
     670     cd gettext-0.18.1.1
     671     CFLAGS="-O -g -arch i386 -arch ppc -arch x86_64"  \
     672       LDFLAGS="-arch i386 -arch ppc -arch x86_64"   ./configure
     673     make
     674     sudo make install
     675
     6764. Compile and install your ZOO-Kernel
     677
     678   - Download source from SVN, and use the following command to compile libcgic :
     679
     680     ::
     681     
     682       svn co http://svn.zoo-project.org/svn/trunk zoo
     683       cd zoo/thirds/cgic206
     684       make
     685
     686   - If you produced the ``libcgic.a`` file, you can run ``autoconf`` and then ``configure`` from zoo-kernel directory.
     687
     688     ::
     689     
     690       cd zoo/zoo-kernel
     691       autoconf
     692       ./configure --with-python --with-java=macos \
     693          --with-gdal-config=/Library/Frameworks/GDAL.framework/Versions/1.8/Programs/gdal-config
     694
     695     Obviously, if you don't need Python or Java support then you should remove the corresponding configure option.
     696
     697     .. note::
     698        Note that we used the --with-java=macos configure option. Due to the generic location of the JDK on all
     699        Mac OS X platforms, you don't have to provide its full path.
     700
     701   - Now, run the following commands to compile and deploy your ZOO-Kernel on your Apache server :
     702
     703     ::
     704     
     705       make
     706       cp zoo_loader.cgi main.cfg /Library/WebServer/CGI-Executables
     707
     708     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 .
     709
     710     If everything is ok, you can follow the next steps to deploy new Services Providers.
     711     
     712     .. note::
     713        If you are using your own libs (not the default libs on your system) then you must take care to create
     714        universal versions of those libs, as the ZOO-Kernel will try to create a universal binary.  If you are
     715        not following this advice, you might receive compile errors of ``symbol(s) not found for architecture ppc`` or ``file was built for
     716        unsupported file format which is not the architecture being linked (ppc)``.
     717     
     718Deploy the OGR Services Provider
     719********************************
     720
     721Requirements
     722^^^^^^^^^^^^
     723
     724Before your try to use any service, please set the correct path in the ``main.cfg`` for tmpPath and tmpUrl.
     725
     726You can use the following setup :
     727
     728::
     729
     730  tmpPath = /Library/WebServer/Documents/tmp
     731  tmpUrl = ../../tmp
     732
     733Obviously you'll then need to create this directory, using the following command :
     734
     735::
     736
     737  mkdir /Library/WebServer/Documents/tmp
     738
     739C Version
     740^^^^^^^^^
     741
     742To compile the base-vect-ops ServicesProvider you'll need to edit the Makefile in *zoo/zoo-services/ogr/base-vect-ops/*
     743directory. Add "-I/Library//Frameworks/GEOS.framework/Versions/3/Headers/" to the CFLAGS value on the first line.
     744To compile, add GDAL framework to the PATH environmenet variable, to ensure that gdal-config tool will be found,
     745run make and then copy cgi-env files in the /Library/WebServer/CGI-Executables directory.
     746
     747::
     748
     749  cd zoo/zoo-services/ogr/base-vect-ops/
     750  export PATH=$PATH:/Library/Frameworks/GDAL.framework/Versions/1.7/Programs/
     751  make
     752  cp cgi-env/* /Library/WebServer/CGI-Executables
     753
     754You 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>`__
     755if everything is ok with your setup.
     756
     757Python Version
     758^^^^^^^^^^^^^^
     759
     760**Requirements**
     761
     762First of all run python from a Terminal.app and try the following import from the python interpreter :
     763
     764::
     765
     766  import osgeo.ogr
     767  import libxml2
     768
     769If you get an issue when importing the libxml2 module from your python interpreter then that means you
     770need to install the Python support for the libxml2 library which is already installed on your Mac OS X environment.
     771To accomplish this, you have first to determine what version of libxml2 is installed on your platform, using the following command:
     772
     773xml2-config --version
     774
     775Download the source corresponding to your version (i.e. on 10.6.6 you get 2.7.3) from the libxml2 
     776`download page <ftp://xmlsoft.org/libxml2/>`__ into your ``src`` directory then uncompress it.
     777
     778Use the following command to install the python support :
     779
     780::
     781
     782  cd src/libxml2-2.7.3/python/
     783  python setup.py install
     784
     785**Deploy OGR Python Services Provider**
     786
     787- Now copy the ``zoo-services/ogt/base-vect-ops/cgi-env`` files into ``/Library/WebServer/CGI-Executables``.
     788
     789You 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>`__
     790if everything is ok with your setup.
     791
     792Test using Local Demo Page
     793**************************
     794
     795- Download the `OpenLayers <http://openlayers.org>`__ library and uncompress it in your personal Sites directory
     796  (located in your home directory).
     797 
     798- Rename the OpenLayers directory as openlayers.
     799
     800- Download this `zip archive <http://www.zoo-project.org/trac/raw-attachment/wiki/ZooDocumentation/ZOOKernel/MacOSX_installation/zoo-demo.zip>`__
     801  and then uncompress it in your personal Sites directory.
     802 
     803- Load your local demo pages using urls similar to the following (replacing MyUserName by your MacOS user name) :
     804
     805    *  http://localhost/~MyUserName/zoo-demo/spatialtools.html
     806    *  http://localhost/~MyUserName/zoo-demo/spatialtools-py.html
     807
     808
     809
Note: See TracChangeset for help on using the changeset viewer.

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