安装cloudreve
linux安装cloudreve
安装cloudreve
上传文件至服务器
解压
tar -zxvf cloudreve_3.5.3_linux_amd64.tar.gz
增加执行权限
chmod +x ./cloudreve
启动cloudreve
./cloudreve
访问IP:5212
配置自动开启
编辑配置文件
vim /usr/lib/systemd/system/cloudreve.service
[Unit]
Description=Cloudreve
Documentation=https://docs.cloudreve.org
After=network.target
After=mysqld.service
Wants=network.target
[Service]
WorkingDirectory=/cloudreve
ExecStart=/cloudreve/cloudreve
Restart=on-abnormal
RestartSec=5s
KillMode=mixed
StandardOutput=null
StandardError=syslog
[Install]
WantedBy=multi-user.target
更新配置
systemctl daemon-reload
启动服务
systemctl start cloudreve
设置开机启动
systemctl enable cloudreve
更改默认的管理员邮箱和密码:
点击右上角的用户头像,管理面板,用户
更改默认的1G存储空间:
管理面板,用户组,编辑初始容量
安装 Aria2 离线下载
Aria2 github地址:https://github.com/P3TERX/aria2.sh
mkdir -p /aria2/download
cd /aria2
wget -N --no-check-certificate https://cos.CDN.azpay.cn/uploads/2021/11/13/aria2.sh && chmod +x aria2.sh && bash aria2.sh
输入1,安装,安装完之后输入./aria2,选择7,修改配置,修改aria2密码和下载地址,修改下载地址为/aria2/download。
进入cloudreve,管理面板-离线下载节点,编辑
测试一下
bt任务进度一直100%解决办法:
修改aria2配置文件
# 做种分享率, 0为一直做种, 默认:1.0
seed-ratio=1.0
# 作种时间大于30分钟,则停止作种,设为0可以任务完成后不做种
seed-time=30
安装mysql
sudo apt update
sudo apt install mysql-server
运行安全脚本
sudo mysql_secure_installation
报错
Failed! Error: SET PASSWORD has no significance for user 'root'@'localhost' as the authentication method used doesn't store authentication data in the MySQL server. Please consider using ALTER USER instead if you want to change authentication parameters.
mysql
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password by 'mynewpassword';
回到终端输入
sudo mysql_secure_installation
全部选择n
修改cloudreve文件夹下的conf.ini,添加以下内容
[Database]
Type = mysql
Port = 3306
User = root
Password = root
Host = 127.0.0.1
Name = cloudreve
TablePrefix = cd
Charset = utf8
DBFile = cloudreve.db
重置admin@cloudreve.org密码
./cloudreve --database-script ResetAdminPassword
解决mysql无法远程登录
vim /etc/mysql/mysql.conf.d/mysqld.cnf
将下面内容注释掉
bind-address = 127.0.0.1
重启mysql服务
service mysql restart
mysql
use mysql
update user set host = '%' where user ='root';
flush privileges;
配置redis
sudo apt update
sudo apt install redis-server
配置Redis密码
vim /etc/redis/redis.conf
找到 # requirepass foobared,将#去掉,foobared改成想设的密码
systemctl restart redis
添加以下内容
[Redis]
Server = 127.0.0.1:6379
Password =
DB = 0
使用中的问题:
1.文件移动后不会改变真实路径
2.不通过网页,直接后台上传文件是无法识别的,文件目录存储在数据库中
License:
CC BY 4.0