[240] | 1 | .. _kernel-installation-debian: |
---|
| 2 | |
---|
| 3 | Debian / Ubuntu |
---|
| 4 | =============== |
---|
| 5 | |
---|
| 6 | .. contents:: Table of Contents |
---|
| 7 | :depth: 2 |
---|
| 8 | :backlinks: top |
---|
| 9 | |
---|
| 10 | .. note:: |
---|
| 11 | An Ubuntu 10.4 with ZOO virtual image is available at http://www.zoo-project.org/Ubuntu10.4_ZOO.zip |
---|
| 12 | (root: ZOO.test) |
---|
| 13 | |
---|
| 14 | The following instructions were tested on Debian Squeeze, Ubuntu 10.04 and Ubuntu 10.10 |
---|
| 15 | |
---|
| 16 | Installation Workflow |
---|
| 17 | --------------------- |
---|
| 18 | |
---|
| 19 | - install some dependencies |
---|
| 20 | |
---|
| 21 | :: |
---|
| 22 | |
---|
| 23 | sudo apt-get install flex bison libfcgi-dev libxml2 libxml2-dev curl openssl autoconf checkinstall |
---|
| 24 | |
---|
| 25 | - download ZOO source |
---|
| 26 | |
---|
| 27 | :: |
---|
| 28 | |
---|
| 29 | svn checkout http://svn.zoo-project.org/svn/trunk zoo-project |
---|
| 30 | |
---|
| 31 | - install cgic from packages |
---|
| 32 | |
---|
| 33 | :: |
---|
| 34 | |
---|
| 35 | cd zoo-project/thirds/cgic206/ |
---|
| 36 | |
---|
| 37 | - change the path of installation |
---|
| 38 | |
---|
| 39 | :: |
---|
| 40 | |
---|
| 41 | nano Makefile |
---|
| 42 | - LIBS=-L./ -lcgic ../fcgi-2.4.0/libfcgi/.libs/libfcgi.a --> LIBS=/path/to/libfcgi.a |
---|
| 43 | - cp libcgic.a ../../dist/lib --> cp libcgic.a /usr/lib |
---|
| 44 | - cp cgic.h ../../dist//include --> cp cgic.h /usr/include |
---|
| 45 | - @echo libcgic.a is in ../../dist/lib and cgic.h is in ../../dist//include. --> @echo libcgic.a is in /usr/lib and cgic.h is in /usr/include. |
---|
| 46 | |
---|
| 47 | - compile |
---|
| 48 | |
---|
| 49 | :: |
---|
| 50 | |
---|
| 51 | make |
---|
| 52 | |
---|
| 53 | - install |
---|
| 54 | |
---|
| 55 | :: |
---|
| 56 | |
---|
| 57 | sudo make install |
---|
| 58 | |
---|
| 59 | - go to kernel path |
---|
| 60 | |
---|
| 61 | :: |
---|
| 62 | |
---|
| 63 | cd ../../zoo-kernel/ |
---|
| 64 | |
---|
| 65 | - create configure file |
---|
| 66 | |
---|
| 67 | :: |
---|
| 68 | |
---|
| 69 | autoconf |
---|
| 70 | |
---|
| 71 | - run configure |
---|
| 72 | |
---|
| 73 | .. note:: |
---|
| 74 | In Ubuntu 10.04 libmozjs-dev does not exist, so to use JS you can compile `SpiderMonkey <https://developer.mozilla.org/en/SpiderMonkey>`__ or use the xulrunner-dev package |
---|
| 75 | which includes SpiderMonkey. |
---|
| 76 | For PHP, you must make sure to compile PHP with `--enable-embed <http://www.zoo-project.org/trac/wiki/ZooKernel/Embed/PHP#ConfigureandInstallPHPEmbedlibrary>`__. |
---|
| 77 | |
---|
| 78 | :: |
---|
| 79 | |
---|
| 80 | ./configure --with-java=/path/to/java |
---|
| 81 | |
---|
| 82 | to JavaScript with XulRunner SpiderMonkey you have to edit configure file. |
---|
| 83 | - JS_CPPFLAGS="-I$JSHOME/include/js" --> JS_CPPFLAGS="-I$JSHOME/include" |
---|
| 84 | - JS_LDFLAGS="-L$JSHOME/lib -ljs -lm" --> JS_LDFLAGS="-L$JSHOME/lib -lmozjs -lm" |
---|
| 85 | - JS_LIB="js" --> JS_LIB="mozjs" |
---|
| 86 | |
---|
| 87 | ./configure --with-js=/usr/lib/xulrunner-devel.1.9.2.n |
---|
| 88 | |
---|
| 89 | - compile |
---|
| 90 | |
---|
| 91 | :: |
---|
| 92 | |
---|
| 93 | make zoo_loader.cgi |
---|
| 94 | |
---|
| 95 | - copy necessary files into your cgi-bin |
---|
| 96 | |
---|
| 97 | :: |
---|
| 98 | |
---|
| 99 | sudo cp main.cfg /usr/lib/cgi-bin |
---|
| 100 | sudo cp zoo_loader.cgi /usr/lib/cgi-bin |
---|
| 101 | |
---|
| 102 | - Install ZOO ServiceProvider |
---|
| 103 | |
---|
| 104 | :: |
---|
| 105 | |
---|
| 106 | sudo cp ../zoo-services/hello-py/cgi-env/*.zcfg /usr/lib/cgi-bin |
---|
| 107 | sudo cp ../zoo-services/hello-py/*.py /usr/lib/cgi-bin/ |
---|
| 108 | |
---|
| 109 | - change some paths in the main.cfg |
---|
| 110 | |
---|
| 111 | :: |
---|
| 112 | |
---|
| 113 | sudo nano /usr/lib/cgi-bin/main.cfg |
---|
| 114 | - serverAddress = http://127.0.0.1 |
---|
| 115 | - providerSite = http://127.0.0.1 |
---|
| 116 | |
---|
| 117 | |
---|
| 118 | - try the installation |
---|
| 119 | |
---|
| 120 | - http://127.0.0.1/cgi-bin/zoo_loader.cgi?ServiceProvider=&metapath=&Service=WPS&Request=GetCapabilities&Version=1.0.0 |
---|
| 121 | - http://127.0.0.1/cgi-bin/zoo_loader.cgi?ServiceProvider=&metapath=&Service=WPS&Request=DescribeProcess&Version=1.0.0&Identifier=HelloPy |
---|
| 122 | - http://127.0.0.1/cgi-bin/zoo_loader.cgi?ServiceProvider=&metapath=&Service=WPS&Request=Execute&Version=1.0.0&Identifier=HelloPy&DataInputs=a=myname |
---|
| 123 | |
---|
| 124 | .. note:: |
---|
| 125 | If you have some problem in the execute request, add the following to ``main.cfg``: |
---|
| 126 | |
---|
| 127 | :: |
---|
| 128 | |
---|
| 129 | [env] |
---|
| 130 | PYTHONPATH=<YOUR_PYTHONPATH> |
---|