Linux&Windows 安装ServerStatus探针

发布于 2020-10-30  3,017 次阅读


https://github.com/CokeMine/ServerStatus-Hotaru

https://www.cokemine.com/serverstatus-hotaru.html

Linux服务端

wget https://raw.githubusercontent.com/CokeMine/ServerStatus-Hotaru/master/status.sh
bash status.sh s

注意:
有Apache/Nginx环境的,在“是否由脚本自动配置HTTP服务”时,请不要选择默认“Y”,请选择“N”,并自行新建网站并将网站根目录指定为/usr/local/ServerStatus/web。

Linux客户端

apt-get install -y wget
wget https://raw.githubusercontent.com/CokeMine/ServerStatus-Hotaru/master/status.sh
bash status.sh c

Windows客户端

安装环境python,pip,Psutil

python去官网下msi文件安装

https://www.python.org/downloads/windows/

#cd C:\Python27\Scripts
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py #若未安装pip
#“我的电脑”-->“属性”-->“高级系统设置”-->“环境变量”-->“系统变量”-->“Path”-->“编辑”添加python文件夹位置
python get-pip.py
pip install psutil

去下载status-psutil.py放到C:\Python27\Scripts中,并修改status-psutil.py中服务端IP以及在服务端设置好的用户名、密码。
https://raw.githubusercontent.com/CokeMine/ServerStatus-Hotaru/master/clients/status-psutil.py

curl https://raw.githubusercontent.com/CokeMine/ServerStatus-Hotaru/master/clients/status-psutil.py -o status-psutil.py
python status-psutil.py #cd到C:\Python27\Scripts运行

如遇到报错,请参考:

https://blog.csdn.net/qq_36154755/article/details/80974730


Love is merely a madness.