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.opencsw.org/packages/CSWnetatalk/">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>
161 <secondary>Berkeley DB</secondary>
163 <para>At the time of writing you need at least version 4.6.</para>
167 <para>Libgcrypt</para>
169 <para>Required for OS X 10.7 and later. Libgcrypt is needed for
172 <para>Libgcrypt can be downloaded from: <ulink
173 url="http://directory.fsf.org/wiki/Libgcrypt">
174 http://directory.fsf.org/wiki/Libgcrypt</ulink>.</para>
180 <title>Optional third party software</title>
182 <para>Netatalk can use the following third party software to enhance
183 it's functionality.</para>
187 <para>Tracker for Spotlight<indexterm>
188 <primary>Spotlight</primary>
189 </indexterm> support</para>
191 <para>Netatalk uses <ulink
192 url="http://projects.gnome.org/tracker/">Tracker</ulink> as the
193 metadata backend. Recent Linux distributions will provide the
194 libtracker-sparql library which is available since Tracker version
199 <para>mDNSresponderPOSIX or Avahi for Bonjour (aka
202 <para>Mac OS X 10.2 and later use Bonjour (aka Zeroconf) for
203 service discovery.</para>
205 <para>Avahi must be build with DBUS support (
206 <userinput>--enable-dbus</userinput>).</para>
210 <para>TCP wrappers</para>
212 <para>Wietse Venema's network logger, also known as TCPD or
215 <para>Security options are: access control per host, domain and/or
216 service; detection of host name spoofing or host address spoofing;
217 booby traps to implement an early-warning system.</para>
222 <primary>PAM</primary>
224 <secondary>Pluggable Authentication Modules</secondary>
227 <para>PAM provides a flexible mechanism for authenticating users.
228 PAM was invented by SUN<indexterm>
229 <primary>SUN</primary>
231 <secondary>Sun Microsystems</secondary>
232 </indexterm> Microsystems. Linux-PAM is a suite of shared
233 libraries that enable the local system administrator to choose how
234 applications authenticate users.</para>
240 <para>iconv provides conversion routines for many character
241 encodings. Netatalk uses it to provide charsets it does not have
242 built in conversions for, like ISO-8859-1. On glibc systems,
243 Netatalk can use the glibc provided iconv implementation.
244 Otherwise you can use the GNU libiconv implementation.</para>
250 <sect2 id="compiling-netatalk">
251 <title>Compiling<indexterm>
252 <primary>Compile</primary>
254 <secondary>Compiling Netatalk from Source</secondary>
255 </indexterm> Netatalk</title>
258 <title>Configuring the build</title>
260 <para>To build the binaries, first run the program
261 <command>./configure</command> in the source directory. This should
262 automatically configure Netatalk for your operating system. If you
263 have unusual needs, then you may wish to run</para>
265 <screen>$ <userinput>./configure --help</userinput></screen>
267 <para>to see what special options you can enable.</para>
269 <para>The most used configure options are:</para>
273 <para><option>--with-init-style</option>=redhat-sysv|redhat-systemd|suse-sysv|suse-systemd|gentoo|netbsd|debian|solaris|systemd</para>
275 <para>This option helps netatalk to determine where to install the
276 start scripts.</para>
280 <para><option>--with-bdb</option>=<replaceable>/path/to/bdb/installation/</replaceable></para>
282 <para>In case you installed Berkeley DB in a non-standard
283 location, you will <emphasis>have</emphasis> to give the install
284 location to netatalk, using this switch.</para>
288 <para>Now run configure with any options you need</para>
290 <screen><prompt>$</prompt> <userinput>./configure [arguments]</userinput></screen>
292 <para>Configure will end up in an overview showing the settings the
293 Netatalk Makefiles have been created with.</para>
296 <sect3 id="spotlight-compile">
297 <title>Spotlight<indexterm>
298 <primary>Spotlight</primary>
301 <para>Netatalk uses Gnome <ulink url="https://projects.gnome.org/tracker/">Tracker</ulink> as the
302 metadata backend. The minimum required version is 0.7 as that's the
303 first version to support <ulink url="https://wiki.gnome.org/Tracker/Documentation">SPARQL</ulink>.</para>
305 <para>If not already installed, install the packages
306 <emphasis>tracker</emphasis> and <emphasis>tracker-devel</emphasis>,
307 on Solaris install <ulink url="http://www.opencsw.org/">OpenCSW</ulink> and then install
308 the Tracker package from the OpenCSW unstable repository.</para>
310 <para>The tracker packages are found via pkg-config, you may have to
311 pass the version suffix as you may have a newer version installed then
312 the default 0.12, eg</para>
314 <screen><prompt>$ </prompt><userinput>pkg-config --list-all | grep tracker
315 </userinput>tracker-extract-0.16 tracker-extract - Tracker : A library to develop metadata extractors for 3rd party file types.
316 tracker-sparql-0.16 tracker-sparql - Tracker : A library to perform SPARQL queries and updates in the Tracker Store
317 tracker-miner-0.16 tracker-miner - A library to develop tracker data miners</screen>
321 <screen><prompt>$ </prompt><userinput>./configure --with-tracker-pkgconfig-version=0.16 ...</userinput></screen>
323 <para>If you're using Solaris and Tracker from OpenCSW, then you need
324 to set the PKG_CONFIG_PATH environment variable, add the
325 --with-tracker-prefix configure option and add
326 LDFLAGS="-R/opt/csw/lib"</para>
328 <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>
330 <para>Check the configure output whether the Tracker libs were
333 <screen>checking for TRACKER... yes
334 checking for TRACKER_MINER... yes
339 Spotlight: yes (SPARQL)
344 <title>Compile and install</title>
346 <para>Next, running</para>
348 <screen><prompt>$</prompt> <userinput>make</userinput></screen>
350 <para>should produce the Netatalk binaries (this step can take several
351 minutes to complete).</para>
353 <para>When the process finished you can use</para>
355 <screen><prompt>$</prompt> <userinput>make install</userinput></screen>
357 <para>to install the binaries and documentation (must be done as
358 "root" when using default locations).</para>