cloudreve 網盤搭建


之前活動的時候搞了一台aliyun ecs  centos7 1核1G的,閑着也是閑着  搭建一下雲盤下面開始操作:

 

1、下載壓縮包cloudreve_3.4.2_linux_amd64.tar.gz 地址:https://github.com/cloudreve/Cloudreve/releases

2、扔到ecs上 /usr/local

3、敲命令如下

# 解壓程序包 tar -zxvf cloudreve_VERSION_OS_ARCH.tar.gz # 賦予執行權限 chmod +x ./cloudreve # 啟動 Cloudreve ./cloudreve

3、把初始的系統管理員用戶名密碼記錄下來  只有第一次啟動會打印這個  一定要記下來啊

 

4、訪問http://服務器IP:5212  頁面長這樣 就ok了

 

 5、用系統管理員登錄 就可以玩了

 

 6、配置后台運行

在/usr/lib/systemd/system目錄下創建一個服務cloudreve.service

通過vi打開服務配置:vi /usr/lib/systemd/system/cloudreve.service

輸入如下內容:

[Unit]
Description=Cloudreve
Documentation=https://docs.cloudreve.org
After=network.target
Wants=network.target

[Service]
Type=simple
WorkingDirectory=/usr/local/  #所在目錄
ExecStart=/usr/local/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

 

 最后:如果忘記初始管理員密碼,需要刪除同級目錄下的cloudreve.db,重新啟動主程序以初始化新的管理員賬戶
默認監聽5212端口  記得關閉防火牆 開啟5212端口

 cloudreve github地址:https://github.com/cloudreve/Cloudreve

參考:https://blog.csdn.net/longzhoufeng/article/details/108958091


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM