Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Install Netatalk 3.1.11 on Ubuntu 18.04 Bionic
# This gist gives instructions to build a basic deb package of netatalk-3.1.11 using checkinstall on Ubuntu 18.04.
# With the idea being that you build the deb on your build server and install from the resulting deb in production.
# Given that the deb is packaged using checkinstall with basic options, think home use, not real production.
# Note that this build does not provide the spotlight feature.
# The tracker packages have been left out as the intent was to provide TimeMachine functionality only.
# STEP ONE - Make the Netatalk deb on a build machine
sudo apt install --yes \
build-essential \
libevent-dev \
libssl-dev \
libgcrypt-dev \
libkrb5-dev \
libpam0g-dev \
libwrap0-dev \
libdb-dev \
libtdb-dev \
avahi-daemon \
libavahi-client-dev \
libacl1-dev \
libldap2-dev \
libcrack2-dev \
systemtap-sdt-dev \
libdbus-1-dev \
libdbus-glib-1-dev \
wget${NETATALK_VERSION}.tar.gz -P /tmp
tar -xzf /tmp/netatalk-${NETATALK_VERSION}.tar.gz -C /tmp
cd /tmp/netatalk-${NETATALK_VERSION}
./configure \
--with-init-style=debian-systemd \
--without-libevent \
--with-cracklib \
--enable-krbV-uam \
--with-pam-confdir=/etc/pam.d \
--with-dbus-daemon=/usr/bin/dbus-daemon \
sudo apt install --yes checkinstall
sudo checkinstall -D \
--pkgname='netatalk' \
--pkgversion="${NETATALK_VERSION}" \
--maintainer="${MAINTAINER}" \
make install
ls -lh /tmp/netatalk*/netatalk*.deb
cp /tmp/netatalk*/netatalk*.deb $HOME
cd $HOME
sudo rm -rf /tmp/netatalk*
# STEP TWO - Install the Netatalk deb on a production server
sudo mkdir -p $TIMEMACHINE_PATH
# Manually install netatalk_3.1.11 dependencies.
sudo apt install --yes \
avahi-daemon \
cracklib-runtime \
db-util \
db5.3-util \
libtdb1 \
libavahi-client3 \
libcrack2 \
libcups2 \
libpam-cracklib \
sudo dpkg -i netatalk_3.1.11-1_amd64.deb
sudo ldconfig
sudo mv /usr/local/etc/afp.conf /usr/local/etc/afp.conf.orig
echo "[Global]
mimic model = TimeCapsule6,106
log level = default:warn
log file = /var/log/afpd.log
spotlight = no
valid users = ${VALID_USER}
time machine = yes
vol size limit = 1430512" | sudo tee /usr/local/etc/afp.conf
sudo systemctl enable netatalk
sudo systemctl daemon-reload
sudo systemctl start netatalk
systemctl status avahi-daemon
systemctl status netatalk
/usr/local/sbin/netatalk -V
/usr/local/sbin/afpd -V

This comment has been minimized.

Copy link

seb-koch commented Feb 16, 2020

Thanks a lot, that worked like a charm. I did it without a build machine but i like your ENVVAR driven way of doing things. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.