18

安装一个 Rust 版 ServerStatus 云探针

 1 year ago
source link: https://yjyj.net/learn/6377.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

安装一个服务器端:

# for CentOS/Debian/Ubuntu x86_64
mkdir -p /opt/ServerStatus && cd /opt/ServerStatus
# apt install -y unzip / yum install -y unzip
wget --no-check-certificate -qO one-touch.sh 'https://raw.githubusercontent.com/zdz/ServerStatus-Rust/master/one-touch.sh'
bash -ex one-touch.sh
# 部署完毕,打开 http://127.0.0.1:8080/ 或 http://<你的IP>:8080/
  • 需要注意, 修改 /etc/systemd/system/stat_client.service 文件,将IP改为你服务器的IP或你的域名

相关命令:

# 启动
systemctl start stat_server
systemctl start stat_client

# 状态查看
systemctl status stat_server
systemctl status stat_client

# 使用以下命令开机自启
# systemctl enable stat_server
# systemctl enable stat_client

# 停止
# systemctl stop stat_server
# systemctl stop stat_client

一键部署客户端

# 对应配置文件 config.toml 的 hosts
# stat_client 一键安装命令
curl -sSLf "https://yourdomain/i?pass=p1&uid=h1&vnstat=1" | bash

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK