因为哪吒V0用了很久了,一是习惯,另外是V0通过github验证登录方式也挺安全,如果github开启而不验证,安全程度又高了不少。但是目前V0已经不维护了,仅留了面板的安装脚本,而且目前无法通过V0面板后台一键安装windows的V0版本agent了,因为默认agent脚本404了,所以这里给出一个手动安装agent的方法。
1.nezha面板V0面板脚本(如果已安装可跳过):
| curl -L https://raw.githubusercontent.com/nezhahq/scripts/refs/heads/v0/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh |
2.windows服务器进行agent安装前置设置(使用管理权限的powershell):
| [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Ssl3 -bor [Net.SecurityProtocolType]::Tls -bor [Net.SecurityProtocolType]::Tls11 -bor [Net.SecurityProtocolType]::Tls12;set-ExecutionPolicy RemoteSigned |
3.手动下载20.5的agent安装程序:
| https://github.com/nezhahq/agent/releases/download/v0.20.5/nezha-agent_windows_amd64.zip |
4.手动把agent程序解压到C:\nezha:
5.测试agent的连通性(使用管理权限的powershell,注意:面板那边先添加,这里需要用到密钥):
| C:\nezha\nezha-agent.exe -s anc.com:5555 -p xxxxxxxxx |
6.安装agent(使用管理权限的powershell):
| C:\nezha\nezha-agent.exe service install -s anc.com:5555 -p xxxxxxxxx |
7.启动agent服务(使用管理权限的powershell):
| Start-Service -Name "nezha-agent" |
8.额外补充:
如果你想删除,或者删除之前安装的旧agent,可以使用以下命令。
| Stop-Service -Name "nezha-agent" -ErrorAction SilentlyContinue |
| Remove-Item -Path C:\nezha -Recurse -Force |
如果你想卸载现在agent再重装,比如为了更新主控节点和密钥,使用这个命令。
| C:\nezha\nezha-agent.exe service uninstall |
文章转载自:https://vilark.com/760.html
文章评论