1. Tomact Decompression to/usr/local/tomcat
2.vim/usr/local/tomcat/bin/catalina.sh
In OS specific support. Plus (note the Java installation directory)
java_home=/usr/java/jdk1.8.0_161
Jre_home= $JAVA _home/jre
3. Configuring the Tomcat service file
Vi/usr/lib/systemd/system/tomcat.service
Input:
[Unit]
Description=tomcat
After=syslog.target Network.target Remote-fs.target Nss-lookup.target
[Service]
Type=oneshot
execstart=/usr/local/tomcat/bin/startup.sh
execstop=/usr/local/tomcat/bin/shutdown.sh
Execreload=/bin/kill-s HUP $MAINPID
Remainafterexit=yes
[Install]
Wantedby=multi-user.target
4. Allow boot start
Systemctl Enable Tomcat
5. Start, view status, restart, turn off Tomcat
Systemctl Start Tomcat.service
Systemctl Status Tomcat.service
Systemctl Restart Tomcat.service
Systemctl Stop Tomcat.service
Linux CENTOS7 tomcat8 configured as a service startup