国内外VPS
主机测评与优惠

Linux下,挂载支持WebDav的网盘,扩展VPS空间

前段时间购买了一个novos的nextcloud网盘,支持WebDav。下面是挂载到VPS的简单说明,可以扩充小空间的VPS。

novos的nextcloud网盘购买链接:https://billing.novos.be/store/novos-brick

一、最简单的挂载支持WebDav的网盘

1、安装davfs2

/Debian下

apt-get install davfs2

CentOS下

yum install davfs2

2、创建目录并挂载

mkdir /
mount -t davfs https://brick..be/remote.php/dav/files/账号/ /

输入账号、密码即可。

二、进阶用法

1、创建一个用户,用于davfs2

usermod -aG davfs2 用户名

2、创建需要挂载的目录和个人配置文件目录

mkdir ~/
mkdir ~/.davfs2

复制配置文件

cp  /etc/davfs2/secrets ~/.davfs2/secrets

3、设置用户权限(改为自己的用户名)

chown : ~/.davfs2/secrets
chmod 600 ~/.davfs2/secrets

编辑 ~/.davfs2/secrets ,输入WebDav网盘信息,如:

https://brick..be/remote.php/dav/files/账号/ 用户名 

建议在 /etc/davfs2/secrets 也添加上

4、添加mount信息到 /etc/fstab

https://brick..be/remote.php/dav/files/账号/ /root/
davfs user,rw,auto 0 0

5、使用

添加

mount ~/

卸载

umount ~/novos

webdav

主要参考:https://docs..com/server/20/user_manual/en/files/access_webdav.html#creating-webdav-mounts-on-the-linux-command-line

赞(0)
版权声明:本文采用知识共享 署名4.0国际许可协议 [BY-NC-SA] 进行授权
文章名称:《Linux下,挂载支持WebDav的网盘,扩展VPS空间》
文章链接:https://www.liuzhanwu.com/18960.html
本站资源仅供个人学习交流,请于下载后24小时内删除,不允许用于商业用途,否则法律问题自行承担。

登录

找回密码

注册