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