Padavan路由器安装timeMachine

2021-02-07

准备工作

刷了padavan软件的路由器一台

移动硬盘或u盘

移动硬盘格式化为ext4文件格式

挂载移动硬盘到路由器

安装opkg命令和其它设置

​ ssh进入后台执行opkg.sh命令,等待执行完成

​ 修改用户名admin为root

开始安装

  1. ssh进入路由器

    ssh [email protected]

  2. 安装和配置avahi,执行opkg install avahi-daemon avahi-utils

    1. 创建一个/opt/etc/avahi/services/afpd.service文件

    2. 编辑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>
      
    3. 启动avahi

      1
      2
      
      /opt/etc/init.d/S20dbus restart
      /opt/etc/init.d/S42avahi-daemon restart
      
    4. 查看avahi是否运行

      ps | grep avahi

  3. 安装和配置netatalk,opkg install netatalk

    1. 编辑配置文件

      vi /opt/etc/afp.conf

    2. 把下面的内容贴进去,并按照你的环境修改配置

       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
      
    3. 重启afpd

      /opt/etc/init.d/S27afpd restart

  4. 在mac电脑上连接

    1. 在Finder里面快捷键command + k
    2. 输入afp://192.168.123.1连接
    3. 使用访客连接

问题

很不稳定,不建议使用

参考

小米 mini 刷 padavan 后安装 time machine

words: 516 tags: linux padavan route timemachine