1 | .. _kernel-installation-unix: |
---|
2 | |
---|
3 | Unix |
---|
4 | ==== |
---|
5 | |
---|
6 | :Authors: Nicolas Bozon, Gérald Fenoy, Jeff McKenna, Luca Delucchi |
---|
7 | :Last Updated: $Date: 2013-03-28 14:10:57 +0000 (Thu, 28 Mar 2013) $ |
---|
8 | |
---|
9 | .. contents:: Table of Contents |
---|
10 | :depth: 2 |
---|
11 | :backlinks: top |
---|
12 | |
---|
13 | .. note:: |
---|
14 | You must be sure to perform the :ref:`prerequisite steps <kernel-installation-prereq>` before following this page. |
---|
15 | |
---|
16 | For the impatient |
---|
17 | ----------------- |
---|
18 | |
---|
19 | To build the ``zoo_loader.cgi`` CGI program with the default options, cd to the directory |
---|
20 | where you extracted the ZOO Kernel source code package and use the following commands: |
---|
21 | |
---|
22 | :: |
---|
23 | |
---|
24 | $ cd zoo-kernel |
---|
25 | $ autoconf |
---|
26 | $ ./configure |
---|
27 | $ make |
---|
28 | |
---|
29 | Unless something went wrong, you should have executables in the current directory for the ``zoo_loader.cgi`` |
---|
30 | CGI program. You can copy the ``zoo_loader.cgi`` program and the ``main.cfg`` file to your HTTP server's CGI |
---|
31 | directory and start using it. |
---|
32 | |
---|
33 | At this step your ZOO-Kernel should work. Nevertheless, don't forget to correct the main.cfg settings |
---|
34 | to set ``tmpPath`` and ``tmpUrl`` to fit your web server configuration. |
---|
35 | |
---|
36 | Configure Options |
---|
37 | ----------------- |
---|
38 | |
---|
39 | Here is the list of available options as returned by *./configure --help*: |
---|
40 | |
---|
41 | :: |
---|
42 | |
---|
43 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] |
---|
44 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) |
---|
45 | --with-gdal-config=FILE specify an alternative gdal-config file |
---|
46 | --with-xml2config=FILE specify an alternative xml2-config file |
---|
47 | --with-mapserver=PATH specify the path for MapServer compiled source tree |
---|
48 | --with-python=PATH To enable python support or specify an alternative |
---|
49 | directory for python installation, disabled by |
---|
50 | default |
---|
51 | --with-pyvers=NUM To use a specific python version |
---|
52 | --with-php=PATH To enable php support or specify an alternative |
---|
53 | directory for php installation, disabled by default |
---|
54 | --with-perl=PATH To enable perl support or specify an alternative |
---|
55 | directory for perl installation, disabled by default |
---|
56 | --with-java=PATH To enable java support, specify a JDK_HOME, |
---|
57 | disabled by default |
---|
58 | --with-js=PATH specify --with-js=path-to-js to enable js support, |
---|
59 | specify --with-js on linux debian like, js support |
---|
60 | is disabled by default |
---|
61 | |
---|
62 | All the options are described in more details below. |
---|
63 | |
---|
64 | (Required) GDAL Support |
---|
65 | *********************** |
---|
66 | |
---|
67 | If your gdal-config program is not found in your PATH then you can use the |
---|
68 | ``--with-gdal-config`` option to specify its location. For instance, let's suppose that your gdal-config |
---|
69 | was installed in /usr/local/bin and this directory is not in your PATH, then you can use |
---|
70 | the following command: |
---|
71 | |
---|
72 | :: |
---|
73 | |
---|
74 | $ ./configure --with-gdal-config=/usr/local/bin/gdal-config |
---|
75 | |
---|
76 | (Required) XML2 Support |
---|
77 | *********************** |
---|
78 | |
---|
79 | If your xml2-config program is not found in your PATH then you can use the |
---|
80 | ``--with-xml2config`` option to specify its location. For instance, let's suppose that |
---|
81 | your xml2-config was installed in /usr/local/bin and this directory is not in your PATH, |
---|
82 | then you can use the following command: |
---|
83 | |
---|
84 | :: |
---|
85 | |
---|
86 | $ ./configure --with-xml2config=/usr/local/bin/xml2-config |
---|
87 | |
---|
88 | (Optional) MapServer Support |
---|
89 | ***************************** |
---|
90 | |
---|
91 | If you want to activate the WMS, WFS and WCS outputs using MapServer then you will have |
---|
92 | to use the ``--with-mapserver`` option. You have to set the path to your ``mapserver-config`` |
---|
93 | locate in the source code of MapServer as following command: |
---|
94 | |
---|
95 | :: |
---|
96 | |
---|
97 | $ ./configure --with-mapserver=/path/to/your/mapserver_config/ |
---|
98 | |
---|
99 | (Optional) Python Support |
---|
100 | ************************* |
---|
101 | |
---|
102 | If you want to activate Python support for the ZOO Kernel then you will have to use the |
---|
103 | ``--with-python`` option. If your python-config program is found in your PATH then you |
---|
104 | don't have to specify the path where Python was installed, such as: |
---|
105 | |
---|
106 | :: |
---|
107 | |
---|
108 | $ ./configure --with-python |
---|
109 | |
---|
110 | This assumes that python-config is found in your PATH. |
---|
111 | |
---|
112 | In the case that your python-config is not found in your PATH, then you can specify the Python |
---|
113 | installation directory you are using. For instance, let's suppose that you installed |
---|
114 | Python in /usr/local, then you can use the following command: |
---|
115 | |
---|
116 | :: |
---|
117 | |
---|
118 | $ ./configure --with-python=/usr/local |
---|
119 | |
---|
120 | This assumes that /usr/local/bin/python-config exists. |
---|
121 | |
---|
122 | (Optional) Python Version |
---|
123 | ************************* |
---|
124 | |
---|
125 | If you want use a specific version of Python you will have to use the ``--with-pyvers`` |
---|
126 | option. You can specify a Python version as: |
---|
127 | |
---|
128 | :: |
---|
129 | |
---|
130 | $ ./configure --with-pyvers=2.6 |
---|
131 | |
---|
132 | |
---|
133 | (Optional) PHP Support |
---|
134 | ********************** |
---|
135 | |
---|
136 | To be able to activate PHP support for the ZOO Kernel you'll need to get a local PHP Embedded |
---|
137 | installation; for more information about the required configure options when compiling PHP you |
---|
138 | can refer to this page : |
---|
139 | |
---|
140 | http://zoo-project.org/trac/wiki/ZooKernel/Embed/PHP |
---|
141 | |
---|
142 | If you want to activate the PHP support for the ZOO Kernel then you will have to use the |
---|
143 | ``--with-php`` option. If your php-config program is found in your PATH then you don't have |
---|
144 | to specify the path where PHP was installed, then you can use the following commnd: |
---|
145 | |
---|
146 | :: |
---|
147 | |
---|
148 | $ ./configure --with-php |
---|
149 | |
---|
150 | This assumes that php-config is found in your PATH. |
---|
151 | |
---|
152 | In the case that your php-config is not found in your PATH, then you can specify the PHP installation |
---|
153 | directory you are using. For instance, let's suppose that you installed PHP in /usr/local, |
---|
154 | then you can use the following command: |
---|
155 | |
---|
156 | :: |
---|
157 | |
---|
158 | $ ./configure --with-php=/usr/local |
---|
159 | |
---|
160 | This assumes that /usr/local/bin/php-config exists. |
---|
161 | |
---|
162 | (Optional) Perl Support |
---|
163 | *********************** |
---|
164 | |
---|
165 | If you want to activate Perl support for the ZOO Kernel then you will have to use the |
---|
166 | ``--with-perl`` option. If you do not set any value to this option, then the perl program will |
---|
167 | be searched in your PATH. So in such a case, you can use the following command: |
---|
168 | |
---|
169 | :: |
---|
170 | |
---|
171 | $ ./configure --with-perl |
---|
172 | |
---|
173 | This assumes that perl is found in your PATH. |
---|
174 | |
---|
175 | In the other case, for custom Perl installations, you can set the installation directory. For instance, |
---|
176 | let's suppose that you installed Perl in /usr/local and /usr/local/bin is not in your PATH, |
---|
177 | then you can use the following command: |
---|
178 | |
---|
179 | :: |
---|
180 | |
---|
181 | $ ./configure --with-perl=/usr/local |
---|
182 | |
---|
183 | This assumes that /usr/local/bin/perl exists. |
---|
184 | |
---|
185 | (Optional) Java Support |
---|
186 | *********************** |
---|
187 | |
---|
188 | If you want to activate Java support for the ZOO Kernel then you will have to use the |
---|
189 | ``--with-java`` option and set the installation path of your Java SDK. For instance, |
---|
190 | let's suppose that your Java SDK was installed in the /usr/lib/jvm/java-6-sun-1.6.0.22/ directory, |
---|
191 | then you can use the following command: |
---|
192 | |
---|
193 | :: |
---|
194 | |
---|
195 | $ ./configure --with-java=/usr/lib/jvm/java-6-sun-1.6.0.22/ |
---|
196 | |
---|
197 | This assumes that the include/linux and jre/lib/i386/client/ subdirectories exist in |
---|
198 | /usr/lib/jvm/java-6-sun-1.6.0.22/, include/linux contains the jni.h headers file and |
---|
199 | jre/lib/i386/client/ contains the libjvm.so file. |
---|
200 | |
---|
201 | .. note:: |
---|
202 | With Mac OS X you only have to set ``macos`` as the value for the ``--with-java`` option |
---|
203 | to activate Java support. For example: |
---|
204 | |
---|
205 | :: |
---|
206 | |
---|
207 | $ ./configure --with-java=macos |
---|
208 | |
---|
209 | (Optional) JavaScript Support |
---|
210 | ***************************** |
---|
211 | |
---|
212 | If you want to activate JavaScript support for the ZOO Kernel then you will have to use |
---|
213 | the ``--with-js`` option. If you are using a "Debian-like" GNU/Linux distribution then |
---|
214 | dpkg will be used to detect if the required packages are installed and you don't have to |
---|
215 | specify anything here, so you can use the following command: |
---|
216 | |
---|
217 | :: |
---|
218 | |
---|
219 | $ ./configure --with-js |
---|
220 | |
---|
221 | This assumes that js_api.h and libmozjs.so are found in default directories. |
---|
222 | |
---|
223 | If you have a custom installation of SpiderMonkey or you are not using a Debian packaging |
---|
224 | system, then you'll have to specify the directory where you installed it. For |
---|
225 | instance, let's suppose that you installed your SpiderMonkey in /usr, then you'll |
---|
226 | have to use the following command: |
---|
227 | |
---|
228 | :: |
---|
229 | |
---|
230 | $ ./configure --with-js=/usr |
---|
231 | |
---|
232 | This assumes that the /usr/include/js exists and contains the js_api.h headers file and |
---|
233 | /usr/lib contains libmozjs.so file. |
---|