使用WinSW将nacos安装为windows服务

1、下载WinSW:https://github.com/winsw/winsw/releases,此处下载WinSW v2.11.0版,以下几个版本都行:

 

 此处使用WinSW-x64.exe

2、将WinSW-x64.exe重命名为nacos-service.exe,并拷贝到nacos根目录

3、在nacos根目录新建一个nacos-service.xml的文件,编码格式为UTF-8,内容如下:

复制代码
 1 <service>
 2   
 3   <!-- ID of the service. It should be unique across the Windows system-->
 4   <id>Nacos2.0.4</id>
 5   <!-- Display name of the service -->
 6   <name>Nacos2</name>
 7   <!-- Service description -->
 8   <description>Nacos2.0.4</description>
 9   <logpath>E:\green\nacos-2.0.4\logs</logpath>
10   <!-- Path to the executable, which should be started -->
11   <executable>E:\green\nacos-2.0.4\bin\startup.cmd</executable>
12   <stopexecutable>E:\green\nacos-2.0.4\bin\shutdown.cmd</stopexecutable>
13   <startmode>Automatic</startmode>
14 </service>
复制代码

4、安装服务nacos-service install

5、删除服务nacos-service uninstall

 

posted @   疯狗强尼  阅读(865)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 使用C#创建一个MCP客户端
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列1:轻松3步本地部署deepseek,普通电脑可用
· 按钮权限的设计及实现
点击右上角即可分享
微信分享提示