[FrontPage] [TitleIndex] [WordIndex

This is a read-only archived version of wiki.centos.org

Installing Netatalk from source rpm

Netatalk is an Open Source implementation of Apple's AFP (Apple Filing Protocol) fileserver for Linux distribution and it's used to mount ext3/ext4 filesystem on Apple Macintosh. Although Snow Leopard (Darwin 10) said to me comes with "better" NFS4 support but it's still not considered to be a "production quality" and that's the one the reason one might try AFP/netatalk instead, if running a NFS4 server. Another reason could be if you want the server to be shown up in the OS X "Finder" sidebar (for easy drag-n-drop stuff) and also to keep the option open to use it as a TimeMachine backup volume, if required, in future.

1. Required packages & dependencies

Netatalk depends on these packages:

so, needs to be installed those packages first, if not already installed.

yum install {openssl,pam,db4,libgcrypt}-devel yum install libtool cracklib tcp_wrappers 

<!> NOTE: cracklib/cracklib-devel, quota/quota-devel and tcp_wrappers/tcp_wrappers-devel are integrated into their main packages (i.e. cracklib, quota and tcp_wrappers) in CentOS, so neither there are any *-devel to install nor available. automake and autoconf are automatically installed to satisfy the dependency.

2. Prepare the build environment

The following directories must be created, if already not there.

mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros 

<!> The second command will overwrite any previous .rpmmacros the system already may have.

Then download and install the source rpm. I downloaded 64-bit v2.0.5 from kojipkgs.fedoraproject.org repo. The appropriate rpm should be used according to the target architecture.

wget http://kojipkgs.fedoraproject.org/packages/netatalk/2.0.5/2.fc13/src/netatalk-2.0.5-2.fc13.src.rpm rpm -ivh --nomd5 netatalk-2.0.5-2.fc13.src.rpm 

<!> NOTE: I was getting "MD5 sum mismatch" error during the source installation, so I used --nomd5 to eliminate this.

As stated above that the -devel packages for the cracklib, quota and tcp_wrappers are integrated into their main packages, the BuildRequires line in the netatalk.spec (in ~/rpmbuild/SPECS) needs to be edited accordingly in the first place before going any further. The line looks like this on my system after editing.

BuildRequires: cracklib openssl-devel pam quota libtool automake autoconf db4-devel pam-devel \ tcp_wrappers libgcrypt-devel 

The rpmbuild command must be available to the system to build the rpm (your system may currently have the rpm command but not the rpmbuild). If it's already not installed, that needs to be installed as well.

sudo yum install rpm-build 

3. Installing the source rpm

Change to the SPECS directory and run the following commands to install the netatalk package.

cd ~/rpmbuild/SPECS rpmbuild -ba netatalk.spec cd ../RPMS/`uname -i`/ sudo rpm -ivh netatalk-2.0.5-2.x86_64.rpm 

And that's all!! If things go well, this version of Netatalk should start working nicely after modifying [/etc/atalk/] afpd.conf and AppleVolumes.default as per the requirements.

<!> NOTE: As of Netatalk 2.0, the installation default is --without-logfile and logging capabilities are only available if Netatalk was built using --with-logfile. So, there will be absolutely nothing in the /var/log/messages and /var/log/secure. To enable logging, -setuplog must be added to the afpd.conf and since it's done, the log should start to show up in the /var/log/messages.


2023-09-11 07:23