CentOS7下配置AFP(苹果Time Machine)文件服务器
Hurray
2018年03月14日
738次浏览
0条评论
2594字
### 支持准备
```bash
yum install -y avahi-devel cracklib-devel dbus-devel dbus-glib-devel 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 perl-IO-Socket-INET6 rpm-build gcc make wget git bison docbook-style-xsl flex dconf
```
### ~~源码从github下载~~
编译安装一直无法解决登录权限问题,抛弃。原文[https://segmentfault.com/a/1190000007918352](https://segmentfault.com/a/1190000007918352)
```
git clone https://github.com/Netatalk/Netatalk.git
```
### rpm安装
[https://raw.githubusercontent.com/sleepx/nas/master/netatalk-3.1.10-0.1.1.el7.centos.x86_64.rpm](https://raw.githubusercontent.com/sleepx/nas/master/netatalk-3.1.10-0.1.1.el7.centos.x86_64.rpm)
或[https://file.hurray0.com/uploads/menu/78/b922276a5ef4e24171ef488ffae18d5d.rpm](https://file.hurray0.com/uploads/menu/78/b922276a5ef4e24171ef488ffae18d5d.rpm)
```
rpm -ivh *.rpm
```
### 配置
vim /etc/netatalk/afp.conf
例如:
```
;
; Netatalk 3.x configuration file
;
[Global]
; Global server settings
admin auth user = root
[Homes]
basedir regex = /
valid users = hurray, root
force user = root
[SMB]
path = /smb/
valid users = hurray, root
force user = root
[My Time Machine Volume]
path = /smb/hurray/TM
time machine = yes
valid users = hurray, root
force user = root
```
### 防火墙与开机启动
```
# firewall at CentOS 7
firewall-cmd --zone=public --permanent --add-port=548/tcp
firewall-cmd --zone=public --permanent --add-port=548/udp
firewall-cmd --zone=public --permanent --add-port=5353/tcp
firewall-cmd --zone=public --permanent --add-port=5353/udp
systemctl restart firewalld
# start script
systemctl enable netatalk.service
systemctl start netatalk
```
版权属于:Hurray's InfoShare
如果没有特别声明,则为本博原创。转载时须注明出处及本声明!
最后修改:
2020年10月16日 02:09 AM