AI 翻訳
この記事はAIを通じて英語から日本語に翻訳されました。原文を表示
cloudreve PHP ファイル共有サービスの迅速な構築
一、GitHubからプログラムのバージョンをダウンロードしてください:https://github.com/cloudreve/Cloudreve/releases
次に、サーバー上で解凍し、以下のコマンドを入力してください:
# 解凍したメインプログラムを取得する
tar -zxvf プログラム名.tar.gz
# 実行権限を付与する
chmod +x ./cloudreve
# Cloudreveを起動する
./cloudreve
Cloudreveはデフォルトでポート5212をリッスンします。ブラウザでhttp://IP:5212にアクセスしてCloudreveに入ることができます。(Baotaはポート5212を解放し、リバースプロキシを設定して直接ドメインでアクセスできるようにしてください)
二、起動時に自動起動するように設定する
# 設定ファイルを編集する
vim /usr/lib/systemd/system/cloudreve.service
以下のPATH_TO_CLOUDREVEをプログラムがあるディレクトリに置き換えてください:
[Unit]
Description=Cloudreve
Documentation=https://docs.cloudreve.org
After=network.target
Wants=network.target
[Service]
WorkingDirectory=/PATH_TO_CLOUDREVE
ExecStart=/PATH_TO_CLOUDREVE/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
<br>管理コマンド:<br/>
<br># サービスを起動する<br/>
systemctl start cloudreve
# サービスを停止する
systemctl stop cloudreve
# サービスを再起動する
systemctl restart cloudreve
# ステータスを確認する
systemctl status cloudreve