问题描述
发布 Tomcat 8.0.53,当我安装 Tomcat(9.0.30 或 8.5.50)并将其安装为服务(使用 service.bat)时,它会被安装,但登录"为本地服务"而不是本地系统帐户".
Post Tomcat 8.0.53, when I install Tomcat (9.0.30 or 8.5.50) and install it as service (Using service.bat), it gets installed but with "Log on" as "Local Service" instead of "Local System account".
这可以在 windows 中的服务下看到.
This can be seen under services in windows.
因此,当我运行该服务时,应用程序无法读取文件.
Because of this, when I run the service, the application is not able to read a file.
如果我手动转到服务,打开我的服务的属性,然后将登录更改为本地系统"并保存,一切正常.
If I manually go to services, open properties for my service, then change the Log on as "Local System" and save, everything works perfectly.
- 为什么 8.0.53 之后的 tomcat 版本会发生这种情况?
- 如何安装 tomcat 以便将登录身份"设置为LocalSystem"而不是LocalService"?我无法使用
--User
和--Password
等附加参数来完成,如 8.5 和 9.0 文档.
- Why does this happen for tomcat versions post 8.0.53?
- How can tomcat be installed so that it has "Log on as" set to "LocalSystem" instead of "LocalService"? I am not able to do it with additional parameters like
--User
and--Password
as mentioned in the 8.5 and 9.0 documentation.
推荐答案
这似乎是以下问题的结果:55969 和 63310.Commons Daemon 1.2.0 的更新似乎是原因,并且似乎无法在安装过程中修改此设置.
This appears to be a result of these issues: 55969 and 63310. The update to Commons Daemon 1.2.0 seems to be the cause, and it does not appear that one can modify this setting during installation.
但是,之后可以使用以下命令从管理员命令提示符将其设置为本地系统:
However, it can be set to Local System afterwards from an administrator command prompt with the following command:
sc config Tomcat8 obj=LocalSystem
这篇关于Tomcat 服务随“本地服务"一起安装帐户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!