centos安装rclone挂载alist

一、安装alist

1.通过docker启动alist

bash 复制代码
docker run -d --restart=always \
  -v /usr/local/docker/alist/data:/opt/alist/data \
  -p 5244:5244 \
  -e PUID=$(id -u) \
  -e PGID=$(id -g) \
  -e UMASK=022 \
  --name alist \
  xhofe/alist:latest

2.访问alist

使用docker logs alist在容器日志中找到密码,访问http://IP:5244,登陆后可以修改密码

二、安装rclone

1.这里推荐在线安装,如果提示未安装unzip则安装重试

bash 复制代码
curl https://rclone.org/install.sh | sudo bash

2.验证,出现版本号即可

bash 复制代码
rclone --version

3.配置rclone通过webdav挂载alist

bash 复制代码
rclone config

这里会有11步交互的配置操作,我简单写一下每一步:

复制代码
1.是否选择新远程,选n
No remotes found, make a new one?
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n
2.设置名字
name> rclone-alist
3.选择协议类型,这里我省略选项,输入webdav或输入前面的数字,我这是52
Type of storage to configure.
Choose a number from below, or type in your own value
//...
Storage> 52
4.输入webdav链接地址,即alist的webdav地址
Option url.
//...
url> http://127.0.0.1:5244/dav
5.选择webdav服务提供者的名字,选带Other的字段,我这是7
Name of the WebDAV site/service/software you are using
Choose a number from below, or type in your own value
//...
vendor> 7
6.输入webdav链接账号
Option user.
//...
user> admin
7.输入webdav连接密码,先选y,再输入两次密码
Password.
y) Yes type in my own password
g) Generate random password
n) No leave this optional password blank
y/g/n> y
Enter the password: 
password:
Confirm the password: 
password:
8.不输入Bearer token,直接回车
Bearer token instead of user/pass (e.g. a Macaroon)
bearer_token>
9.是否编辑高级配置,默认是n直接回车
Edit advanced config?
y) Yes
n) No (default)
y/n> 
10.配置完成,是否保持当前远程?默认y直接回车
//...
Keep this "rclone-alist" remote?
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d>
11.至此显示出当前远程仓库,选q退出当前配置模式
Current remotes:
Name                 Type
====                 ====
rclone-alist         webdav
//...
e/n/d/r/c/s/q> q

如果要修改配置,该文件在路径:/root/.config/rclone/rclone.conf

4.查看是否挂载成功

1.执行命令,成功则会显示alist中的目录

bash 复制代码
rclone lsd rclone-alist:/

5.安装fuse

1.fuse用于将rclone挂载的目录挂载到本地磁盘,在高版本rclone中需要安装fuse3

bash 复制代码
yum -y install fuse3

三、挂载到本地磁盘

1.根目录新建用于挂载到目录

bash 复制代码
mkdir /rclone_root

2.执行命挂载到新建的目录(可以将该命令设为开机启动执行即自动挂载)

bash 复制代码
rclone mount rclone-alist: /rclone_root --copy-links --allow-other --allow-non-empty --umask 000 --daemon

执行成功后会返回rclone挂载的pid,此时rclone_root 目录下就能看到挂载的alist目录

3.取消挂载

bash 复制代码
fusermount -qzu /rclone_root
相关推荐
.道阻且长.20 小时前
Linux软件包管理器
linux·运维·ubuntu·职场和发展·centos
乔旭伟2 天前
CentOS 停更迁移实战:vault 源配置、目标选型与迁移工程清单
linux·运维·centos
闲云自留地3 天前
CentOS 搬 Ubuntu 24.04:yum 变 apt、防火墙、SELinux、root 全差异避坑
linux·ubuntu·centos
暖核3 天前
从 CentOS 到 Ubuntu24.04 运维迁移手册:命令对照表 + 实操 + 避坑
linux·运维·centos
曦夜日长4 天前
MySQL系统篇,安装部署(一):CentOS 7 下从卸载到登录的完整实战
数据库·mysql·centos
虎头金猫5 天前
从上传PPT到观众远程打开互动页面:Claper在CentOS 7上的Docker部署、互动组件设置与固定访问地址实战
linux·运维·网络·人工智能·docker·centos·powerpoint
xiaoqiMikko5 天前
Linux 实战(九·完):重定向、sudo、通配符的坑 + 报错速查表 —— 三台真机实测
linux·centos
骑着蜗牛撵大象3276 天前
CentOS 7 单机拉起 Elasticsearch 7.17.29:从内核报错到公网可达的全链路记录
elasticsearch·centos·jenkins·restful·内核调优·公网部署
打工仔折腾 AI6 天前
CentOS 7 单机部署 Elasticsearch 7.17.29:启动报错排查与 CRUD 验证
人工智能·后端·python·elasticsearch·性能优化·centos·jenkins
mengchanmian6 天前
VSFTP 服务器搭建(Centos)
运维·服务器·centos