Using Apple Filing Protocol (AFP) with FreeBSD

I want to access my files on the FreeBSD NAS via AFP and not SMB. SMB is too Windows-like ;-)

First we nee Bonjour to multicast the DNS-name of the server. This is implemented by avahi. (Why does it nee to install so many X ports...?)

1# cd /usr/ports/net/avahi
2# make install clean

Now start the daemons (remember to modify rc.conf)

1#Avahi
2avahi_daemon_enable="YES"
3dbus_enable="YES"
1# /usr/local/etc/rc.d/dbus start
2# /usr/local/etc/rc.d/avahi-daemon start

Now we need a service talking AFP: netatalk

1# cd /usr/ports/net/netatalk
2# make install clean

Now start the daemons (remember to modify rc.conf

1#Netatalk (AFP)
2netatalk_enable="YES"
3atalkd_enable="NO"
4afpd_enable="YES"
5papd_enable="NO"
1# /usr/local/etc/rc.d/netatalk start

Now the AFP is running, and you should be able to see the server in a Finder + be able to login and see the home directory of a specific user.