Sunday, August 19, 2012

Make AFP on Centos


  1. You will need gcc and some packages/libs for building berk-db and netatalkd, like “patch” and “make”
    1. 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 wge
  2. Download the latest berkeley-db 4.8 (5.0 and 5.1 did not work for me), compile and install
    1. wget http://download.oracle.com/berkeley-db/db-4.8.30.tar.gz
    2. tar xpf db-4.8.30.tar.gz
    3. cd db-4.8.30/build_unix/
    4. ../dist/configure
    5. make
    6. make install
  3. Download latest netatalkd, compile, install and copy config files to /etc/atalk
    AFP works fine with the default configuration files.
    1. wget "http://downloads.sourceforge.net/project/netatalk/netatalk/2.1.5/netatalk-2.1.5.tar.bz2?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fnetatalk%2F&ts=1293643408&use_mirror=biznetnetworks" 
    2. tar xpf netatalk-2.1.5.tar.bz2
    3. cd netatalk-2.1.5
    4. ./configure --enable-redhat --enable-pgp-uam --enable-krb4-uam --enable-krbV-uam --with-bdb=/usr/local/BerkeleyDB.4.8/
    5. make
    6. make install
    7. mkdir -p /etc/atalk/
    8. cp -a config/*.conf /etc/atalk/
    9. chkconfig netatalk on
    10. service netatalk start
  4. When you mount this filesystem on mac, all files and directory permissions will be reset to 755, which is really annoying, specially if you use git. Git will show all the file permission changes to 755 instead of 644 for files. So, to solve the problem edit the file /etc/atalk/AppleVolumes.default and update the last line on the file
    1. vi /etc/atalk/AppleVolumes.default
        # change from
          :DEFAULT: options:upriv,usedots
        # to
          :DEFAULT: options:upriv,usedots dperm:0755 fperm:0644


      Source: 
      http://www.frederico-araujo.com/2011/01/01/afp-on-centos-5-5-that-works/

      http://www.linuxquestions.org/questions/red-hat-31/how-to-get-netatalk-installed-on-centos-5-1-a-636147/
      http://permalink.gmane.org/gmane.network.netatalk.user/20594

No comments:

Post a Comment