Added links
[idzebra-moved-to-github.git] / doc / installation.xml
1 <!-- $Id: installation.xml,v 1.10 2003-03-06 13:16:02 adam Exp $ -->
2  <chapter id="installation">
3   <title>Installation</title>
4   <para>
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.
7   </para>
8
9   <para>
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.netbsd.org/Ports/cobalt/">NetBSD (Cobalt)</ulink>,
15    <ulink url="http://www.freebsd.org/">FreeBSD (i386)</ulink>,
16    <ulink url="http://www.apple.com/macosx/">MAC OSX</ulink>,
17    <ulink url="http://wwws.sun.com/software/solaris/">SunOS 5.8 (sparc)</ulink>,
18    <ulink url="http://www.microsoft.com/windows2000/">Windows 2000 SP3</ulink>.
19   </para>
20   
21   <para>
22    Zebra can be configured to use the following utilities (most of
23    which are optional):
24
25    <variablelist>
26     <varlistentry>
27      <term><ulink url="http://www.indexdata.dk/yaz/">yaz</ulink> (required)</term>
28      <listitem>
29       <para>
30        Zebra uses YAZ to support Z39.50/SRW. Also the memory management
31        utilites from YAZ is used by Zebra.
32       </para>
33      </listitem>
34     </varlistentry>
35     <varlistentry>
36      <term><ulink url="http://www.gnu.org/software/libiconv/">iconv</ulink>
37       (optional)</term>
38      <listitem>
39       <para>
40        Character set conversion. This is required if you're
41        going to use any other character set than UTF-8 and ISO-8859-1
42        for records. Note that some Unixes has iconv built-in.
43       </para>
44      </listitem>
45     </varlistentry>
46     <varlistentry>
47      <term><ulink url="http://expat.sourceforge.net/">Expat</ulink>
48       (optional)</term>
49      <listitem>
50       <para>
51        XML parser. If you're going to index real XML you should
52        install this (filter grs.xml). On most systems you should be able
53        to find binary Expat packages.
54       </para>
55      </listitem>
56     </varlistentry>
57     
58     <varlistentry>
59      <term><ulink url="http://www.perl.com/">Perl</ulink> (optional)</term>
60      <listitem>
61       <para>
62        Perl is required if you're going to use the Zebra perl
63        filter facility or the Zebra perl API. Perl is preinstalled
64        on many Unixes. We've not tried the Perl extension on 
65        Windows ourselves.
66       </para>
67      </listitem>
68     </varlistentry>
69     
70     <varlistentry>
71      <term><ulink url="http://www.tcl.tk/">Tcl</ulink> (optional)</term>
72      <listitem>
73       <para>
74        Tcl is required if you  need to use the Tcl record filter
75        for Zebra. You can find binary packages for Tcl for many
76        Unices and Windows.
77       </para>
78      </listitem>
79     </varlistentry>
80     
81     <varlistentry>
82      <term>
83       <ulink url="http://www.gnu.org/software/autoconf/">Autoconf</ulink>,
84       <ulink url="http://www.gnu.org/software/automake/">Automake</ulink>
85       (optional)</term>
86      <listitem>
87       <para>
88        GNU Automake and Autoconf are only required if you're
89        using the CVS version of Zebra. You do not need these
90        if you have fetched a Zebra tar.
91       </para>
92      </listitem>
93     </varlistentry>
94     
95     <varlistentry>
96      <term><ulink url="http://docbook.org/">Docbook</ulink>
97       and friends (optional)</term>
98      <listitem>
99       <para>
100        These tools are only required if you're writing
101        documentation for Zebra. You need the following
102        Debian packages: jadetex, docbook, docbook-dsssl,
103        docbook-xml, docbook-utils.
104       </para>
105      </listitem>
106     </varlistentry>
107    </variablelist>
108   </para>
109
110   <sect1 id="installation.unix"><title>UNIX</title>
111    <para>
112     On Unix, <literal>gcc</literal> works fine, but any native
113     C compiler should be possible to use as long as it is 
114     ANSI C compliant.
115    </para>
116    
117    <para>
118     Unpack the distribution archive. The <literal>configure</literal>
119     shell script attempts to guess correct values for various
120     system-dependent variables used during compilation.
121     It uses those values to create a <literal>Makefile</literal> in each
122     directory of Zebra.
123    </para>
124    
125    <para>
126     To run the configure script type:
127     
128     <screen>
129      ./configure
130     </screen>
131     
132    </para>
133    
134    <para>
135     The configure script attempts to use C compiler specified by
136     the <literal>CC</literal> environment variable.
137     If this is not set, <literal>cc</literal> or GNU C will be used.
138     The <literal>CFLAGS</literal> environment variable holds
139     options to be passed to the C compiler. If you're using a
140     Bourne-shell compatible shell you may pass something like this:
141     
142     <screen>
143      CC=/opt/ccs/bin/cc CFLAGS=-O ./configure
144     </screen>
145    </para>
146    <para>
147     The configure script support various options: you can see what they
148     are with
149     <screen>
150      ./configure --help
151     </screen>
152    </para>
153    
154    <para>
155     Once the build environment is configured, build the software by
156     typing:
157     <screen>
158      make
159     </screen>
160    </para>
161    
162    <para>
163     If the build is successful, two executables are created in the
164     sub-directory <literal>index</literal>:
165     <variablelist>
166      
167      <varlistentry>
168       <term><literal>zebrasrv</literal></term>
169       <listitem>
170        <para>
171         The Z39.50 server and search engine.
172        </para>
173       </listitem>
174      </varlistentry>
175      <varlistentry>
176      <term><literal>zebraidx</literal></term>
177       <listitem>
178        <para>
179         The administrative indexing tool.
180        </para>
181       </listitem>
182      </varlistentry>
183     </variablelist>
184    </para>
185    
186    <para>
187     You can now use Zebra. If you wish to install it system-wide, then
188     as root type
189     <screen>
190      make install
191     </screen>
192     By default this will install the Zebra executables in 
193     <filename>/usr/local/bin</filename>,
194     and the standard configuration files in 
195     <filename>/usr/local/share/idzebra</filename>
196     You can override this with the <literal>--prefix</literal> option
197     to configure.
198    </para>
199   </sect1>
200   <sect1 id="installation.win32"><title>WIN32</title>
201    <para>
202     [to be written]
203    </para>
204   </sect1>
205  </chapter>
206  <!-- Keep this comment at the end of the file
207  Local variables:
208  mode: sgml
209  sgml-omittag:t
210  sgml-shorttag:t
211  sgml-minimize-attributes:nil
212  sgml-always-quote-attributes:t
213  sgml-indent-step:1
214  sgml-indent-data:t
215  sgml-parent-document: "zebra.xml"
216  sgml-local-catalogs: nil
217  sgml-namecase-general:t
218  End:
219  -->