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