中文文档
准备
- GitHub账户
- 宝塔面板
- 一个域名
开始之前,请先确定你搭建探针的域名
比如说vps.ssyyy.com
作为面板的域名,还有一个vpsip.ssyyy.com
是用来记录面板服务器的IP
1.GitHub相关
新建OAuth App
首先打开:https://github.com/settings/developers,然后点击New OAuth App按钮。
记录下OAuth Apps的Client ID和Client secrets
git认证
Homepage URL:http://你的域名:8008
Authorization callback URL:http://你的域名:8008/oauth2/callback
宝塔中反代开SSL后:
Homepage URL:https://你的域名
Authorization callback URL:https://你的域名/oauth2/callback
git账号创建新的登录验证
Client ID
4a254ed12c9b2e8270f8
Client secrets
87e0af5bdc92c963b07a50b15c763cd798d96b45
2.探针脚本相关
哪吒探针官方脚本
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh
sudo ./nezha.sh #国外机
curl -L https://cdn.jsdelivr.net/gh/naiba/nezha@master/script/install.sh -o nezha.sh && chmod +x nezha.sh CN=true
sudo ./nezha.sh #国内机
作者源GitHub地址
https://github.com/naiba/nezha
3.机器人报警相关
电报机器人创建者
@BotFather
电报查找我的数字id
@userinfobot
机器人密钥
5879413861:AAF9C-8KYpcKj3xs7ApMUD1BicA6AyGkpuk
我的电报ID
5988328248
报警url代码
https://api.telegram.org/bot5879413861:AAF9C-8KYpcKj3xs7ApMUD1BicA6AyGkpuk/sendMessage?chat_id=5988328248&text=#NEZHA#
报警规则(每隔10秒检测一次)
[{"Type":"offline","Duration":10}]
4.宝塔界面相关
Centos安装宝塔面板脚本:
yum install -y wget && wget -O install.sh http://v7.hostcli.com/install/install_6.0.sh && sh install.sh
ubuntu安装宝塔面板脚本:
wget -O install.sh http://v7.hostcli.com/install/install-ubuntu_6.0.sh && sudo bash install.sh
放行8888端口命令:
iptables -I INPUT -p tcp –dport 8888 -j ACCEPT
宝塔中反代代码
location /
{
proxy_pass http://127.0.0.1:8008;
proxy_set_header Host $host;
}
location /ws
{
proxy_pass http://127.0.0.1:8008;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}
location /terminal
{
proxy_pass http://127.0.0.1:8008;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}
如何更新 Dashboard
运行脚本 ./nezha.sh
,选择重启面板并更新