Changes between Initial Version and Version 1 of ZooWebSite/ZooKernel/InstallationUsingOO


Ignore:
Timestamp:
Apr 14, 2010, 8:05:48 PM (14 years ago)
Author:
djay
Comment:

First Installation instructions to make your ZOO Kernel support OpenOffice? UNO

Legend:

Unmodified
Added
Removed
Modified
  • ZooWebSite/ZooKernel/InstallationUsingOO

    v1 v1  
     1= ZOO Kernel using !OpenOffice UNO support =
     2
     3To be able to use the Exporter ZOO Service Provider, you'll have to follow this intructions.
     4
     5== Install !OpenOffice and start it in server mode ==
     6
     7First of all, you'll have to setup OpenOffice on your machine, then use the following commnd to start OpenOffice Server :
     8
     9{{{
     10#!sh
     11soffice -nofirststartwizard -norestore \
     12        -nocrashreport -norecovery \
     13        -accept="socket,host=127.0.0.1,port=3662;urp"
     14}}}
     15
     16Now, you should get an OpenOffice server ready to be used remotly, using {{{127.0.0.1}}} ip adress and {{{3662}}} port.
     17
     18Make sure your OpenOffice Server started correctly using the following command (replace {{{grep}}} by {{{findstr}}} on WIN32 platform) :
     19
     20{{{
     21#!sh
     22netstat -na | grep "LISTEN " | grep 3662
     23}}}
     24
     25== Compile ZOO Kernel ==
     26
     27First compile using your local Python installation. Then edit the Makefile and set {{{PYTHONCFLAGS}}} to your local OpenOffice Python headers installation path as for {{{PYTHONLDFLAGS}}} to the python shared library provided by OpenOffice.
     28
     29Here, you'll find the specific section sample you can copy/paste in your local Makefile :
     30
     31{{{
     32PYTHONCFLAGS=-I/opt/openoffice.org/basis3.0/program/python-core-2.3.4/include/python2.3/ -fno-strict-aliasing -DNDEBUG
     33PYTHONLDFLAGS=-L/opt/openoffice.org/basis3.0/program/ -lpthread -ldl -lutil -lm /opt/openoffice.org/basis3.0/program/libpython2.3.so.1.0
     34}}}
     35
     36Now, recompile your ZOO Kernel then copy it into your apache cgi-bin directory using the following commands :
     37
     38{{{
     39#!sh
     40make clean
     41make
     42cp zoo_loader.cgi /var/www/localhost/cgi-bin/zoo_loader_oo.cgi
     43}}}
     44
     45Now update your {{{/etc/ld.so.conf}}} to add the directory where the OpenOffice shared lilbraries are located.
     46
     47{{{
     48/opt/openoffice.org3/basis-link/program/
     49}}}
     50
     51Note that if you already have a {{{/libpython2.3.so.1.0}}} installed in your {{{/usr/lib}}} directory then you'll have to save then create a symbolic link from {{{/usr/lib}}} to your OpenOffice corresponding library.
     52
     53== Configure your ZOO Kernel ==
     54
     55To make the Exporter ZOO ServiceProvider working, you'll have to edit the main ZOO configuration file ({{{main.cfg}}}) located in the same directory as you kernel to add some specific parameters needed by Python to support UNO.
     56
     57First, set the paths in {{{[env]}}} section, as for other parameters in this section they will be automaticaly setted by ZOO Kernl before calling ZOO ServiceProvider. Then, add the {{{[oo]}}} section containing the parameter {{{server}}} which contain the UNO connection string (setted to your local OpenOffice Server listen adress and port).
     58
     59{{{
     60[env]
     61LD_LIBRARY_PATH=/opt/openoffice.org3/basis-link/program/
     62URE_BOOTSTRAP=vnd.sun.star.pathname:/opt/openoffice.org3/program/fundamentalrc
     63PYTHONHOME=/opt/openoffice.org3/program/../basis-link/program/python-core-2.3.4
     64PYTHONPATH=/opt/openoffice.org3/program/../basis-link/program:/opt/openoffice.org3/program/../basis-link/program:/opt/openoffice.org3/program/../basis-link/program/python-core-2.3.4/lib:/opt/openoffice.org3/program/../basis-link/program/python-core-2.3.4/lib/lib-dynload:/opt/openoffice.org3/program/../basis-link/program/python-core-2.3.4/lib/lib-tk:/opt/openoffice.org3/program/../basis-link/program/python-core-2.3.4/lib/site-packages:/opt/openoffice.org3/basis-link/program:/opt/openoffice.org3/basis-link/program/python-core-2.3.4/lib:/opt/openoffice.org3/basis-link/program/python-core-2.3.4/lib/lib-dynload:/opt/openoffice.org3/basis-link/program/python-core-2.3.4/lib/lib-tk:/opt/openoffice.org3/basis-link/program/python-core-2.3.4/lib/site-packages:/opt/openoffice.org3/basis-link/program/python-core-2.3.4/lib/python23.zip:/opt/openoffice.org3/basis-link/program/python-core-2.3.4/lib/python2.3:/opt/openoffice.org3/basis-link/program/python-core-2.3.4/lib/python2.3/plat-linux2:/opt/openoffice.org3/basis-link/program/python-core-2.3.4/lib/python2.3/lib-tk:/opt/openoffice.org3/basis-link/program/python-core-2.3.4/lib/python2.3/lib-dynload:.
     65
     66[oo]
     67server=uno:socket,host::127.0.0.1,port::3662;urp;StarOffice.ComponentContext
     68}}}
     69
     70Also ensure that the following parameters are present in your {{{[main]}}} section :
     71 * {{{dataPath}}} path to find the original document (sample value : /var/www/localhost/htdocs/data-srtm)
     72 * {{{tmpPath}}} path to store produced document  (sample value: /var/www/localhost/htdocs/ms_tmp)
     73 * {{{tmpUrl}}} (Optional) url to get back produced document - relative to the ZOO Kernel location (sample value : /ms_tmp/)
     74
     75
     76To check which are your local parameters, please use the following commands :
     77
     78{{{
     79#!sh
     80/opt/openoffice.org3/program/python
     81>>> import sys
     82>>> print sys.path
     83}}}
     84
     85== Test it ! ==
     86
     87Last thing to do before testing your ZOO ServiceProvider is to deploy it in your local installation.
     88
     89{{{
     90#!sh
     91cp zoo-project/zoo-services/openoffice/cgi-env/ /var/www/localhost/cgi-bin/
     92}}}
     93
     94Now evertyhing should be correctly settled up on your local system. To test your local !OpenOffice !ServiceProvider, please use following urls (supposing that you get a {{{demoDoc.odt}}} file located in your {{{dataPath}}} directory) :
     95
     96{{{
     97http://localhost/zoo/?Service=WPS&Request=Execute&Version=1.0.0&Identifier=OdtConverter&DataInputs=InputDoc=demoDoc.odt@dataType=string;OutputDoc=demoDoc.pdf@dataType=string
     98}}}
     99
     100You can also consult our local ZOO Kernel installation using [http://www.zoo-project.orgindex.php?left=zoodemo-odtconverter&special=1 this form] !

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