I had a client who wanted AFP services to work on CentOS 5.5 since he was moving from MacOS X. I was saddened to see that it was not already in the CentOS, EPEL or Remi’s repos. So, I set out on a journey to get it included in the Remi or EPEL repos. I contacted Jiri Skala, the Fedora package maintainer, to get it moved into EPEL 5 & 6. You can see the requests here and here. Unfortunately the latest version that could be installed is 2.0.x via EPEL. That did not do it for me so I took the time to research how to build it for CentOS 5 and make it all work.
I downloaded the Webmin module .9b4 and tried to use it but it is lacking of a semi-finished product. I spent the better portion of a day going through and fixing up the code. I emailed it to the package maintainer directly because I do not yet use GIT or DIFF to send him the differences. I’ve posted it here for anyone to test and build on. If you do revise it, send it to me so I can add it to what I have and I’ll keep track of the changes until the original author has time to post it.
I tried to follow instructions on this page but found them slightly off. Here is what worked for me.
# yum install openssl.x86_64 libssl-dev gcc automake autoconf GSSAPI libgssapi-devel libgssapi libgssapi-devel krb5-devel pam-devel shadow-devel openssl-devel cracklib wget
# mkdir /downloads
# cd /downloads
Now to begin downloading and manually building the packages. The following will build the berkeley db binaries, libs etc into /usr/local by default. I recommend not changing this since it just works.
# wget http://download.oracle.com/berkeley-db/db-4.8.30.tar.gz
# tar xzfp db-4.8.30.tar.gz
# cd db-4.8.30/build_unix/
# make install
Now to begin building the netatalk package.
# tar xjfp netatalk-2.1.5.tar.bz2
# cd netatalk-2.1.5
# ./configure –prefix=/usr –sysconfdir=/etc –enable-redhat –enable-pgp-uam –enable-krb4-uam –enable-krbV-uam –with-bdb=/usr/local/BerkeleyDB.4.8/
# make install
When I did the make install, it created the directories for me and copied all the config files over except afp_ldap.conf. I copied that one manually.
# cp config/afp_ldap.conf /etc/netatalk/
From there all you have to do is either manually start the services or use the Webmin module to do it.
# chkconfig netatalk on
# service netatalk start
After that its only a matter of going in and configuring things. The webmin module does only a basic job but will save some time. Custom tweaks can be done by the Edit Config Files link I added rather than having to use the terminal to do it.