Docker-ServerStatus中文版搭建

简介

Github项目地址:https://github.com/lidalao/ServerStatus
Github项目地址:https://github.com/cppla/ServerStatus
ServerStatus中文版是一个云探针、云监控、服务器云监控、多服务器探针~。

环境准备

服务器:腾讯云轻量应用服务器(购买链接)
系统:Debian 10(DD脚本 非必需DD用原来的系统也OK)
域名一枚,并做好解析到服务器上(域名购买、域名解析 视频教程)
安装好Docker、Docker-compose(相关脚本)

Docker搭建

服务端

在docker_data文件夹下创建sss(ServerStatus缩写)文件夹

1
2
3
4
5
6
7
8
9
apt update -y ## 更新软件源

mkdir -p ~/data/docker_data/sss ## 在docker_data文件夹下创建sss文件夹

cd ~/data/docker_data/sss ## 进入文件夹

wget --no-check-certificate -qO ./serverstatus-config.json https://raw.githubusercontent.com/cppla/ServerStatus/master/server/config.json && mkdir ./serverstatus-monthtraffic ## 拉取配置文件

docker run -d --restart=always --name=serverstatus -v ~/serverstatus-config.json:/ServerStatus/server/config.json -v ~/serverstatus-monthtraffic:/usr/share/nginx/html/json -p 80:80 -p 35601:35601 cppla/serverstatus:latest ## docker部署

客户端

1
2
3
4
mkdir ~/data/sss
cd ~/data/sss

wget --no-check-certificate -qO client-linux.py 'https://raw.githubusercontent.com/cppla/ServerStatus/master/clients/client-linux.py' && nohup python3 client-linux.py SERVER={$SERVER} USER={$USER} PASSWORD={$PASSWORD} >/dev/null 2>&1 & ##拉取配置文件