安裝指令碼
此 shell 指令碼僅適用於 Linux 作業系統。如果您使用的是其他作業系統,請參考 快速入門 指南進行手動安裝或使用 Docker。
安裝或升級
install.sh install
安裝或更新 Nginx UI。
用法
shell
install.sh install [OPTIONS]
選項
選項 | |
---|---|
-l, --local <file> | 從本機檔案安裝 Nginx UI (string ) |
-p, --proxy <url> | 透過代理伺服器下載 (string )例如: -p http://127.0.0.1:8118 或 -p socks5://127.0.0.1:1080 |
-r, --reverse-proxy | 透過反向代理伺服器下載 (string )例如: -r https://cloud.nginxui.com/ |
-c, --channel <channel> | 指定版本通道 (string )可用通道: stable (預設)、prerelease 、dev |
版本通道
通道 | 說明 |
---|---|
stable | 最新穩定版本(預設) - 建議用於正式環境 |
prerelease | 最新預發布版本 - 包含正在測試的新功能,將在穩定版本發布前進行驗證 |
dev | 來自 dev 分支的最新開發構建 - 包含最新功能但可能不穩定 |
快速使用
shell
# 安裝最新穩定版本
bash -c "$(curl -L https://cloud.nginxui.com/install.sh)" @ install
shell
# 安裝最新預發布版本
bash -c "$(curl -L https://cloud.nginxui.com/install.sh)" @ install --channel prerelease
shell
# 安裝最新開發構建
bash -c "$(curl -L https://cloud.nginxui.com/install.sh)" @ install --channel dev
安裝指令碼預設的監聽連接埠為 9000
,HTTP Challenge 連接埠預設為 9180
。如果出現連接埠衝突請修改 /usr/local/etc/nginx-ui/app.ini
, 並使用 systemctl restart nginx-ui
重啟 Nginx UI 守護行程。更多有關資訊,請檢視 設定參考。
解除安裝
install.sh remove
解除安裝 Nginx UI。
用法
shell
install.sh remove [OPTIONS]
選項
選項 | |
---|---|
--purge | 刪除所有 Nginx UI 檔案,包括日誌、設定等 (boolean ) |
快速使用
shell
# 解除安裝 Nginx UI 但保留設定和資料庫檔案
bash -c "$(curl -L https://cloud.nginxui.com/install.sh)" @ remove
shell
# 解除安裝並刪除所有 Nginx UI 檔案,包括設定和資料庫檔案
bash -c "$(curl -L https://cloud.nginxui.com/install.sh)" @ remove --purge
幫助
install.sh help
顯示可用選項。
用法
shell
install.sh help
快速使用
shell
bash -c "$(curl -L https://cloud.nginxui.com/install.sh)" @ help
控制服務
透過此指令碼,Nginx UI 將作為服務安裝。安裝指令碼會檢測您系統的服務管理器並設置相應的服務控制機制。
Systemd
如果您的系統使用 systemd,請使用以下 systemctl
指令控制:
shell
systemctl start nginx-ui
shell
systemctl stop nginx-ui
shell
systemctl restart nginx-ui
shell
systemctl status nginx-ui
shell
systemctl enable nginx-ui
OpenRC
如果您的系統使用 OpenRC,請使用以下 rc-service
指令控制:
shell
rc-service nginx-ui start
shell
rc-service nginx-ui stop
shell
rc-service nginx-ui restart
shell
rc-service nginx-ui status
shell
rc-update add nginx-ui default
Init.d
如果您的系統使用傳統的 init.d 指令碼,請使用以下指令控制:
shell
/etc/init.d/nginx-ui start
shell
/etc/init.d/nginx-ui stop
shell
/etc/init.d/nginx-ui restart
shell
/etc/init.d/nginx-ui status