1 | .. _install-debian: |
---|
2 | |
---|
3 | Installation on Debian / Ubuntu |
---|
4 | =============================== |
---|
5 | |
---|
6 | Use the following instructions to install `ZOO-Project <http://zoo-project.org>`__ on Debian or Ubuntu distributions. |
---|
7 | |
---|
8 | Prerequisites |
---|
9 | ------------- |
---|
10 | |
---|
11 | Using Debian |
---|
12 | ...................... |
---|
13 | |
---|
14 | The following command should install all the required dependancies on Debian. See the :ref:`install-prereq` section for additional information. |
---|
15 | |
---|
16 | .. code-block:: guess |
---|
17 | |
---|
18 | apt-get install flex bison libfcgi-dev libxml2 libxml2-dev curl openssl autoconf apache2 python-software-properties subversion python-dev libgdal1-dev build-essential libmozjs185-dev |
---|
19 | |
---|
20 | Using Ubuntu |
---|
21 | ...................... |
---|
22 | |
---|
23 | On Ubuntu, use the following command first to install the required dependancies : |
---|
24 | |
---|
25 | .. code-block:: guess |
---|
26 | |
---|
27 | sudo apt-get install flex bison libfcgi-dev libxml2 libxml2-dev curl openssl autoconf apache2 python-software-properties subversion libmozjs185-dev python-dev build-essential |
---|
28 | |
---|
29 | Then add the *UbuntuGIS* repository in order to get the latest versions of libraries |
---|
30 | |
---|
31 | .. code-block:: guess |
---|
32 | |
---|
33 | sudo add-apt-repository ppa:ubuntugis/ppa |
---|
34 | sudo apt-get update |
---|
35 | |
---|
36 | Install the geographic library as follow: |
---|
37 | |
---|
38 | .. code-block:: guess |
---|
39 | |
---|
40 | sudo apt-get install libgdal1-dev |
---|
41 | |
---|
42 | |
---|
43 | Installation |
---|
44 | ------------ |
---|
45 | |
---|
46 | :ref:`install-download` ZOO-Project latest version from svn using the following command: |
---|
47 | |
---|
48 | .. code-block:: guess |
---|
49 | |
---|
50 | svn checkout http://svn.zoo-project.org/svn/trunk zoo-project |
---|
51 | |
---|
52 | Install the *cgic* library from packages using the following command: |
---|
53 | |
---|
54 | .. code-block:: guess |
---|
55 | |
---|
56 | cd zoo-project/thirds/cgic206/ |
---|
57 | make |
---|
58 | |
---|
59 | Head to the :ref:`kernel_index` directory |
---|
60 | |
---|
61 | .. code-block:: guess |
---|
62 | |
---|
63 | cd ../../zoo-project/zoo-kernel/ |
---|
64 | |
---|
65 | Create a configure file as follow: |
---|
66 | |
---|
67 | .. code-block:: guess |
---|
68 | |
---|
69 | autoconf |
---|
70 | |
---|
71 | Run configure with the desired options, for example with the following command: |
---|
72 | |
---|
73 | .. code-block:: guess |
---|
74 | |
---|
75 | ./configure --with-js --with-python |
---|
76 | |
---|
77 | .. note:: |
---|
78 | Refer to the :ref:`installation` section for the full list of available options |
---|
79 | |
---|
80 | Compile ZOO-Kernel as follow: |
---|
81 | |
---|
82 | .. code-block:: guess |
---|
83 | |
---|
84 | make |
---|
85 | |
---|
86 | Install the ``libzoo_service.so.1.5`` by using the following command: |
---|
87 | |
---|
88 | .. code-block:: guess |
---|
89 | |
---|
90 | sudo make install |
---|
91 | |
---|
92 | |
---|
93 | Copy the necessary files to the `cgi-bin` directory (as administrator |
---|
94 | user): |
---|
95 | |
---|
96 | .. code-block:: guess |
---|
97 | |
---|
98 | cp main.cfg /usr/lib/cgi-bin |
---|
99 | cp zoo_loader.cgi /usr/lib/cgi-bin |
---|
100 | |
---|
101 | Install ZOO ServiceProviders, for example the basic Python service (as administrator user) |
---|
102 | |
---|
103 | .. code-block:: guess |
---|
104 | |
---|
105 | cp ../zoo-services/hello-py/cgi-env/*.zcfg /usr/lib/cgi-bin |
---|
106 | cp ../zoo-services/hello-py/*.py /usr/lib/cgi-bin/ |
---|
107 | |
---|
108 | Edit the *main.cfg* file as follow (example configuration): |
---|
109 | |
---|
110 | .. code-block:: guess |
---|
111 | |
---|
112 | nano /usr/lib/cgi-bin/main.cfg |
---|
113 | - serverAddress = http://127.0.0.1 |
---|
114 | |
---|
115 | |
---|
116 | Test the ZOO-Kernel installation with the following requests: |
---|
117 | |
---|
118 | .. code-block:: guess |
---|
119 | |
---|
120 | http://127.0.0.1/cgi-bin/zoo_loader.cgi?ServiceProvider=&metapath=&Service=WPS&Request=GetCapabilities&Version=1.0.0 |
---|
121 | |
---|
122 | .. code-block:: guess |
---|
123 | |
---|
124 | http://127.0.0.1/cgi-bin/zoo_loader.cgi?ServiceProvider=&metapath=&Service=WPS&Request=DescribeProcess&Version=1.0.0&Identifier=HelloPy |
---|
125 | |
---|
126 | .. code-block:: guess |
---|
127 | |
---|
128 | 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 |
---|
129 | |
---|
130 | |
---|
131 | .. note:: |
---|
132 | |
---|
133 | Such request should return well formed XML documents (OWS documents responses). |
---|
134 | |
---|
135 | .. warning:: |
---|
136 | |
---|
137 | If ZOO-Kernel returns an error please check the :ref:`kernel_config` and beware of the :ref:`install-prereq`. |
---|
138 | |
---|