Installation instructions
Installation environment: CentOS-6.3
Installation Method: source code Installation
Software: apache-tomcat-7.0.29.tar.gz
: Http://tomcat.apache.org/download-70.cgi
Prerequisites
The system must have jdk6 + installed and configured. If not, see CentOS-6.3 installation configuration JDK-7.
Install Tomcat
Upload the apache-tomcat-7.0.29.tar.gz file to/usr/local and perform the following operations:
[Root @ admin local] # cd/usr/local [Root @ admin local] # tar-zxv-F apache-tomcat-7.0.29.tar.gz // unzip the package [Root @ admin local] # rm-RF apache-tomcat-7.0.29.tar.gz // Delete compressed package [Root @ admin local] # mv APACHE-Tomcat-7.0.29 Tomcat |
Start Tomcat
Perform the following operations:
[Root @ admin ~] #/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 preceding printed information indicates that the instance has been started successfully.
Open firewall port 8080
Add port 8080 to the firewall configuration and perform the following operations:
[[Email protected] ~] # Vi +/etc/sysconfig/iptables # Add the following code -A RH-Firewall-1-INPUT-M state -- state new-m tcp-p tcp -- dport 8080-J accept |
Restart Firewall
[[Email protected] Java] # service iptables restart |
Verify tomcat installation and running
Check whether Tomcat is running properly at the following address:
Http: // 192.168.15.231: 8080/ |
The Tomcat System Interface is displayed. Congratulations, the installation is successful!
Stop Tomcat
[[Email protected] ~] #/Usr/local/tomcat/bin/shutdown. Sh // stop Tomcat |