Skip to content

Instantly share code, notes, and snippets.

@drucko
Forked from joshenders/gist:3976698
Last active August 29, 2015 14:11
Show Gist options
  • Save drucko/8b23ce966a0e37bdfd11 to your computer and use it in GitHub Desktop.
Save drucko/8b23ce966a0e37bdfd11 to your computer and use it in GitHub Desktop.

1. Install dependencies

apt-get install automake avahi-daemon build-essential checkinstall db5.1-util db-util git-core libacl1-dev libavahi-client-dev libdb5.1-dev libgcrypt11 libgcrypt11-dev libpam0g-dev libtool pkg-config

2. Download and unpack source

cd /usr/src/
wget http://prdownloads.sourceforge.net/netatalk/netatalk-3.1.6.tar.gz
tar -xvzf netatalk-3.1.6.tar.gz

3. Configure

cd netatalk-3.1.6
./configure \
    --enable-fhs \
    --with-acls \
    --with-init-style=debian-sysv \
    --with-zeroconf

5. Build

make
make install

6. Configure daemon

Here is a minimal configuration that shares home directories only. You'll want to take a look at the official documentation for more elaborate environments.

/etc/afp.conf

;
; Netatalk 3.x configuration file
;

[Global]
mimic model = RackMac

[Homes]
basedir regex = /home

; [My AFP Volume]
; path = /path/to/volume

7. Start services

/etc/init.d/netatalk start

Optional

If you don't need ACL support, you'll need to patch libatalk/util/unix.c and include/atalk/volume.h as suggested in this netatalk bug report. After patching, use --without-acls at configure time.

If you want to preserve .AppleDouble metadata, you can rebuild the Netatalk CNID database with the following command

dbd -r -C -t -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment