1. Create a new file tomcat.sh and write the above content to the document. Java_home,webserver_path fill in according to the actual situation.
2. CP Tomcat.sh/etc/init.d/tomcat
3.sudo sysv-rc-conf Tomcat on
Check the Tomcat boot settings:
You can also find the start-up of Tomcat starting with s by going directly into the/ETC/RCX.D.
Here is a little more, the start of the S starting point indicates the boot start, the beginning of K indicates that the boot does not start.
4. If you want to cancel boot boot, sysv-rc-conf tomcat off
If you want to start an item to delete tomcat,sysv-rc-conf Tomcat remove
5. Restart the machine.
Check if Tomcat is really listening on the port:
Netstat-nltp|grep <tomcat Port >
6. You can finally manage Tomcat in the following way.
Start:/etc/init.d/tomcat start
Close:/etc/init.d/tomcat stop
No longer need to go to a layer of directories to find startup.sh or catalina.sh.
Tomcat set boot on Linux