如何使用 Wix ServiceInstall 标签将 Tomcat 6 安装为服务?

发布于 2024-08-20 05:43:25 字数 1459 浏览 2 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

那伤。 2024-08-27 05:43:25

Windows Installer 需要带有 ServiceInstall 元素的组件的 KeyPath,而不是作为服务的文件。换句话说,您必须使用 KeyPath="yes" 标记 Tomcat 6 服务可执行文件(tomcat.exe?)File 元素。然后将 ServiceInstall 元素放在同一个组件中。

如果您不自己安装 Tomcat 6 服务可执行文件,那么您必须转向自定义操作。请记住使用自定义操作来考虑修复/升级/卸载/修补和回滚所有这些。自定义操作需要大量工作。

The Windows Installer requires the KeyPath of the Component with a ServiceInstall element ot be the file that is the service. Said a different way, you must mark the Tomcat 6 service executable (tomcat.exe?) File element with KeyPath="yes". Then put the ServiceInstall element in the same Component.

If you are not installing the Tomcat 6 service executable yourself then you do have to turn to a custom action. Remember with a custom action to think about repair/upgrade/uninstall/patching and rollback for all that. Custom actions are a lot of work.

凉墨 2024-08-27 05:43:25

除了 ServiceInstall 标记之外,您还需要手动添加一些注册表项。这是因为 Tomcat 使用 Procrun 作为服务运行。

您可以尝试使用 service.bat 安装服务并检查以下位置的注册表项:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\
HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\ProcRun 2.0\

供参考:
commons.apache.org/proper/commons-daemon/procrun.html

In addition to the ServiceInstall tag, you will need to manually add a few Registry keys. This is because Tomcat uses Procrun to run as service.

You can try installing the service using service.bat and inspect the registry keys in:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\
HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\ProcRun 2.0\

For reference:
commons.apache.org/proper/commons-daemon/procrun.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文