Install Netatalk 3.1.8 on Ubuntu 15.10 Wily

From Netatalk Wiki
(Difference between revisions)
Jump to: navigation, search
 
Line 1: Line 1:
== Required Packages ==
+
#REDIRECT [[Install Netatalk 3.1.9 on Ubuntu 16.04 Xenial]]
Install the following packages by "<tt>sudo apt-get install</tt>".
+
 
+
*<tt>build-essential</tt>
+
*<tt>libevent-dev</tt> (used by netatalk(8))
+
*<tt>libssl-dev</tt> (DHX auth aka DHCAST128)
+
*<tt>libgcrypt-dev</tt> (DHX2 auth)
+
*<tt>libkrb5-dev</tt> (Kerberos V auth)
+
*<tt>libpam0g-dev</tt> (PAM)
+
*<tt>libwrap0-dev</tt> (TCP Wrapper)
+
*<tt>libdb-dev</tt> (dbd CNID backend)
+
*<tt>libtdb-dev</tt> (tdb CNID backend)
+
*<tt>libmysqlclient-dev</tt> (mysql CNID backend)
+
*<tt>avahi-daemon</tt> (Bonjour support)
+
*<tt>libavahi-client-dev</tt> (Bonjour support)
+
*<tt>libacl1-dev</tt> (ACL support)
+
*<tt>libldap2-dev</tt> (enhanced ACL support)
+
*<tt>libcrack2-dev</tt> (password ckeck)
+
*<tt>systemtap-sdt-dev</tt> (DTrace-compatible)
+
*<tt>libdbus-1-dev</tt> (used by afpstats command)
+
*<tt>libdbus-glib-1-dev</tt> (used by afpstats command)
+
*<tt>libglib2.0-dev</tt> (used by afpstats command)
+
*<tt>tracker</tt> (used for spotlight indexing)
+
*<tt>libtracker-sparql-'''1.0'''-dev</tt> (used for spotlight indexing) (version number may differ)
+
*<tt>libtracker-miner-'''1.0'''-dev</tt> (used for spotlight indexing) (version number may differ)
+
 
