Padavan路由器安装timeMachine
2021-02-07
准备工作
刷了padavan软件的路由器一台
移动硬盘或u盘
移动硬盘格式化为ext4文件格式
挂载移动硬盘到路由器
安装opkg命令和其它设置
ssh进入后台执行opkg.sh
命令,等待执行完成
修改用户名admin为root
开始安装
ssh进入路由器
安装和配置avahi,执行
opkg install avahi-daemon avahi-utils
创建一个
/opt/etc/avahi/services/afpd.service
文件编辑afpd.service文件,把以下内容贴近去
1 2 3 4 5 6 7 8 9 10 11 12 13 14
<?xml version="1.0" standalone='no'?> <!DOCTYPE service-group SYSTEM "avahi-service.dtd"> <service-group> <name replace-wildcards="yes">AFP on %h</name> <service> <type>_afpovertcp._tcp</type> <port>548</port> </service> <service> <type>_device-info._tcp</type> <port>0</port> <txt-record>model=TimeMachine</txt-record> </service> </service-group>
启动avahi
1 2
/opt/etc/init.d/S20dbus restart /opt/etc/init.d/S42avahi-daemon restart
查看avahi是否运行
ps | grep avahi
安装和配置netatalk,
opkg install netatalk
编辑配置文件
vi /opt/etc/afp.conf
把下面的内容贴进去,并按照你的环境修改配置
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
[Global] afp listen = 192.168.123.1 ; 你路由器的 hostname ,执行 hostname 命令查看 hostname = hostname ;log file = /opt/var/log/afpd.log ;log level = default:info afpdaemon:debug uamsdaemon:info uam list = uams_guest.so uams_dhx.so uams_dhx2.so uam path = /opt/lib/uams mimic model = TimeCapsule6,106 hosts allow = 192.168.123.0/16 guest account = nobody [TimeMachine] ; timemachine 的路径 path = /media/TIMEMACHINE/ time machine = yes cnid scheme = dbd ea = auto file perm = 0664 directory perm = 0775
重启afpd
/opt/etc/init.d/S27afpd restart
在mac电脑上连接
- 在Finder里面快捷键
command + k
- 输入
afp://192.168.123.1
连接 - 使用访客连接
- 在Finder里面快捷键
问题
很不稳定,不建议使用