首页 » 后端 » Apache » 正文

CentOS7 systemd 修改 tomcat 运行身份

发布者:站点默认
2017/05/23 浏览数(1,163) 分类:Apache, CentOS/RockyLinux CentOS7 systemd 修改 tomcat 运行身份已关闭评论

vi /etc/systemd/system/multi-user.target.wants/tomcat.service

# Systemd unit file for default tomcat
#
# To create clones of this service:
# DO NOTHING, use tomcat@.service instead.

[Unit]
Description=Apache Tomcat Web Application Container
After=syslog.target network.target

[Service]
Type=simple
EnvironmentFile=/etc/tomcat/tomcat.conf
Environment="NAME="
EnvironmentFile=-/etc/sysconfig/tomcat
ExecStart=/usr/libexec/tomcat/server start
SuccessExitStatus=143
User=tomcat
Group=tomcat

[Install]
WantedBy=multi-user.target
systemctl restart tomcat
点击返回顶部
  1. 留言
  2. 联系方式