cloudreve网盘搭建所需代码分享

前言

之前出过一期初阶视频,回头出进阶的视频,讲述这个网盘完整搭建教程。

网盘功能比较全,在线音乐,在线视频,在线文档,离线下载,链接分享都有,还可以挂载外部网盘空间











1.环境

重装系统 如果你是新实例就看你自己心情

bash <(wget --no-check-certificate -qO- 'https://moeclub.org/attachment/LinuxShell/InstallNET.sh') -u 20.04 -v 64 -a -firmware -p 123456


更新系统环境

apt update -y && apt install -y curl && apt install -y socat && apt install wget -y


打开端口

iptables -P INPUT ACCEPT

iptables -P FORWARD ACCEPT

iptables -P OUTPUT ACCEPT

iptables -F


BBR开启

wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh


装宝塔

wget -O install.sh http://v7.hostcli.com/install/install-ubuntu_6.0.sh && sudo bash install.sh



2.下载安装

cloudreve网盘GitHub官方地址

cloudreve/Cloudreve: 🌩支持多家云存储的云盘系统 (Self-hosted file management and sharing system, supports multiple storage providers) (github.com)


通过宝塔把官网下载Cloudreve的压缩包解压将最终文件放入服务器的root目录下


赋予执行权限

chmod +x ./cloudreve


启动 Cloudreve

./cloudreve


VPS可用空间查看

df -hl



3.开机自启动

自启动设定创建自启文件并进入

vim /usr/lib/systemd/system/cloudreve.service


将以下代码全部填入空的文本中

[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


退出文本编辑模式 如果是小白都不知道怎么退出 一般人也不讲 我找了好久

:   输入英文冒号,光标就下去了

wq!在输入这个就保存退出了

更新配置

systemctl daemon-reload

启动服务

systemctl start cloudreve

设置开机启动

systemctl enable cloudreve



4.离线下载组件

组件环境

apt install wget curl ca-certificates

下载脚本

wget -N git.io/aria2.sh && chmod +x aria2.sh

运行脚本

./aria2.sh

评论

此博客中的热门博文

科技lion官方一键脚本上线!VPS监控测试建站维护于一身的全能工具箱

2023国外的接码平台分享

CloudCone付费VPS分享 挺便宜的