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-12-07 13:19:47 +0000 (Wed, 07 Dec 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 | |
---|
47 | - go to kernel path |
---|
48 | |
---|
49 | :: |
---|
50 | |
---|
51 | cd ../../zoo-kernel/ |
---|
52 | |
---|
53 | - create configure file |
---|
54 | |
---|
55 | :: |
---|
56 | |
---|
57 | autoconf |
---|
58 | |
---|
59 | - run configure |
---|
60 | |
---|
61 | :: |
---|
62 | |
---|
63 | ./configure --with-java=/path/to/java |
---|
64 | ./configure --with-python |
---|
65 | |
---|
66 | .. note:: |
---|
67 | In Ubuntu 10.04 libmozjs-dev does not exist, so to use JavaScript you can compile SpiderMonkey (remember to put /usr/local/lib in a file inside /etc/ld.so.conf.d/). |
---|
68 | For PHP, you must make sure to compile PHP with `--enable-embed <http://www.zoo-project.org/trac/wiki/ZooKernel/Embed/PHP#ConfigureandInstallPHPEmbedlibrary>`__. |
---|
69 | |
---|
70 | - to use JavaScript with compiled SpiderMonkey. |
---|
71 | |
---|
72 | :: |
---|
73 | |
---|
74 | sudo echo "/usr/local/lib" > /etc/ld.so.conf.d/libmoz185.conf |
---|
75 | sudo ldconfig |
---|
76 | ./configure --with-js=/usr/local |
---|
77 | |
---|
78 | |
---|
79 | - to use JavaScript with Xulrunner . |
---|
80 | |
---|
81 | :: |
---|
82 | |
---|
83 | sudo echo "/usr/lib/xulrunner-dev" > /etc/ld.so.conf.d/libmoz185.conf |
---|
84 | sudo ldconfig |
---|
85 | ./configure --with-js=/usr/lib/xulrunner-dev |
---|
86 | |
---|
87 | |
---|
88 | - compile |
---|
89 | |
---|
90 | :: |
---|
91 | |
---|
92 | make zoo_loader.cgi |
---|
93 | |
---|
94 | - copy necessary files into your cgi-bin |
---|
95 | |
---|
96 | :: |
---|
97 | |
---|
98 | sudo cp main.cfg /usr/lib/cgi-bin |
---|
99 | sudo cp zoo_loader.cgi /usr/lib/cgi-bin |
---|
100 | |
---|
101 | - install ZOO ServiceProvider (in this case we try Python service) |
---|
102 | |
---|
103 | :: |
---|
104 | |
---|
105 | sudo cp ../zoo-services/hello-py/cgi-env/*.zcfg /usr/lib/cgi-bin |
---|
106 | sudo cp ../zoo-services/hello-py/*.py /usr/lib/cgi-bin/ |
---|
107 | |
---|
108 | - change some paths in the main.cfg |
---|
109 | |
---|
110 | :: |
---|
111 | |
---|
112 | sudo nano /usr/lib/cgi-bin/main.cfg |
---|
113 | - serverAddress = http://127.0.0.1 |
---|
114 | - providerSite = http://127.0.0.1 |
---|
115 | |
---|
116 | |
---|
117 | - try the installation |
---|
118 | |
---|
119 | - http://127.0.0.1/cgi-bin/zoo_loader.cgi?ServiceProvider=&metapath=&Service=WPS&Request=GetCapabilities&Version=1.0.0 |
---|
120 | - http://127.0.0.1/cgi-bin/zoo_loader.cgi?ServiceProvider=&metapath=&Service=WPS&Request=DescribeProcess&Version=1.0.0&Identifier=HelloPy |
---|
121 | - 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 |
---|
122 | |
---|
123 | .. note:: |
---|
124 | If you have some problem in the execute request using Python service, add the following to ``main.cfg``: |
---|
125 | |
---|
126 | :: |
---|
127 | |
---|
128 | [env] |
---|
129 | PYTHONPATH=<YOUR_PYTHONPATH> |
---|