1 <!-- $Id: installation.xml,v 1.13 2003-03-31 20:57:29 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 <ulink url="http://gcc.gnu.org/">GCC</ulink> on UNIX and
7 <ulink url="http://msdn.microsoft.com/vstudio/">
8 Microsoft Visual C++</ulink>
13 The software is regularly tested on
14 <ulink url="http://www.debian.org/">Debian GNU/Linux</ulink>,
15 <ulink url="http://www.redhat.com/">Redhat Linux</ulink>,
16 <ulink url="http://www.gentoo.org/">Gentoo Linux</ulink>,
17 <ulink url="http://www.suse.com/">SuSE Linux</ulink>,
18 <ulink url="http://www.netbsd.org/Ports/cobalt/">NetBSD (Cobalt)</ulink>,
19 <ulink url="http://www.freebsd.org/">FreeBSD (i386)</ulink>,
20 <ulink url="http://www.apple.com/macosx/">MAC OSX</ulink>,
21 <ulink url="http://wwws.sun.com/software/solaris/">SunOS 5.8
23 <ulink url="http://www.microsoft.com/windows2000/">Windows 2000 SP3</ulink>.
27 Zebra can be configured to use the following utilities (most of
32 <term><ulink url="http://www.indexdata.dk/yaz/">yaz</ulink>
36 Zebra uses YAZ to support Z39.50/SRW. Also the memory management
37 utilites from YAZ is used by Zebra.
42 <term><ulink url="http://www.gnu.org/software/libiconv/">iconv</ulink>
46 Character set conversion. This is required if you're
47 going to use any other character set than UTF-8 and ISO-8859-1
48 for records. Note that some Unixes has iconv built-in.
53 <term><ulink url="http://expat.sourceforge.net/">Expat</ulink>
57 XML parser. If you're going to index real XML you should
58 install this (filter grs.xml). On most systems you should be able
59 to find binary Expat packages.
65 <term><ulink url="http://www.perl.com/">Perl</ulink> (optional)</term>
68 Perl is required if you're going to use the Zebra perl
69 filter facility or the Zebra perl API. Perl is preinstalled
70 on many Unixes. We've not tried the Perl extension on
77 <term><ulink url="http://www.tcl.tk/">Tcl</ulink> (optional)</term>
80 Tcl is required if you need to use the Tcl record filter
81 for Zebra. You can find binary packages for Tcl for many
89 <ulink url="http://www.gnu.org/software/autoconf/">Autoconf</ulink>,
90 <ulink url="http://www.gnu.org/software/automake/">Automake</ulink>
94 GNU Automake and Autoconf are only required if you're
95 using the CVS version of Zebra. You do not need these
96 if you have fetched a Zebra tar.
102 <term><ulink url="http://docbook.org/">Docbook</ulink>
103 and friends (optional)</term>
106 These tools are only required if you're writing
107 documentation for Zebra. You need the following
108 Debian packages: jadetex, docbook, docbook-dsssl,
109 docbook-xml, docbook-utils.
116 <sect1 id="installation.unix"><title>UNIX</title>
118 On Unix, <literal>gcc</literal> works fine, but any native
119 C compiler should be possible to use as long as it is
124 Unpack the distribution archive. The <literal>configure</literal>
125 shell script attempts to guess correct values for various
126 system-dependent variables used during compilation.
127 It uses those values to create a <literal>Makefile</literal> in each
132 To run the configure script type:
141 The configure script attempts to use C compiler specified by
142 the <literal>CC</literal> environment variable.
143 If this is not set, <literal>cc</literal> or GNU C will be used.
144 The <literal>CFLAGS</literal> environment variable holds
145 options to be passed to the C compiler. If you're using a
146 Bourne-shell compatible shell you may pass something like this:
149 CC=/opt/ccs/bin/cc CFLAGS=-O ./configure
153 The configure script support various options: you can see what they
161 Once the build environment is configured, build the software by
169 If the build is successful, two executables are created in the
170 sub-directory <literal>index</literal>:
174 <term><literal>zebrasrv</literal></term>
177 The Z39.50 server and search engine.
182 <term><literal>zebraidx</literal></term>
185 The administrative indexing tool.
193 You can now use Zebra. If you wish to install it system-wide, then
198 By default this will install the Zebra executables in
199 <filename>/usr/local/bin</filename>,
200 and the standard configuration files in
201 <filename>/usr/local/share/idzebra</filename>
202 You can override this with the <literal>--prefix</literal> option
206 <sect1 id="installation.win32"><title>WIN32</title>
207 <para>The easiest way to install Zebra on Windows is by downloading
209 <ulink url="http://ftp.indexdata.dk/pub/zebra/win32/">here</ulink>.
210 The installer comes with source too - in case you wish to
211 compile Zebra with different Compiler options.
215 Zebra is shipped with "makefiles" for the NMAKE tool that comes
216 with <ulink url="http://msdn.microsoft.com/vstudio/">
217 Microsoft Visual C++</ulink>.
218 Version 6 has been tested. We expect that zebra compiles
219 with version 5 as well.
222 Start a command prompt and switch the sub directory
223 <filename>WIN</filename> where the file <filename>makefile</filename>
224 is located. Customize the installation by editing the
225 <filename>makefile</filename> file (for example by using notepad).
227 The following summarizes the most important settings in that file:
230 <varlistentry><term><literal>DEBUG</literal></term>
232 If set to 1, the software is
233 compiled with debugging libraries (code generation is
234 multi-threaded debug DLL).
235 If set to 0, the software is compiled with release libraries
236 (code generation is multi-threaded DLL).
241 <term><literal>YAZDIR</literal></term>
243 Directory of YAZ source. Zebra's makefile expects to find
244 <filename>yaz.lib</filename>, <filename>yaz.dll</filename>
245 in <replaceable>yazdir</replaceable><literal>/lib</literal> and
246 <replaceable>yazdir</replaceable><literal>/bin</literal> respectively.
252 <term><literal>HAVE_EXPAT</literal>,
253 <literal>EXPAT_DIR</literal></term>
255 If <literal>HAVE_EXPAT</literal> is set to 1, Zebra is compiled
256 with Expat support. In this configuration, set
257 <literal>ZEBRA_DIR</literal> to the Expat source directory.
262 <term><literal>HAVE_ICONV</literal>,
263 <literal>ICONV_DIR</literal></term>
265 If <literal>HAVE_ICONV</literal> is set to 1, Zebra is compiled
266 with iconv support. In this configuration, set
267 <literal>ICONV_DIR</literal> to the iconv source directory.
269 iconv binaries can be downloaded from
270 <ulink url="http://www.zlatkovic.com/projects/libxml/binaries.html">
277 <term><literal>BZIP2INCLUDE</literal>,
278 <literal>BZIP2LIB</literal>,
279 <literal>BZIP2DEF</literal>
282 Define these symbols if Zebra is to be compiled with
283 BZIP2 record compression support.
291 The <literal>DEBUG</literal> setting in the makefile for Zebra must
292 be set to the same value as <literal>DEBUG</literal> setting in the
294 If not, the Zebra server/indexer will crash.
298 When satisfied with the settings in the makefile, type
305 If the <filename>nmake</filename> command is not found on your system
306 you probably haven't defined the environment variables required to
307 use that tool. To fix that, find and run the batch file
308 <filename>vcvars32.bat</filename>. You need to run it from within
309 the command prompt or set the environment variables "globally";
310 otherwise it doesn't work.
314 If you wish to recompile Zebra - for example if you modify
315 settings in the <filename>makefile</filename> you can delete
316 object files, etc by running.
322 The following files are generated upon successful compilation:
325 <varlistentry><term><filename>bin/zebraidx.exe</filename></term>
328 </para></listitem></varlistentry>
330 <varlistentry><term><filename>bin/zebrasrv.exe</filename></term>
333 </para></listitem></varlistentry>
340 <!-- Keep this comment at the end of the file
345 sgml-minimize-attributes:nil
346 sgml-always-quote-attributes:t
349 sgml-parent-document: "zebra.xml"
350 sgml-local-catalogs: nil
351 sgml-namecase-general:t