Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

将阿里云盘挂载为WebDAV并使用rclone挂载到本地 #1

Open
Benson80 opened this issue Jan 31, 2023 · 0 comments
Open

将阿里云盘挂载为WebDAV并使用rclone挂载到本地 #1

Benson80 opened this issue Jan 31, 2023 · 0 comments

Comments

@Benson80
Copy link
Owner

Benson80 commented Jan 31, 2023

安装aliyundrive-webdav
sudo snap install aliyundrive-webdav

卸载aliyundrive-webdav
sudo snap remove aliyundrive-webdav

创建目录
mkdir /etc/aliyundrive-webdav

安装Docker
snap install docker

Docker运行
docker run -d
--name=aliyundrive-webdav
--restart=always
-p 8080:8080
-v $PWD/aliyundrive-webdav/:/etc/aliyundrive-webdav/
-e REFRESH_TOKEN='your refresh token'
-e WEBDAV_AUTH_USER=admin
-e WEBDAV_AUTH_PASSWORD=admin
messense/aliyundrive-webdav

其中,REFRESH_TOKEN 环境变量为你的阿里云盘 refresh_token,WEBDAV_AUTH_USER 和 WEBDAV_AUTH_PASSWORD 为连接 WebDAV 服务的用户名和密码。

阿里云盘WebDAV
http://IP地址:8080

安装rclone
curl https://rclone.org/install.sh | sudo bash
配置
rclone config

mkdir /aliyunwebdav
rclone mount aliyunwebdav:/电影 /aliyunwebdav --allow-other --vfs-cache-mode writes&
fusermount -qzu /aliyunwebdav

vi /etc/systemd/system/rclone.service

[Unit]
Description=Rclone
After=network-online.target

[Service]
User=root
ExecStart=rclone mount aliyunwebdav:/电影 /aliyunwebdav --allow-other --vfs-cache-mode writes
Restart=on-abort

[Install]
WantedBy=multi-user.target

开机自启动
systemctl enable rclone

启动
systemctl start rclone
停止
systemctl stop rclone
重启
systemctl restart rclone
查看状态
systemctl status rclone

显示磁盘分区使用情况
df -h
显示文件大小
ls -lh

启动Jellyfin服务
sudo systemctl enable jellyfin
sudo systemctl start jellyfin

重启Jellyfin
systemctl restart jellyfin

停止Jellyfin
/etc/init.d/jellyfin stop

检查服务是否已正确启动
service jellyfin status
systemctl status jellyfin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant