From 92794c379500956c38fabf6baa2f621bc016fe23 Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 21 Jul 2025 21:47:26 +0000 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- %E4%BD%BF%E7%94%A8.md | 52 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 %E4%BD%BF%E7%94%A8.md diff --git a/%E4%BD%BF%E7%94%A8.md b/%E4%BD%BF%E7%94%A8.md new file mode 100644 index 0000000..d3f5b3a --- /dev/null +++ b/%E4%BD%BF%E7%94%A8.md @@ -0,0 +1,52 @@ +# 使用 + +## 源代码运行 +**运行环境要求** +- node 18+ +- git +- systemd (可选) + +1. 拉取代码:`git clone github.com/bretren/status.git` +2. 运行代码:`node server.js` +3. 持久化运行: + - `sudo nano /etc/systemd/system/status.service` + - ``` + [Unit] + Description=Pdnode Status Server + After=network.target + + [Service] + Type=simple + User=root + WorkingDirectory=/root/status + ExecStart=/usr/local/bin/node server.js + Restart=always + RestartSec=5 + StandardOutput=syslog + StandardError=syslog + Environment=NODE_ENV=production + + [Install] + WantedBy=multi-user.target + ``` + - ```bash + sudo systemctl daemon-reload + sudo systemctl restart status + sudo systemctl status status + ``` +**教程可能出错,请自行寻找原因。或者查看[常见问题](#qa)** + +## apt安装(仅Linux) +敬请期待 + +## 使用已构建代码安装 +**注意:有时候没有macos版本,请使用其它方法** +1. 前往 `https://github.com/BretRen/status/releases` 下载适合你的系统的最新版 +2. 运行程序 +3. 持久化 - 请自行解决。 + +## Docker安装 +**并不建议使用此方法,此方法并没有得到验证** +github存储库有docker文件请自行构建。 + +(docker文件大概率有错误,建议自建。程序并不复杂) \ No newline at end of file