Installation Instructions
Installation Environment: CentOS-7.0.1406
Installation method: Source Installation
Software: apache-tomcat-7.0.29.tar.gz
: http://tomcat.apache.org/download-70.cgi
Installation Prerequisites
The system must have the configuration jdk6+ installed, please refer to my other article on installing JDK
Installing Tomcat
Upload the apache-tomcat-7.0.29.tar.gz file to the/usr/local to do the following:
The code is as follows:
[Email protected] local]# cd/usr/local
[Email protected] local]# wget http://apache.fayea.com/apache-mirror/tomcat/tomcat-7/v7.0.57/bin/ Apache-tomcat-7.0.57.tar.gz
[[email protected] local]# tar-zxv-f apache-tomcat-7.0.29.tar.gz//Decompression Pack
[[email protected] local]# RM-RF apache-tomcat-7.0.29.tar.gz//Delete compressed package
[Email protected] local]# MV apache-tomcat-7.0.29 Tomcat
Start Tomcat
Perform the following actions:
The code is as follows:
[[email protected] ~]#/usr/local/tomcat/bin/startup.sh//Start Tomcat
Using catalina_base:/usr/local/tomcat
Using Catalina_home:/usr/local/tomcat
Using Catalina_tmpdir:/usr/local/tomcat/temp
Using Jre_home:/usr/java/jdk1.7.0/jre
Using CLASSPATH:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
The above information indicates that the message has been successfully started.
Firewall Open 8080 Port
Add 8080 ports to the firewall configuration and do the following:
[Email protected] ~]# VI +/etc/sysconfig/iptables
#增加以下代码
-A rh-firewall-1-input-m state--state new-m tcp-p TCP--dport 8080-j ACCEPT
Restarting the firewall
[Email protected] java]# service iptables restart
Check Tomcat installation Run
See if Tomcat is working properly with the following address:
1, http://127.0.0.1:8080/or http://localhost:8080/
2, http://192.168.15.231:8080/(have introduced this can be seen, the specific situation is uncertain)
See the Tomcat system interface to show that the installation was successful!
Stop Tomcat
[[email protected] ~]#/usr/local/tomcat/bin/shutdown.sh//Stop Tomcat
Installing TOMCAT7 on Linux CentOS-7.0