美化探针sever-status安装

发布于 2020-08-29  1188 次阅读


阅读前,我假设您已经有一台vps/独立服务器,且应经可以连接ssh

说明:此探针需要自己布置主控端,服务端。并不是uptime-robot api的调用,对服务器有一定要求。如想看api版本的,可以看晓空魔改的api版本。https://blog.moeworld.tech/2020/08/27/uptimestatusrevise-%e4%b8%80%e4%b8%aa%e4%ba%8c%e6%ac%a1%e5%bc%80%e5%8f%91%e7%9a%84%e7%9b%91%e6%8e%a7%e7%be%8e%e5%8c%96%e9%9d%a2%e6%9d%bf/

安装命令如下,登录ssh后逐行执行【括号不要复制】

1.wget https://raw.githubusercontent.com/CokeMine/ServerStatus-Hotaru/master/status.sh 【从github拉取脚本】

2。bash status.sh【启动脚本】

安装后命令如图【这里的系统为centos7】

登录后采用一键脚本安装,方便快捷。感谢可乐大佬提供脚本。

探针github开源地址https://github.com/CokeMine/ServerStatus-Hotaru

自建的网址https://status.moeco.top

后记:执行脚本执行步骤

1选择端口【如图】 请确认开放端口!!!

2开始安装依赖慢慢来

3【最重要】配置web服务端时如有安装nginx,阿帕奇等web服务器请先取消配置。

【配置方法】

1宝塔面板新建网站【示例xxx.example.com】

修改网站目录为/usr/local/ServerStatus/web 【即可使用】

ps宝塔请前往https://bt.cn安装

2ssh法【参考配置】

默认网站根目录为/usr/local/nginx/html,要将它改成/nginx/conf/nginx.conf 将其中的           location / {             root   html;             index  index.php index.html index.htm;         } 改为           location / {             root   /home/www;             index  index.php index.html index.htm;         } 然后再将 location ~ \.php$ {             root           html;             fastcgi_pass   127.0.0.1:9000;             fastcgi_index  index.php;             fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;             include        fastcgi_params;         } 改为 location ~ \.php$ {             root           /home/www;             fastcgi_pass   127.0.0.1:9000;             fastcgi_index  index.php;             fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;             include        fastcgi_params;         } 然后重启nginx 已经安装了samba,所以要将vi /etc/samba/smb.conf中的[public]下的path值改为 path = /home/www/

4配置客户端【请再执行一遍脚本】

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

bash status.sh c

执行后界面如下

注意。。。。。。。。请先在服务端里添加用户名密码,并记下监听端口

安装讲解完毕

特别饿感谢 对本文提供帮助的大佬【部分转载】

可乐博客 https://www.cokemine.com/serverstatus-hotaru.html

cnblogirisrain https://www.cnblogs.com/irisrain/p/4309742.html

感谢逗比大佬的一键脚本

脚本来源 https://www.aptx.xin/serverstatus-hotaru.html

相关开源【转载自可乐大佬】

晓空blog提供的up time robot开源监控魔改 https://blog.moeworld.tech