1 <?xml version="1.0" encoding="UTF-8"?>
2 <chapter id="installation">
7 <title>Installation</title>
10 <para>If you have previously used an older version of Netatalk, please
11 read the chapter about <link linkend="upgrade">upgrading</link> first
16 <title>How to obtain Netatalk</title>
18 <para>Please have a look at the netatalk page on sourceforge for the most
19 recent informations on this issue.</para>
22 url="http://sourceforge.net/projects/netatalk/">http://sourceforge.net/projects/netatalk/</ulink></para>
25 <title>Binary packages</title>
27 <para>Binary packages of Netatalk are included in some Linux and UNIX
28 distributions. You might want to have a look at the usual locations,
31 <para>Ubuntu package: <ulink
32 url="https://launchpad.net/ubuntu">https://launchpad.net/ubuntu
35 <para>Debian package: <ulink
36 url="http://packages.debian.org/">http://packages.debian.org/
39 <para>various RPM package: <ulink
40 url="http://rpmfind.net/">http://rpmfind.net/ </ulink></para>
42 <para>Fedora/RHEL package: <ulink
43 url="http://koji.fedoraproject.org/koji/search">http://koji.fedoraproject.org/koji/search
46 <para>Gentoo package: <ulink
47 url="http://packages.gentoo.org/">http://packages.gentoo.org/
50 <para>openSUSE package: <ulink
51 url="http://software.opensuse.org/">http://software.opensuse.org/
54 <para>Solaris package: <ulink
55 url="http://www.blastwave.org/">http://www.opencsw.org/</ulink></para>
57 <para>FreeBSD ports: <ulink
58 url="http://www.freebsd.org/ports/index.html">http://www.freebsd.org/ports/index.html
61 <para>NetBSD pkgsrc: <ulink
62 url="http://pkgsrc.se/search.php">http://pkgsrc.se/search.php
65 <para>OpenBSD ports:<ulink
66 url="http://openports.se/search.php">http://openports.se/search.php
70 <primary>RPM</primary>
72 <secondary>Red Hat Package Manager package</secondary>
73 </indexterm><indexterm>
74 <primary>Deb</primary>
76 <secondary>Debian package</secondary>
77 </indexterm><indexterm>
78 <primary>Ports</primary>
80 <secondary>FreeBSD port</secondary>
85 <title>Source packages</title>
88 <title>Tarballs</title>
90 <para>Prepacked tarballs in .tar.gz and tar.bz2 format are available
91 on the netatalk page on <ulink
92 url="http://netatalk.sourceforge.net/">sourceforge</ulink>.</para>
98 <para>Downloading the Git repository can be done quickly and
103 <para>Make sure you have Git installed. <command>which
104 git</command> should produce a path to git.</para>
106 <screen><prompt>$ </prompt><userinput>which git</userinput>
107 <computeroutput>/usr/bin/git</computeroutput></screen>
111 <para>Now get the source:</para>
113 <screen><prompt>$</prompt> <userinput>git clone -b develop git://git.code.sf.net/p/netatalk/code netatalk-code
114 </userinput><computeroutput>Initialized empty Git repository in /path/to/new/source/dir/netatalk/.git/
115 remote: Counting objects: 2503, done.
117 </computeroutput></screen>
119 <para>This will create a local directory called
120 <filename>netatalk-code</filename> containing a complete and fresh
121 copy of the whole Netatalk source from the Git repository.</para>
125 <para>In order to keep your repository copy updated, occasionally
128 <screen><prompt>$</prompt> <userinput>git pull</userinput></screen>
132 <para>Now <command>cd</command> to the netatalk directory and run
133 <command>./bootstrap</command>. This will create the
134 <filename>configure</filename> script required in the next
137 <screen><prompt>$</prompt> <userinput>./bootstrap</userinput></screen>
141 <para>For futher information refer to this <ulink
142 url="http://netatalk.sourceforge.net/wiki/index.php/Developer_Infos">wiki</ulink>
149 <title>Compiling Netatalk</title>
152 <title>Prerequisites</title>
155 <title>Required third party software</title>
159 <para>Berkeley DB<indexterm>
160 <primary>BDB</primary>
162 <secondary>Berkeley DB</secondary>
165 <para>At the time of writing, the following versions are
170 <para>minimum 4.6.x</para>
174 <para>In case Berkeley DB is not installed on your system, please
175 download it from:</para>
178 url="http://www.oracle.com/technetwork/products/berkeleydb/downloads/index.html">
179 http://www.oracle.com/technetwork/products/berkeleydb/downloads/index.html</ulink></para>
181 <para>and follow the <link linkend="build-bdb">installation
182 instructions</link>.</para>
186 <para>Libgcrypt</para>
188 <para>Required for OS X 10.7 and later. Libgcrypt is needed for
191 <para>Libgcrypt can be downloaded from: <ulink
192 url="http://directory.fsf.org/wiki/Libgcrypt">
193 http://directory.fsf.org/wiki/Libgcrypt</ulink>.</para>
199 <title>Optional third party software</title>
201 <para>Netatalk can use the following third party software to enhance
202 it's functionality.</para>
206 <para>Tracker for Spotlight<indexterm>
207 <primary>Spotlight</primary>
208 </indexterm> support</para>
210 <para>Netatalk uses <ulink
211 url="http://projects.gnome.org/tracker/">Tracker</ulink> as the
212 metadata backend. Recent Linux distributions will provide the
213 libtracker-sparql library which is available since Tracker version
214 0.7. This version is referred to as Tracker SPARQL.</para>
216 <para>Other system like FreeBSD, Solaris and systems derived from
217 Solaris will only ship an older Tracker version 0.6 which only
218 offers a much more restrcited feature set. We refer to this
219 version and its featureset by Tracker RDF. Solaris users are
220 advised to install Tracker from OpenCSW as this is at least
221 version 0.15 and thus supports SPARQL.</para>
225 <para>mDNSresponderPOSIX or Avahi for Bonjour (aka
228 <para>Mac OS X 10.2 and later use Bonjour (aka Zeroconf) for
229 service discovery.</para>
231 <para>Avahi must be build with DBUS support (
232 <userinput>--enable-dbus</userinput>).</para>
236 <para>TCP wrappers</para>
238 <para>Wietse Venema's network logger, also known as TCPD or
241 <para>Security options are: access control per host, domain and/or
242 service; detection of host name spoofing or host address spoofing;
243 booby traps to implement an early-warning system.</para>
248 <primary>PAM</primary>
250 <secondary>Pluggable Authentication Modules</secondary>
253 <para>PAM provides a flexible mechanism for authenticating users.
254 PAM was invented by SUN<indexterm>
255 <primary>SUN</primary>
257 <secondary>Sun Microsystems</secondary>
258 </indexterm> Microsystems. Linux-PAM is a suite of shared
259 libraries that enable the local system administrator to choose how
260 applications authenticate users.</para>
266 <para>iconv provides conversion routines for many character
267 encodings. Netatalk uses it to provide charsets it does not have
268 built in conversions for, like ISO-8859-1. On glibc systems,
269 Netatalk can use the glibc provided iconv implementation.
270 Otherwise you can use the GNU libiconv implementation.</para>
276 <sect2 id="compiling-netatalk">
277 <title>Compiling<indexterm>
278 <primary>Compile</primary>
280 <secondary>Compiling Netatalk from Source</secondary>
281 </indexterm> Netatalk</title>
284 <title>Configuring the build</title>
286 <para>To build the binaries, first run the program
287 <command>./configure</command> in the source directory. This should
288 automatically configure Netatalk for your operating system. If you
289 have unusual needs, then you may wish to run</para>
291 <screen>$ <userinput>./configure --help</userinput></screen>
293 <para>to see what special options you can enable.</para>
295 <para>The most used configure options are:</para>
299 <para><option>--with-init-style</option>=redhat-sysv|redhat-systemd|suse-sysv|suse-systemd|gentoo|netbsd|debian|solaris|systemd</para>
301 <para>This option helps netatalk to determine where to install the
302 start scripts.</para>
306 <para><option>--with-bdb</option>=<replaceable>/path/to/bdb/installation/</replaceable></para>
308 <para>In case you installed Berkeley DB in a non-standard
309 location, you will <emphasis>have</emphasis> to give the install
310 location to netatalk, using this switch.</para>
314 <para>Now run configure with any options you need</para>
316 <screen><prompt>$</prompt> <userinput>./configure [arguments]</userinput></screen>
318 <para>Configure will end up in an overview showing the settings the
319 Netatalk Makefiles have been created with.</para>
323 <title>Spotlight<indexterm>
324 <primary>Spotlight</primary>
327 <para>If not already installed, install the following additional
328 packages: tracker and tracker-devel, on Solaris install OpenCSW and
329 Tracker packages from OpenCSW unstable repository.</para>
331 <para>The tracker packages are found via pkg-config, you may have to
332 pass the version suffix as you may have a newer version installed then
333 the default 0.12, eg</para>
335 <screen><prompt>$ </prompt><userinput>pkg-config --list-all | grep tracker
336 </userinput>tracker-extract-0.16 tracker-extract - Tracker : A library to develop metadata extractors for 3rd party file types.
337 tracker-sparql-0.16 tracker-sparql - Tracker : A library to perform SPARQL queries and updates in the Tracker Store
338 tracker-miner-0.16 tracker-miner - A library to develop tracker data miners</screen>
342 <screen><prompt>$ </prompt><userinput>./configure --with-tracker-pkgconfig-version=0.16 ...</userinput></screen>
344 <para>If you're using Solaris and Tracker from OpenCSW, then you need
345 to set the PKG_CONFIG_PATH environment variable, add the
346 --with-tracker-prefix configure option and add LDFLAGS="-R/opt/csw/lib"</para>
348 <screen>PKG_CONFIG_PATH=/opt/csw/lib/pkgconfig LDFLAGS="-R/opt/csw/lib" ./configure --with-tracker-prefix=/opt/csw --with-tracker-pkgconfig-version=0.16 ...</screen>
350 <para>Check the configure output whether the Tracker libs were
353 <screen>checking for TRACKER... yes
354 checking for TRACKER_MINER... yes
359 Spotlight: yes (SPARQL)
364 <title>Compile and install</title>
366 <para>Next, running</para>
368 <screen><prompt>$</prompt> <userinput>make</userinput></screen>
370 <para>should produce the Netatalk binaries (this step can take several
371 minutes to complete).</para>
373 <para>When the process finished you can use</para>
375 <screen><prompt>$</prompt> <userinput>make install</userinput></screen>
377 <para>to install the binaries and documentation (must be done as
378 "root" when using default locations).</para>