---
title: "安装一个 Rust 版 ServerStatus 云探针"
url: "https://yjyj.net/learn/6377.html"
author: "小 虾 (生猛大蝦编辑部)"
published_at: "2022-12-28T20:31:55+08:00"
updated_at: "2025-01-19T23:04:20+08:00"
categories: "招数学习"
tags: "CentOS教程, Debian系统, Linux运维, ServerStatus, 探针"
summary: "这篇文章手把手演示如何在 CentOS、Debian、Ubuntu 上安装 Rust 版 ServerStatus 云探针，解决服务器状态监控部署繁琐、客户端配置难的问题。文中给出一键安装、服务启停与开机自启命令，并提醒修改 systemd 配置中的 IP 地址，适合想快速搭建轻量监控面板的运维用户。"
source: "生猛大蝦 (https://yjyj.net)"
---

# 安装一个 Rust 版 ServerStatus 云探针

> 来源：[生猛大蝦 (yjyj.net)](https://yjyj.net/learn/6377.html) · 作者：小 虾 · 发布时间：2022-12-28

## 30 秒核心看点 (TL;DR)

- 一键脚本即可部署 Rust 版 ServerStatus，省去手动编译和繁琐配置。
- 安装后可通过 8080 端口访问面板，关键是把客户端服务里的 IP 改成自己的。
- 支持 systemd 管理，启动、查看状态、开机自启、停止都有现成命令。

### 安装一个服务器端:

```
# 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://: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
```

## 延伸问答与排错指南 (FAQ)

### Rust 版 ServerStatus 怎么快速安装？
先在服务器上创建安装目录并进入目录，再安装 unzip 等基础工具，随后用一键脚本拉取并执行安装。部署完成后即可通过 8080 端口访问面板，适合想快速上线监控的场景。

### 安装后为什么要修改 systemd 配置？
因为客户端服务文件里默认的 IP 需要改成你自己的服务器 IP 或域名，否则客户端可能无法正确连接到服务端。改完后再重载或重启对应服务，配置才会生效。

### ServerStatus 的常用管理命令有哪些？
可用 systemctl start 启动服务，systemctl status 查看状态，systemctl enable 设置开机自启，systemctl stop 停止服务。服务端和客户端分别管理，排障时很方便。

---
更多 Linux 运维、WordPress 性能优化、前端工程化、Shopify 独立站与极客折腾指南：[生猛大蝦全站文章归档 (https://yjyj.net/archive)](https://yjyj.net/archive)
