Windows server 2012安装nezha后端

Windows server 2012安装nezha后端

Tags
OSS
Published
March 7, 2018
URL
下载
设置环境变量
1. 下载软件后,解压到任意位置,然后按 win+R 打开运行窗口,输入 sysdm.cpl 打开系统属性–高级–环境变量–系统变量–Path–在最后把刚才的 nssm 目录加到最后,注意: 和前面变量之间用半角; 分开
notion image
设置 NSSM
管理员启动 CMD,进入nssm根目录 输入 nssm install <servername>
notion image
弹出 UI,设置如下:
notion image
notion image
-s 地址:端口 -p 密钥 -d
3. 启动服务
此时退回到 CMD 界面,nssm start nezha, 然后按 win+R 打开运行窗口,输入 services.msc,查看是否有叫 nezha 的服务,然后查看启动情况,如果失败了,请查看一下配置是否出错
notion image
1. 加载配置文件
systemctl daemon-reload
1. 启动服务
systemctl enable nezha-agent
systemctl start nezha-agent
1. 查看状态
systemctl status nezha-agent