近期Cloudreve更新到了3.0版本,对于OneDrive的支持变得相当友好,并且兼容了世纪互联版(国内运营,速度飞快!)是一个相当不错的版本,所以特别再写一些内容来推荐一下!
首先下载Cloudreve:https://github.com/cloudreve/Cloudreve/releases
官方文档: https://docs.cloudreve.org/getting-started/install
项目地址: https://github.com/cloudreve/Cloudreve
演示地址:https://demo.cloudreve.org/
讨论社区:https://forum.cloudreve.org/
上传至服务器需要存放的目录,我存放在了/root,以下均以此目录示例!
#解压文件 文件名更换为下载得到了实际名称 tar -zxvf cloudreve_****.tar.gz #赋予执行的权限 chmod +x ./cloudreve #首次执行启动 ./cloudreve
首次执行将会获取到后台管理员的账号与密码。记录下账号与密码,后续完成修改。
按下Ctrl+z结束运行
下面我们来将Cloudreve注册为服务,便于每次服务器重启后自动运行。
cat > /usr/lib/systemd/system/cloudreve.service <<EOF [Unit] Description=Cloudreve Documentation=https://docs.cloudreve.org After=network.target Wants=network.target [Service] WorkingDirectory=/root ExecStart=/root/cloudreve Restart=on-abnormal RestartSec=5s KillMode=mixed StandardOutput=null StandardError=syslog [Install] WantedBy=multi-user.target EOF
WorkingDirectory=/root
ExecStart=/root/cloudreve
修改为实际存放路径,如果是按我 前面相同的路径存放,此处就无需修改了!
# 更新配置 systemctl daemon-reload # 启动服务 systemctl start cloudreve # 设置开机启动 systemctl enable cloudreve
管理命令
# 启动服务 systemctl start cloudreve # 停止服务 systemctl stop cloudreve # 重启服务 systemctl restart cloudreve # 查看状态 systemctl status cloudreve
执行:
systemctl start cloudreve
启动Cloudreve服务,到此就完成了部署
访问:http://www.xxx.com:5212/ 如果服务器有开启防火墙,记得放行端口!
可以使用宝塔面板建立一个网站设置反代使用80端口访问,并开启SSL 使有和HTTPS访问,以配合使用OneDrive,此处不详细讲述,过程很简单。

使用OneDrive做为远端存储服务器
使用默认的用户名和密码登录后台,选择存储策略:

添加存储策略

选择OneDrive,按提示配置好参数:




过程很简单,并且Cloudreve里已经详细说明了过程,只简单截图几张,此处不复述。至此就完成了远端存储的配置
修改相应用户组的默认存储策略!

至此安装与OneDrive就都配置完成了!

关于离线下载的相关配置可以参考我之前发过的文章。
世纪互联商业基础班版的账号就能应用注册开权限是吗?