一、NSSM 安装与配置
# 下载最新版(推荐 2.24)PowerShell
Invoke-WebRequest -Uri "https://nssm.cc/release/nssm-2.24.zip" -OutFile "nssm.zip"
Expand-Archive -Path "nssm.zip" -DestinationPath "D:\nssm"
cd D:\nssm\win64
# 安装服务(管理员权限运行)
.\nssm.exe install NacosServe
此时会弹出图形化配置窗口
二、图形界面配置
在配置窗口中按以下顺序设置:(需要自行下载好Nacos并解压)
三、服务管理命令
# 启动服务
Start-Service NacosServer
# 停止服务
Stop-Service NacosServer
# 重启服务
Restart-Service NacosServer
检查端口监听:
Get-NetTCPConnection -LocalPort 8848 | Format-Table -AutoSize
效果图: