1 <!-- $Id: installation.xml,v 1.12 2003-03-31 20:48:12 adam Exp $ -->
2 <chapter id="installation">
3 <title>Installation</title>
5 Zebra is written in ANSI C and was implemented with portability in mind.
6 We primarily use GCC on UNIX and Microsoft Visual C++ on Windows.
10 The software is regularly tested on
11 <ulink url="http://www.debian.org/">Debian GNU/Linux</ulink>,
12 <ulink url="http://www.redhat.com/">Redhat Linux</ulink>,
13 <ulink url="http://www.gentoo.org/">Gentoo Linux</ulink>,
14 <ulink url="http://www.suse.com/">SuSE Linux</ulink>,
15 <ulink url="http://www.netbsd.org/Ports/cobalt/">NetBSD (Cobalt)</ulink>,
16 <ulink url="http://www.freebsd.org/">FreeBSD (i386)</ulink>,
17 <ulink url="http://www.apple.com/macosx/">MAC OSX</ulink>,
18 <ulink url="http://wwws.sun.com/software/solaris/">SunOS 5.8 (sparc)</ulink>,
19 <ulink url="http://www.microsoft.com/windows2000/">Windows 2000 SP3</ulink>.
23 Zebra can be configured to use the following utilities (most of
28 <term><ulink url="http://www.indexdata.dk/yaz/">yaz</ulink>
32 Zebra uses YAZ to support Z39.50/SRW. Also the memory management
33 utilites from YAZ is used by Zebra.
38 <term><ulink url="http://www.gnu.org/software/libiconv/">iconv</ulink>
42 Character set conversion. This is required if you're
43 going to use any other character set than UTF-8 and ISO-8859-1
44 for records. Note that some Unixes has iconv built-in.
49 <term><ulink url="http://expat.sourceforge.net/">Expat</ulink>
53 XML parser. If you're going to index real XML you should
54 install this (filter grs.xml). On most systems you should be able
55 to find binary Expat packages.
61 <term><ulink url="http://www.perl.com/">Perl</ulink> (optional)</term>
64 Perl is required if you're going to use the Zebra perl
65 filter facility or the Zebra perl API. Perl is preinstalled
66 on many Unixes. We've not tried the Perl extension on
73 <term><ulink url="http://www.tcl.tk/">Tcl</ulink> (optional)</term>
76 Tcl is required if you need to use the Tcl record filter
77 for Zebra. You can find binary packages for Tcl for many
85 <ulink url="http://www.gnu.org/software/autoconf/">Autoconf</ulink>,
86 <ulink url="http://www.gnu.org/software/automake/">Automake</ulink>
90 GNU Automake and Autoconf are only required if you're
91 using the CVS version of Zebra. You do not need these
92 if you have fetched a Zebra tar.
98 <term><ulink url="http://docbook.org/">Docbook</ulink>
99 and friends (optional)</term>
102 These tools are only required if you're writing
103 documentation for Zebra. You need the following
104 Debian packages: jadetex, docbook, docbook-dsssl,
105 docbook-xml, docbook-utils.
112 <sect1 id="installation.unix"><title>UNIX</title>
114 On Unix, <literal>gcc</literal> works fine, but any native
115 C compiler should be possible to use as long as it is
120 Unpack the distribution archive. The <literal>configure</literal>
121 shell script attempts to guess correct values for various
122 system-dependent variables used during compilation.
123 It uses those values to create a <literal>Makefile</literal> in each
128 To run the configure script type:
137 The configure script attempts to use C compiler specified by
138 the <literal>CC</literal> environment variable.
139 If this is not set, <literal>cc</literal> or GNU C will be used.
140 The <literal>CFLAGS</literal> environment variable holds
141 options to be passed to the C compiler. If you're using a
142 Bourne-shell compatible shell you may pass something like this:
145 CC=/opt/ccs/bin/cc CFLAGS=-O ./configure
149 The configure script support various options: you can see what they
157 Once the build environment is configured, build the software by
165 If the build is successful, two executables are created in the
166 sub-directory <literal>index</literal>:
170 <term><literal>zebrasrv</literal></term>
173 The Z39.50 server and search engine.
178 <term><literal>zebraidx</literal></term>
181 The administrative indexing tool.
189 You can now use Zebra. If you wish to install it system-wide, then
194 By default this will install the Zebra executables in
195 <filename>/usr/local/bin</filename>,
196 and the standard configuration files in
197 <filename>/usr/local/share/idzebra</filename>
198 You can override this with the <literal>--prefix</literal> option
202 <sect1 id="installation.win32"><title>WIN32</title>
203 <para>The easiest way to install Zebra on Windows is by downloading
205 <ulink url="http://ftp.indexdata.dk/pub/zebra/win32/">here</ulink>.
206 The installer comes with source too - in case you wish to
207 compile Zebra with different Compiler options.
211 Zebra is shipped with "makefiles" for the NMAKE tool that comes
212 with <ulink url="http://msdn.microsoft.com/vstudio/">
213 Microsoft Visual C++</ulink>.
214 Version 6 has been tested. We expect that zebra compiles
215 with version 5 as well.
218 Start a command prompt and switch the sub directory
219 <filename>WIN</filename> where the file <filename>makefile</filename>
220 is located. Customize the installation by editing the
221 <filename>makefile</filename> file (for example by using notepad).
223 The following summarizes the most important settings in that file:
226 <varlistentry><term><literal>DEBUG</literal></term>
228 If set to 1, the software is
229 compiled with debugging libraries (code generation is
230 multi-threaded debug DLL).
231 If set to 0, the software is compiled with release libraries
232 (code generation is multi-threaded DLL).
237 <term><literal>YAZDIR</literal></term>
239 Directory of YAZ source. Zebra's makefile expects to find
240 <filename>yaz.lib</filename>, <filename>yaz.dll</filename>
241 in <replaceable>yazdir</replaceable><literal>/lib</literal> and
242 <replaceable>yazdir</replaceable><literal>/bin</literal> respectively.
248 <term><literal>HAVE_EXPAT</literal>,
249 <literal>EXPAT_DIR</literal></term>
251 If <literal>HAVE_EXPAT</literal> is set to 1, Zebra is compiled
252 with Expat support. In this configuration, set
253 <literal>ZEBRA_DIR</literal> to the Expat source directory.
258 <term><literal>HAVE_ICONV</literal>,
259 <literal>ICONV_DIR</literal></term>
261 If <literal>HAVE_ICONV</literal> is set to 1, Zebra is compiled
262 with iconv support. In this configuration, set
263 <literal>ICONV_DIR</literal> to the iconv source directory.
265 iconv binaries can be downloaded from
266 <ulink url="http://www.zlatkovic.com/projects/libxml/binaries.html">
273 <term><literal>BZIP2INCLUDE</literal>,
274 <literal>BZIP2LIB</literal>,
275 <literal>BZIP2DEF</literal>
278 Define these symbols if Zebra is to be compiled with
279 BZIP2 record compression support.
287 The <literal>DEBUG</literal> setting in the makefile for Zebra must
288 be set to the same value as <literal>DEBUG</literal> setting in the
290 If not, the Zebra server/indexer will crash.
294 When satisfied with the settings in the makefile, type
301 If the <filename>nmake</filename> command is not found on your system
302 you probably haven't defined the environment variables required to
303 use that tool. To fix that, find and run the batch file
304 <filename>vcvars32.bat</filename>. You need to run it from within
305 the command prompt or set the environment variables "globally";
306 otherwise it doesn't work.
310 If you wish to recompile Zebra - for example if you modify
311 settings in the <filename>makefile</filename> you can delete
312 object files, etc by running.
318 The following files are generated upon successful compilation:
321 <varlistentry><term><filename>bin/zebraidx.exe</filename></term>
324 </para></listitem></varlistentry>
326 <varlistentry><term><filename>bin/zebrasrv.exe</filename></term>
329 </para></listitem></varlistentry>
336 <!-- Keep this comment at the end of the file
341 sgml-minimize-attributes:nil
342 sgml-always-quote-attributes:t
345 sgml-parent-document: "zebra.xml"
346 sgml-local-catalogs: nil
347 sgml-namecase-general:t