+
If tracker's version is unknown, you can know using command "'''aptitude search tracker'''".
+
 
+
== Build ==
+
Extract a tarball.
+
<blockquote>
+
<tt>
+
<pre>
+
$ tar xvf netatalk-3.1.8.tar.bz2
+
$ cd netatalk-3.1.8
+
</pre>
+
</tt>
+
</blockquote>
+
 
+
You should read the help message, in order to know configure options.
+
 
+
If the applicable libraries are installed, many options will be detected automatically.
+
 
+
<blockquote>
+
<tt>
+
<pre>
+
$ ./configure --help
+
</pre>
+
</tt>
+
</blockquote>
+
 
+
Do configure! The following options are not auto-detected.
+
<blockquote>
+
<tt>
+
<pre>
+
$ ./configure \
+
        --with-init-style=debian-systemd \
+
        --without-libevent \
+
        --without-tdb \
+
        --with-cracklib \
+
        --enable-krbV-uam \
+
        --with-pam-confdir=/etc/pam.d \
+
        --with-dbus-sysconf-dir=/etc/dbus-1/system.d \
+
        --with-tracker-pkgconfig-version=1.0
+
</pre>
+
</tt>
+
</blockquote>
+
 
+
If you use Ubuntu 14.10 or earlier, the value of "<tt>--with-init-style</tt>" option is "<tt>debian-sysv</tt>", not "<tt>debian-systemd</tt>".
+
 
+
The version 1.0 <tt>--with-tracker-pkgconfig-version=1.0</tt> must match the pkg-config version of the installed Tracker libraries. Use the following commands for finding the version info:
+
<blockquote>
+
<tt>
+
<pre>
+
$ pkg-config --list-all | grep tracker
+
...
+
</pre>
+
</tt>
+
</blockquote>
+
 
+
On successful completion, you will see a report similar to the following:
+
<blockquote>
+
<tt>
+
<pre>
+
Compilation summary:
+
    CPPFLAGS      = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)
+
    CFLAGS        = -D_U_="__attribute__((unused))" -g -O2
+
    LIBS          =  -lcrack
+
    PTHREADS:
+
        LIBS  =
+
        CFLAGS = -pthread
+
    TRACKER:
+
        LIBS  = -ltracker-sparql-1.0 -lgio-2.0 -lgobject-2.0 -Wl,--export-dynamic -lgmodule-2.0 -pthread -lglib-2.0
+
        CFLAGS = -pthread -I/usr/include/tracker-1.0 -I/usr/include/tracker-1.0/libtracker-sparql -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
+
    SSL:
+
        LIBS  =  -L/usr/lib64 -lcrypto
+
        CFLAGS =  -I/usr/include/openssl
+
    LIBGCRYPT:
+
        LIBS  = -lgcrypt
+
        CFLAGS =
+
    PAM:
+
        LIBS  =  -lpam
+
        CFLAGS =
+
    WRAP:
+
        LIBS  = -lwrap
+
        CFLAGS =
+
    BDB:
+
        LIBS  =  -L/usr/lib64 -ldb-5.3
+
        CFLAGS =
+
    GSSAPI:
+
        LIBS  = -L/usr/lib/x86_64-linux-gnu/mit-krb5 -Wl,-Bsymbolic-functions -Wl,-z,relro -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err
+
        CFLAGS = -isystem /usr/include/mit-krb5
+
    ZEROCONF:
+
        LIBS  =  -lavahi-common -lavahi-client
+
        CFLAGS =  -D_REENTRANT
+
    LDAP:
+
        LIBS  =  -lldap
+
        CFLAGS =
+
    LIBEVENT:
+
        LIBS  =
+
        CFLAGS =
+
    TDB:
+
        LIBS  = -ltdb
+
        CFLAGS =
+
    MySQL:
+
        LIBS  = -L/usr/lib/x86_64-linux-gnu -lmysqlclient -lpthread -lz -lm -ldl
+
        CFLAGS = -I/usr/include/mysql -DBIG_JOINS=1  -fno-strict-aliasing  -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing
+
Configure summary:
+
    INIT STYLE:
+
        debian-systemd
+
    AFP:
+
        Extended Attributes: ad | sys
+
        ACL support: yes
+
        Spotlight: yes
+
    CNID:
+
        backends:  dbd last tdb mysql
+
    UAMS:
+
        DHX    (PAM SHADOW)
+
        DHX2    (PAM SHADOW)
+
        RANDNUM (afppasswd)
+
        Kerberos V
+
        clrtxt  (PAM SHADOW)
+
        guest
+
    Options:
+
        Zeroconf support:        yes
+
        tcp wrapper support:    yes
+
        quota support:          yes
+
        admin group support:    yes
+
        valid shell check:      yes
+
        cracklib support:        yes
+
        ACL support:            auto
+
        Kerberos support:        yes
+
        LDAP support:            yes
+
        AFP stats via dbus:      yes
+
        dtrace probes:          yes
+
    Paths:
+
        Netatalk lockfile:      /var/lock/netatalk
+
        init directory:          /lib/systemd/system
+
        dbus system directory:  /etc/dbus-1/system.d
+
        pam config directory:    /etc/pam.d
+
    Documentation:
+
        Docbook:                no
+
</pre>
+
</tt>
+
</blockquote>
+
Docbook is not needed because it is for developers only.
+
 
+
Make and install.
+
<blockquote>
+
<tt>
+
<pre>
+
$ make
+
$ sudo make install
+
</pre>
+
</tt>
+
</blockquote>
+
 
+
== Check ==
+
Check features and paths, using "<tt>afpd -V</tt>".
+
<blockquote>
+
<tt>
+
<pre>
+
$ /usr/local/sbin/afpd -V
+
afpd 3.1.8 - Apple Filing Protocol (AFP) daemon of Netatalk
+
 
+
This program is free software; you can redistribute it and/or modify it under
+
the terms of the GNU General Public License as published by the Free Software
+
Foundation; either version 2 of the License, or (at your option) any later
+
version. Please see the file COPYING for further information and details.
+
 
+
afpd has been compiled with support for these features:
+
 
+
          AFP versions: 2.2 3.0 3.1 3.2 3.3 3.4
+
        CNID backends: dbd last tdb mysql
+
      Zeroconf support: Avahi
+
  TCP wrappers support: Yes
+
        Quota support: Yes
+
  Admin group support: Yes
+
    Valid shell checks: Yes
+
      cracklib support: Yes
+
            EA support: ad | sys
+
          ACL support: Yes
+
          LDAP support: Yes
+
        D-Bus support: Yes
+
    Spotlight support: Yes
+
        DTrace probes: Yes
+
 
+
              afp.conf: /usr/local/etc/afp.conf
+
          extmap.conf: /usr/local/etc/extmap.conf
+
      state directory: /usr/local/var/netatalk/
+
    afp_signature.conf: /usr/local/var/netatalk/afp_signature.conf
+
      afp_voluuid.conf: /usr/local/var/netatalk/afp_voluuid.conf
+
      UAM search path: /usr/local/lib/netatalk//
+
  Server messages path: /usr/local/var/netatalk/msg/
+
</pre>
+
</tt>
+
</blockquote>
+
 
+
== Setting Up ==
+
Edit "<tt>/usr/local/etc/afp.conf</tt>".
+
 
+
Ex:
+
<blockquote>
+
<tt>
+
<pre>
+
[Global]
+
 
+
[Homes]
+
    basedir regex = /home
+
 
+
[Test Volume]
+
    path = /export/test1
+
 
+
[My Time Machine Volume]
+
    path = /export/timemachine
+
    time machine = yes
+
    vol size limit = 512000
+
</pre>
+
</tt>
+
</blockquote>
+
 
+
It's recommended to enable extended attributes of filesystem.
+
You can check it by "<tt>getfattr</tt>" and "<tt>setfattr</tt>" commands.
+
 
+
If you use ACL, you shoud check it by "<tt>getfacl</tt>" and "<tt>setfacl</tt>" commands.
+
 
+
If these are disabled, use "<tt>tune2fs</tt>" command or edit "<tt>/etc/fstab</tt>" file.
+
 
+
Ex:
+
<blockquote>
+
<tt>
+
<pre>
+
/dev/sdc2    /mountpoint    ext4    defaults,user_xattr,acl    0 2
+
</pre>
+
</tt>
+
</blockquote>
+
 
+
You should check firewall. AFP's port number is <tt>548</tt>. Zeroconf's port number is <tt>5353</tt>.
+
 
+
== Enabling and Starting ==
+
The systemd unit file is <tt>/lib/systemd/system/netatalk.service</tt>.
+
You must run Avahi ahead of Netatalk.
+
 
+
<blockquote>
+
<tt>
+
<pre>
+
$ sudo systemctl enable avahi-daemon
+
$ sudo systemctl enable netatalk
+
$ sudo systemctl start avahi-daemon
+
$ sudo systemctl start netatalk
+
</pre>
+
</tt>
+
</blockquote>
+
 
+
== Spotlight Feature ==
+
If you use Spotlight feature, read [http://netatalk.sourceforge.net/3.1/htmldocs/configuration.html#idp139639181855360 Spotlight] section in Netatalk Manual.
+
 
+
Set "<tt>spotlight = yes</tt>" and "<tt>dbus daemon = /usr/bin/dbus-daemon</tt>".
+
 
+
Set "<tt>spotlight = no</tt>" for Time Machine's volume. The mining for sparsebundle is wasteful.
+
 
+
Ex:
+
<blockquote>
+
<tt>
+
<pre>
+
[Global]
+
    spotlight = yes
+
    dbus daemon = /usr/bin/dbus-daemon
+
 
+
[Homes]
+
    basedir regex = /home
+
 
+
[Test Volume]
+
    path = /export/test1
+
 
+
[My Time Machine Volume]
+
    path = /export/timemachine
+
    time machine = yes
+
    spotlight = no
+
    vol size limit = 512000
+
</pre>
+
</tt>
+
</blockquote>
+
 
+
A problem have been reported.
+
*[http://sourceforge.net/p/netatalk/bugs/543/ Bug#543 Spotlight cannot search in user homes] and [https://github.com/Netatalk/Netatalk/pull/7 FIX: Spotlight: searching in user homes, bug #543 by hat001 · Pull Request #7 · Netatalk/Netatalk] - There is still a problem with this patch.
+
 
+
== Bug ==
+
Network isn't detected if IPv6 is disabled. There is a patch already.
+
*[http://sourceforge.net/p/netatalk/bugs/606/ netatalk / Bugs / #606 listening on IPv6 wildcard address may fail if IPv6 is disabled]
+
 
+
[[Category:Howtos]]
+

Latest revision as of 17:10, 19 July 2016

  1. REDIRECT Install Netatalk 3.1.9 on Ubuntu 16.04 Xenial
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox