项目地址:https://github.com/lidalao/ServerStatus

安装docker,docker-compose

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#安装docker
wget -qO- get.docker.com | bash
#检验docker安装成功
docker -v
#启动docker
systemctl enable docker
#安装docker-compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
#添加可执行权限:x
sudo chmod +x /usr/local/bin/docker-compose
#在/usr/bin/路径下创建软连接
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
#检验docker-copose安装成功
docker-compose --version

新建sss文件夹,下载ServerStatus源码安装

1
2
3
4
5
mkdir -p ~/data/docker_data/sss

cd ~/data/docker_data/sss

wget --no-check-certificate https://raw.githubusercontent.com/lidalao/ServerStatus/master/sss.sh && chmod +x ./sss.sh && sudo ./sss.sh YOUR_TG_CHAT_ID YOUR_TG_BOT_TOKEN

注意替换YOUR_TG_CHAT_ID和YOUR_TG_BOT_TOKEN 如果没有Telegram的话,不带这俩参数也可以

web服务地址http://ip:8081