Linux搭建Cloudreve
安装Cloudreve
wget https://github.com/cloudreve/Cloudreve/releases/download/3.3.2/cloudreve_3.3.2_linux_amd64.tar.gz
tar -zxvf cloudreve_3.3.2_linux_amd64.tar.gz
chmod +x ./cloudreve
./cloudreve
创建后台服务
vi /usr/lib/systemd/system/cloudreve.service
cloudreve.service
[Unit]
Description=Cloudreve
Documentation=https://docs.cloudreve.org
After=network.target
Wants=network.target
[Service]
Type=simple
WorkingDirectory=/root
ExecStart=/root/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
# 启动服务
systemctl start cloudreve
# 停止服务
systemctl stop cloudreve
# 重启服务
systemctl restart cloudreve
# 查看状态
systemctl status cloudreve
版权申明
本文系作者 @技术狂人张大胆 原创发布在AP135 乐享生活网站点。未经许可,禁止转载。
评论