个人网盘搭建

1.1k words

个人网盘的搭建需要先搭建环境,再安装网盘程序。环境的搭建一般使用宝塔面板,网盘程序选择Cloudreve,功能全面,界面简洁而且更新频率高。

安装宝塔面板

安装命令

  1. Centos7.1+
1
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh
  1. Ubuntu16.04+
1
wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && sudo bash install.sh

组件安装

  1. 套件安装,选择Mysql,PHP,Nginx
  2. 扩展安装首页 → php-X.X → 安装扩展fileinfo

21

5

创建网站

3

Cloudreve安装

下载版本

下载地址:Github网址:Releases · cloudreve/Cloudreve (github.com)

下载版本:linux_amd64

1
wget https://github.com/cloudreve/Cloudreve/releases/download/3.3.1/cloudreve_3.3.1_linux_amd64.tar.gz

安装SSL证书

如果网盘地址想用https,则需要安装SSL证书

1
2
curl https://get.acme.sh | sh
source ~/.bashrc

获取证书

1
acme.sh --issue -d os.yaronzz.com -w /www/wwwroot/cloud

image-20210608105833651

反向代理

image-20210608105906895

安装Aria2

aria2用于离线下载资源,cloudreve可以直接下载磁力链接资源,并上传到onedrive

1
wget -N --no-check-certificate https://raw.githubusercontent.com/ToyoDAdoubiBackup/doubi/master/aria2.sh && chmod +x aria2.sh && bash aria2.sh
  • 启动:service aria2 start
  • 停止:service aria2 stop
  • 重启:service aria2 restart
  • 查看状态:service aria2 status
  • 配置文件:/root/.aria2/aria2.conf(配置文件包含中文注释,但是一些系统可能不支持显示中文)
  • 下载目录:/usr/local/caddy/www/aria2/Download
Comments