반응형

I 리눅스(Linux) CentOS 7 ─ tomcat 9 서비스 등록

Oracle VM VirtualBox

CentOS-7-x86_64-Minimal-1804.iso

Oracle JDK (jdk-8u251-linux-x64.tar.gz)

apache-tomcat-9.0.29.tar.gz

 

 

I /etc/profile

 

export CATALINA_HOME=/prod/tomcat9/apache-tomcat-9.0.29
cs

 

 

 

I tomcat.service 등록

 

경로

 

/usr/lib/systemd/system
cs

 

 

vim tomcat.service
cs

 

 

[Unit]
Description=tomcat9
After=network.target syslog.target
 
[Service]
Type=forking
 
Environment=JAVA_HOME=/usr/local/workspace/jdk1.8.0_251
User=root
Group=root
 
ExecStart=/prod/tomcat9/apache-tomcat-9.0.29/bin/startup.sh
ExecStp=/prod/tomcat9/apache-tomcat-9.0.29/bin/shutdown.sh
 
UMask=007
RestartSec=10
Restart=always
 
SuccessExitStatus=143
 
[Install]
WantedBy=multi-user.target
cs

 

 

I tomcat.service 실행

 

반응형