即使在/etc/default/tomcat9 文件中更改后,Tomcat9 仍会在用户 tomcat9 下继续运行 [英] Tomcat9 keep running under user tomcat9 even after change in /etc/default/tomcat9 file

查看:30
本文介绍了即使在/etc/default/tomcat9 文件中更改后,Tomcat9 仍会在用户 tomcat9 下继续运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用一个不同于默认的用户运行 tomcat9,并在网上搜索,我发现我可以在文件 /etc/default/tomcat 中配置它.在这个文件中,我使用 TOMCAT9-USERTOMCAT9_GROUP 更改行,并更改为我希望 tomcat9 在其下运行的所需用户和组.之后,我停止了tomcat,并重新启动(我也尝试过重新启动),但是当我运行ps -ef时,tomcat仍然显示在用户tomcat下运行.我在这里做错了什么?还有其他文件需要修改吗?

I want run tomcat9 with a user different from the default, and searching the web, I found out that I can configure this in the file /etc/default/tomcat. In this file, I change the lines with TOMCAT9-USER and TOMCAT9_GROUP and change to the desired user and group I wish tomcat9 was running under. After that, I stop tomcat, and start again (I've trie restart too), but when I run ps -ef, tomcat still is displayed running under user tomcat. What I am doing wrong here? Is there any other file I need modify?

推荐答案

我发现了问题.对于 ubuntu,显然没有使用文件 /etc/default/tomcat9;我设法使用以下命令更改了我想要的配置:systemctl edit --full tomcat9.service,它编辑文件 /etc/systemd/system/tomcat9.service.

I find the problem. With ubuntu, apparently the file /etc/default/tomcat9 is not used; I managed to change the configuration I wanted with the command: systemctl edit --full tomcat9.service, which edits the file /etc/systemd/system/tomcat9.service.

这篇关于即使在/etc/default/tomcat9 文件中更改后,Tomcat9 仍会在用户 tomcat9 下继续运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