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