安装alist

  1. 在1panel应用商店搜索alist安装

  2. 容器列表点击 终端 按钮,进入容器内执行命令设置密码。

./alist admin set 123456
  1. 添加网盘
    进入首页-管理-添加

安装Rclone

  1. 复制rclone文件到/usr/bin目录
    rclone文件下载:https://pan.quark.cn/s/53ffaa640cbc

  2. 增加可执行权限

chmod +x /usr/bin/rclone
  1. 新建挂载文件夹 /mnt/alist

  2. rclone配置

rclone config

alist的url:http://192.168.2.129:5244/
rclone配置名:alist

  1. 查看配置是否正确
rclone lsd alist:
  1. 运行命令进行挂载
rclone mount alist: /mnt/alist --header "Referer:" --multi-thread-streams 6 --buffer-size 512M --vfs-fast-fingerprint --vfs-cache-mode full --no-modtime --file-perms 0777 --copy-links --allow-other --allow-non-empty  --umask 000 --daemon --cache-dir /mnt/cache/rclone

设置开机自启

  1. 进行卸载
fusermount -qzu /mnt/alist
  1. 添加开机启动脚本内容
nano /etc/systemd/system/rcloneyy.service

添加:

[Unit]

Description=rcloneyy Service

After=network.target

[Service]

Type=simple

ExecStartPre=-/bin/sleep 30

ExecStart=rclone mount alist: /mnt/alist --header "Referer:" --multi-thread-streams 6 --buffer-size 512M --vfs-fast-fingerprint --vfs-cache-mode full --no-modtime --file-perms 0777 --copy-links --allow-other --allow-non-empty  --umask 000 --cache-dir /mnt/cache/rclone

[Install]

WantedBy=default.target
  1. 验证并让开机脚本生效
  • 更新systemd目录
systemctl daemon-reload
  • 创建开机快捷方式
systemctl enable rcloneyy.service
  • 启动服务
systemctl start rcloneyy.service
  • 查看服务状态
systemctl status rcloneyy.service