This article assumes that the JDK environment is installed successfully and how to install the JDK refer to this link:
Http://www.cnblogs.com/yoyotl/p/5395208.html
1. Download the Apache installation package, for example, this example downloads the apache-tomcat-7.0.68.tar.gz version.
2. Unzip and install to the specified location, for example, this example is installed in the/usr/local directory.
3. Cp/usr/local/apache-tomcat-7.0.68/bin/catalina.sh/etc/init.d/tomcat
4. Vim/etc/init.d/tomcat, add the following:
1 2345 Ten - 2 #description: Tomcat service 3 4 catalina_home=/usr/local/apache-tomcat-7.0. the 5 Java_home=/usr/bin/jdk1. 7. 0_79
5. Add the Tomcat service to the list of self-initiated services.
Chkconfig--add Tomcat
6. View the commands that Tomcat can perform.
Service Tomcat
7. View the service RunLevel for Tomcat.
Chkconfig--list|grep Tomcat
Tomcat 0: Off 1: Off 2: On 3: On 4: on 5 : On 6: Off
If the resulting 3,4,5 entry is off, it needs to be set to boot from boot.
8. Set up tomcat self-boot.
Chkconfig Tomcat on
Or, run Setup and hit * (space) in front of the Tomcat service option.
Linux setup tomcat boot from