Windows Server 2019使用WinSW注册服务自启动
winsw
A wrapper executable that can run any executable as a Windows service, in a permissive license.
项目地址:https://gitcode.com/gh_mirrors/wi/winsw
免费下载资源
·
Nacos为例
1.将WinSW的配置文件sample-minimal.xml和运行文件WinSW.NET461.exe放在Nacos/bin目录下
并将其改名为nacos-service.xml和nacos-service.exe
2.修改xml配置文件
<service>
<!-- ID of the service. It should be unique across the Windows system-->
<id>Nacos</id>
<!-- Display name of the service -->
<name>Nacos</name>
<!-- Service description -->
<description>NacosService</description>
<!-- Path to the executable, which should be started -->
<executable>D:\nacos\bin\startup.cmd</executable>
<arguments>-m standalone</arguments>
<logpath>E:\WinSW\nacos</logpath>
</service>
3.管理员模式下运行cmd注册服务
./nacos-service.exe install
4.启动服务,服务名称为xml中配置的名称
net start Nacos
5.启动成功后看服务列表
GitHub 加速计划 / wi / winsw
11.74 K
1.55 K
下载
A wrapper executable that can run any executable as a Windows service, in a permissive license.
最近提交(Master分支:1 个月前 )
e4cf507b
1 年前
e0d4fcbe
* Update xml-config-file.md
* Update xml-config-file.md
---------
Co-authored-by: Next Turn <45985406+nxtn@users.noreply.github.com> 1 年前
更多推荐
已为社区贡献2条内容
所有评论(0)