ZooWebSite/ZooKernel/InstallationUsingOO

Version 3 (modified by djay, 9 years ago)

--

ZOO Kernel using OpenOffice UNO support

To be able to use the Exporter ZOO Service Provider, you'll have to follow this intructions.

Install OpenOffice and start it in server mode

First of all, you'll have to setup OpenOffice on your machine, then use the following command to start OpenOffice Server :

soffice -nofirststartwizard -norestore \
        -nocrashreport -norecovery \
        -accept="socket,host=127.0.0.1,port=3662;urp"

Now, you should get an OpenOffice server ready to be used remotly, using 127.0.0.1 ip adress and 3662 port.

Make sure your OpenOffice Server started correctly using the following command (replace grep by findstr on WIN32 platform) :

netstat -na | grep "LISTEN " | grep 3662

Compile ZOO Kernel

First 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.

Here, you'll find the specific section sample you can copy/paste in your local Makefile :

PYTHONCFLAGS=-I/opt/openoffice.org/basis3.0/program/python-core-2.3.4/include/python2.3/ -fno-strict-aliasing -DNDEBUG
PYTHONLDFLAGS=-L/opt/openoffice.org/basis3.0/program/ -lpthread -ldl -lutil -lm /opt/openoffice.org/basis3.0/program/libpython2.3.so.1.0

Now, recompile your ZOO Kernel then copy it into your apache cgi-bin directory using the following commands :

make clean
make
cp zoo_loader.cgi /var/www/localhost/cgi-bin/zoo_loader_oo.cgi

Now update your /etc/ld.so.conf to add the directory where the OpenOffice shared lilbraries are located.

/opt/openoffice.org3/basis-link/program/

Note 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.

Configure your ZOO Kernel

To make the Exporter ZOO Service 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.

First, set the paths in [env] section, as for other parameters in this section they will be automaticaly setted by ZOO Kernel before calling ZOO Service. Then, add the [oo] section including the parameter server which contains the UNO connection string (setted to your local OpenOffice Server listen adress and port).

[env]
LD_LIBRARY_PATH=/opt/openoffice.org3/basis-link/program/
URE_BOOTSTRAP=vnd.sun.star.pathname:/opt/openoffice.org3/program/fundamentalrc
PYTHONHOME=/opt/openoffice.org3/program/../basis-link/program/python-core-2.3.4
PYTHONPATH=/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:.

[oo]
server=uno:socket,host::127.0.0.1,port::3662;urp;StarOffice.ComponentContext

Also ensure that the following parameters are present in your [main] section :

  • dataPath path to find the original document (sample value : /var/www/localhost/htdocs/data-srtm)
  • tmpPath path to store produced document (sample value: /var/www/localhost/htdocs/ms_tmp)
  • tmpUrl (Optional) url to get back produced document - relative to the ZOO Kernel location (sample value : /ms_tmp/)

To check which are your local parameters for PYTHONPATH variable to set in the [env] section, please use the following commands on your server :

/opt/openoffice.org3/program/python
>>> import sys
>>> print sys.path

Test it !

Last thing to do before testing your ZOO ServiceProvider is to deploy it in your local installation.

cp zoo-project/zoo-services/openoffice/cgi-env/* /var/www/localhost/cgi-bin/

Now 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) :

http://localhost/cgi-bin/zoo_loader_oo.cgi?Service=WPS&Request=Execute&Version=1.0.0&Identifier=OdtConverter&DataInputs=InputDoc=demoDoc.odt@dataType=string;OutputDoc=demoDoc.pdf@dataType=string

You can also consult our local ZOO Kernel installation using this form !

Search

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