I needed to share files with the macs i have in my house and i have a Brother DCP-7060D which has a scanner. It scans the files to the computer however i would still need to access it right? So i decided to set-up AFP on it. I installed the default netatalk 2.2.1 that was on the repository but then I decided to upgrade to netatalk 3.0.1 instead since a more updated release usually means more fixes and we all know of the problems with Lion and older netatalk versions. So if you're interested in using netatalk 3.0 then here's a short tutorial on how to compile it.
We'll need some of the libraries and header files to compile netatalk 3.0.1 Type this in a terminal.
sudo apt-get install libssl-dev libdb-dev libgcrypt-dev libcrack2-dev libavahi-client-dev libldap2-dev libacl1-dev libwrap0-dev checkinstall build-essential
So now the libraries are installed we need to get netatalk 3.0.1 sources.
tar xvzf netatalk-3.0.1.tar.gz
Now you need to configure the source files first
./configure --enable-debian --enable-zeroconf --with-cracklib --with-acls --with-ldap --enable-tcp-wrappers --with-init-style=debian
That should end properly with no errors stating what is supported whatsoever and now we compile it.
Once that is done we run checkinstall so we can properly remove it if needed.
sudo checkinstall --pkgname=netatalk --pkgversion="$(date +%Y%m%d%H%M)" --backup=no --deldoc=yes --default --fstrans=no
After that is done, netatalk should be properly installed.
All the configuration is done in one file now which is really awesome. The file is afp.conf and it's located at /usr/local/etc/afp.conf. We'll edit the configuration file and add in some stuff.
sudo nano /usr/local/etc/afp.conf
This is my personal configuration file and you can modify it as necessary.
Here's more info about how to modify afp.conf http://netatalk.sourceforge.net/3.0/htmldocs/afp.conf.5.html
So once you have your afp.conf configured you'll need to restart netatalk.
We do this with this command
sudo service netatalk restart
Oh and one more thing. To get netatalk to start on boot, run these commands:
sudo update-rc.d -f netatalk remove
sudo update-rc.d netatalk defaults
Feel free to add any extra volumes according to the configuration file. You're basically done. If you're lazy and don't want to compile it. I've compiled a .deb file already and you can get it from the link below. It's 32bit only. Cheers.
Compiled only the 32bit 3.0.1 version.
EDIT: 3.0.2 is out. Haven't tested it but the steps should be the same.
Download: http://cl.ly/3Z0r2y1j0Y46 32bit