CentOS-7 上通过netatalk实现TimeMachine功能

#修改主机名
echo 'TimeMachine.lan' > /etc/hostname
#关闭selinux
setenforce 0
sed -i '/SELINUX/s/enforcing/disabled/g' /etc/selinux/config
 
#升级系统
yum update -y
#安装依赖
yum install -y rpm-build gcc make avahi-devel bison cracklib-devel dbusxdevel dbus-glib-devel docbook-style-xsl flex libacl-devel libattr-devel libdb-devel libevent-devel libgcrypt-devel krb5-devel mysql-devel openldap-devel openssl-devel pam-devel quota-devel systemtap-sdt-devel tcp_wrappers-devel libtdb-devel tracker-devel dconf perl perl-IO-Socket-INET6 
yum install -y wget iotop vim net-tools
 
# 添加用户
groupadd -g 50000 apple
useradd -u 50000 -g apple -s /usr/bin/false -d /home/apple apple
passwd apple
 
#创建相关目录
mkdir /time_machine
chown apple:apple /time_machine
 
#下载并安装netatalk
wget http://www003.upp.so-net.ne.jp/hat/files/netatalk-3.1.10-0.1.1.fc26.src.rpm
rpm -ivh netatalk-3.1.10-0.1.1.fc26.src.rpm
cd ~/rpmbuild/SPECS/
rpmbuild -bb netatalk.spec
cd ~/rpmbuild/RPMS/x86_64/
rpm -ivh *.rpm

vim /etc/netatalk/afp.conf
[Homes]
 basedir regex = /
[My Time Machine Volume]
 path = /time_machine
 valid users = apple
 rwlist = apple
 time machine = yes
 vol size limit = 1000000

systemctl enable avahi-daemon
systemctl enable netatalk
systemctl start avahi-daemon
systemctl start netatalk

  • mac/timemachine安装.txt
  • 最后更改: 2020/08/05 03:45
  • (外部编辑)