HATさんのブログを読むと近い将来Sambaへの移行があるみたいですが、うちの環境だとAFPのほうがまだ安定しているケースが多いので入れる。
Refs
事前準備
ファイルダウンロードしてライブラリ更新してビルドに必要なライブラリインストールして
# curl -O http://www003.upp.so-net.ne.jp/hat/files/netatalk-3.1.9-0.1.1.fc25.src.rpm
# yum -y update
# yum -y install rpm-build gcc make
# yum -y install libdb-devel avahi-devel dbus-glib-devel cracklib-devel systemtap-sdt-develquota dbus-glib-devel cracklib-devel systemtap-sdt-devel libtdb-devel libgcrypt libgcrypt-devel pam_oath pam_afs_session krb5-pkinit libevent-devel
# yum -y install bison flex docbook-style-xsl libacl-devel libattr-devel libxslt krb5-devel mysql-devel openldap-devel openssl-devel pam-devel quota-devel tcp_wrappers-devel
ビルド
srpmインストールしてビルドコマンド叩く
# rpm -ivh netatalk-X.X.X-XXX.XXX.src.rpm
# cd ~/rpmbuild/SPECS/ && rpmbuild -bb netatalk.spec
インストール
# cd ~/rpmbuild/RPMS/x86_64/
# rpm -ivh netatalk-3.1.9-0.1.1.el7.centos.x86_64.rpm
error: Failed dependencies:
dconf is needed by netatalk-5:3.1.9-0.1.1.el7.centos.x86_64
perl(IO::Socket::INET6) is needed by netatalk-5:3.1.9-0.1.1.el7.centos.x86_64
perl-IO-Socket-INET6 is needed by netatalk-5:3.1.9-0.1.1.el7.centos.x86_64
実行にdconfとperl-IO-Socket-INET6必要?ふむ
# yum install -y dconf perl-IO-Socket-INET6
retry
# rpm -ivh netatalk-3.1.9-0.1.1.el7.centos.x86_64.rpm
Preparing... ################################# [100%]
Updating / installing...
1:netatalk-5:3.1.9-0.1.1.el7.centos################################# [100%]
できた。確認
# afpd -V
afpd 3.1.9 - Apple Filing Protocol (AFP) daemon of Netatalk
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version. Please see the file COPYING for further information and details.
afpd has been compiled with support for these features:
AFP versions: 2.2 3.0 3.1 3.2 3.3 3.4
CNID backends: dbd last tdb mysql
Zeroconf support: Avahi
TCP wrappers support: Yes
Quota support: Yes
Admin group support: Yes
Valid shell checks: Yes
cracklib support: Yes
EA support: ad | sys
ACL support: Yes
LDAP support: Yes
D-Bus support: Yes
Spotlight support: Yes
DTrace probes: Yes
afp.conf: /etc/netatalk//afp.conf
extmap.conf: /etc/netatalk//extmap.conf
state directory: /var/lib/netatalk/
afp_signature.conf: /var/lib/netatalk/afp_signature.conf
afp_voluuid.conf: /var/lib/netatalk/afp_voluuid.conf
UAM search path: /usr/lib64/netatalk//
Server messages path: /var/lib/netatalk/msg/
とりあえずOKぽい。
初期設定など
systemctlでenableにしてstartして確認。
# systemctl enable avahi-daemon
# systemctl enable netatalk
# systemctl start avahi-daemon
# systemctl start netatalk
# systemctl status avahi-daemon
● avahi-daemon.service - Avahi mDNS/DNS-SD Stack
Loaded: loaded (/usr/lib/systemd/system/avahi-daemon.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2016-07-24 04:25:02 EDT; 6s ago
Main PID: 11131 (avahi-daemon)
Status: "avahi-daemon 0.6.31 starting up."
CGroup: /system.slice/avahi-daemon.service
├─11131 avahi-daemon: running [linux.local]
└─11132 avahi-daemon: chroot helper
# systemctl status netatalk
● netatalk.service - Netatalk AFP fileserver for Macintosh clients
Loaded: loaded (/usr/lib/systemd/system/netatalk.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2016-07-24 04:25:06 EDT; 5s ago
OKであった。