Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How does linux set tomcat self-startup?

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly introduces the method of setting tomcat self-startup in linux in detail, the sample code and steps in this article are very detailed, zero foundation can also refer to this article, interested friends can refer to it.

1. Create a new tomcat file vim / etc/init.d/tomcat under / etc/init.d/ and write the following script #! / bin/bash#description: start stop restart#processname: Tomcat#chkconfig: 234 20 80export JAVA_HOME=/usr/local/javaCATALINA_HOME=/usr/local/tomcat-xxxxxcase $1 in start) sh $CATALINA_HOME/bin/startup.sh Stop) sh $CATALINA_HOME/bin/shutdown.sh;; restart) sh $CATALINA_HOME/bin/shutdown.sh sh $CATALINA_HOME/bin/startup.sh *) echo 'please use: tomcat {start | stop | restart}' Esacexit 0 II, grant tomcat file permissions chmod + x / etc/init.d/tomcat 3, configure boot startup: service tomcat start stop: service tomcat stop restart: service tomcat restartchkconfig-- add tomcatchkconfig tomcat on shutdown tomcat service self-start: chkconfig tomcat off delete tomcat service management on chkconfig: chkconfig-del tomcat

What is described above is the method of setting tomcat self-startup by linux, and the specific usage needs to be used by everyone through hands-on experiments. If you want to know more about it, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report