1 | .. _kernel-installation-unix: |
---|
2 | |
---|
3 | Unix |
---|
4 | ==== |
---|
5 | |
---|
6 | :Authors: Nicolas Bozon, Gérald Fenoy, Jeff McKenna |
---|
7 | :Last Updated: $Date: 2011-08-11 17:07:38 +0000 (Thu, 11 Aug 2011) $ |
---|
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-gdal-config=FILE specify an alternative gdal-config file |
---|
44 | --with-xml2config=FILE specify an alternative xml2-config file |
---|
45 | --with-python=PATH To enable python support or specify an alternative |
---|
46 | directory for python installation, disabled by |
---|
47 | default |
---|
48 | --with-php=PATH To enable php support or specify an alternative |
---|
49 | directory for php installation, disabled by default |
---|
50 | --with-perl=PATH To enable perl support or specify an alternative |
---|
51 | directory for perl installation, disabled by default |
---|
52 | --with-java=PATH To enable java support, specify a JDK_HOME, |
---|
53 | disabled by default |
---|
54 | --with-js=PATH specify --with-js=path-to-js to enable js support, |
---|
55 | specify --with-js on linux debian like, js support |
---|
56 | is disabled by default |
---|
57 | |
---|
58 | All the options are described in more details below. |
---|
59 | |
---|
60 | (Required) GDAL Support |
---|
61 | *********************** |
---|
62 | |
---|
63 | If your gdal-config program is not found in your PATH then you can use the |
---|
64 | ``--with-gdal-config`` option to specify its location. For instance, let's suppose that your gdal-config |
---|
65 | was installed in /usr/local/bin and this directory is not in your PATH, then you can use |
---|
66 | the following command: |
---|
67 | |
---|
68 | :: |
---|
69 | |
---|
70 | $ ./configure --with-gdal-config=/usr/local/bin/gdal-config |
---|
71 | |
---|
72 | (Required) XML2 Support |
---|
73 | *********************** |
---|
74 | |
---|
75 | If your xml2-config program is not found in your PATH then you can use the |
---|
76 | ``--with-xml2config`` option to specify its location. For instance, let's suppose that |
---|
77 | your xml2-config was installed in /usr/local/bin and this directory is not in your PATH, |
---|
78 | then you can use the following command: |
---|
79 | |
---|
80 | :: |
---|
81 | |
---|
82 | $ ./configure --with-xml2config=/usr/local/bin/xml2-config |
---|
83 | |
---|
84 | (Optional) Python Support |
---|
85 | ************************* |
---|
86 | |
---|
87 | If you want to activate Python support for the ZOO Kernel then you will have to use the |
---|
88 | ``--with-python`` option. If your python-config program is found in your PATH then you |
---|
89 | don't have to specify the path where Python was installed, such as: |
---|
90 | |
---|
91 | :: |
---|
92 | |
---|
93 | $ ./configure --with-python |
---|
94 | |
---|
95 | This assumes that python-config is found in your PATH. |
---|
96 | |
---|
97 | In the case that your python-config is not found in your PATH, then you can specify the Python |
---|
98 | installation directory you are using. For instance, let's suppose that you installed |
---|
99 | Python in /usr/local, then you can use the following command: |
---|
100 | |
---|
101 | :: |
---|
102 | |
---|
103 | $ ./configure --with-python=/usr/local |
---|
104 | |
---|
105 | This assumes that /usr/local/bin/python-config exists. |
---|
106 | |
---|
107 | (Optional) PHP Support |
---|
108 | ********************** |
---|
109 | |
---|
110 | To be able to activate PHP support for the ZOO Kernel you'll need to get a local PHP Embedded |
---|
111 | installation; for more information about the required configure options when compiling PHP you |
---|
112 | can refer to this page : |
---|
113 | |
---|
114 | http://zoo-project.org/trac/wiki/ZooKernel/Embed/PHP |
---|
115 | |
---|
116 | If you want to activate the PHP support for the ZOO Kernel then you will have to use the |
---|
117 | ``--with-php`` option. If your php-config program is found in your PATH then you don't have |
---|
118 | to specify the path where PHP was installed, then you can use the following commnd: |
---|
119 | |
---|
120 | :: |
---|
121 | |
---|
122 | $ ./configure --with-php |
---|
123 | |
---|
124 | This assumes that php-config is found in your PATH. |
---|
125 | |
---|
126 | In the case that your php-config is not found in your PATH, then you can specify the PHP installation |
---|
127 | directory you are using. For instance, let's suppose that you installed PHP in /usr/local, |
---|
128 | then you can use the following command: |
---|
129 | |
---|
130 | :: |
---|
131 | |
---|
132 | $ ./configure --with-php=/usr/local |
---|
133 | |
---|
134 | This assumes that /usr/local/bin/php-config exists. |
---|
135 | |
---|
136 | (Optional) Perl Support |
---|
137 | *********************** |
---|
138 | |
---|
139 | If you want to activate Perl support for the ZOO Kernel then you will have to use the |
---|
140 | ``--with-perl`` option. If you do not set any value to this option, then the perl program will |
---|
141 | be searched in your PATH. So in such a case, you can use the following command: |
---|
142 | |
---|
143 | :: |
---|
144 | |
---|
145 | $ ./configure --with-perl |
---|
146 | |
---|
147 | This assumes that perl is found in your PATH. |
---|
148 | |
---|
149 | In the other case, for custom Perl installations, you can set the installation directory. For instance, |
---|
150 | let's suppose that you installed Perl in /usr/local and /usr/local/bin is not in your PATH, |
---|
151 | then you can use the following command: |
---|
152 | |
---|
153 | :: |
---|
154 | |
---|
155 | $ ./configure --with-perl=/usr/local |
---|
156 | |
---|
157 | This assumes that /usr/local/bin/perl exists. |
---|
158 | |
---|
159 | (Optional) Java Support |
---|
160 | *********************** |
---|
161 | |
---|
162 | If you want to activate Java support for the ZOO Kernel then you will have to use the |
---|
163 | ``--with-java`` option and set the installation path of your Java SDK. For instance, |
---|
164 | let's suppose that your Java SDK was installed in the /usr/lib/jvm/java-6-sun-1.6.0.22/ directory, |
---|
165 | then you can use the following command: |
---|
166 | |
---|
167 | :: |
---|
168 | |
---|
169 | $ ./configure --with-java=/usr/lib/jvm/java-6-sun-1.6.0.22/ |
---|
170 | |
---|
171 | This assumes that the include/linux and jre/lib/i386/client/ subdirectories exist in |
---|
172 | /usr/lib/jvm/java-6-sun-1.6.0.22/, include/linux contains the jni.h headers file and |
---|
173 | jre/lib/i386/client/ contains the libjvm.so file. |
---|
174 | |
---|
175 | .. note:: |
---|
176 | With Mac OS X you only have to set ``macos`` as the value for the ``--with-java`` option |
---|
177 | to activate Java support. For example: |
---|
178 | |
---|
179 | :: |
---|
180 | |
---|
181 | $ ./configure --with-java=macos |
---|
182 | |
---|
183 | (Optional) JavaScript Support |
---|
184 | ***************************** |
---|
185 | |
---|
186 | If you want to activate JavaScript support for the ZOO Kernel then you will have to use |
---|
187 | the ``--with-js`` option. If you are using a "Debian-like" GNU/Linux distribution then |
---|
188 | dpkg will be used to detect if the required packages are installed and you don't have to |
---|
189 | specify anything here, so you can use the following command: |
---|
190 | |
---|
191 | :: |
---|
192 | |
---|
193 | $ ./configure --with-js |
---|
194 | |
---|
195 | This assumes that js_api.h and libmozjs.so are found in default directories. |
---|
196 | |
---|
197 | If you have a custom installation of SpiderMonkey or you are not using a Debian packaging |
---|
198 | system, then you'll have to specify the directory where you installed it. For |
---|
199 | instance, let's suppose that you installed your SpiderMonkey in /usr, then you'll |
---|
200 | have to use the following command: |
---|
201 | |
---|
202 | :: |
---|
203 | |
---|
204 | $ ./configure --with-js=/usr |
---|
205 | |
---|
206 | This assumes that the /usr/include/js exists and contains the js_api.h headers file and |
---|
207 | /usr/lib contains libmozjs.so file. |
---|