Installation Instructions
Installation Environment: CentOS-7.0.1406
Installation mode: source code installation
Software: apache-tomcat-7.0.29.tar.gz
Download Address: http://tomcat.apache.org/download-70.cgi
Installation Prerequisites
The system must have the configuration jdk6+ installed, please refer to: Install and configure JDK-7 in CentOS-6.3.
Install Tomcat
Upload the apache-tomcat-7.0.29.tar.gz file to the/usr/local and perform the following actions:
The code is as follows:
[Root@admin local]# cd/usr/local
[root@admin local]# wget /v7.0.57/bin/apache-tomcat-7.0.57.tar.gz
[root@admin local]# tar-zxv-f apache-tomcat-7.0.29.tar.gz/Decompression Compression pack
[root@admin local]# rm-rf apache-tomcat-7.0.29.tar.gz//delete zip pack
[Root@admin local]# MV apache-tomcat-7.0.29 Tomcat
Start Tomcat
Perform the following actions:
The code is as follows:
[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 above information appears to have started successfully.
Firewall Open 8080 ports
Add 8080 ports to the firewall configuration and do the following:
[Root@admin ~]# VI +/etc/sysconfig/iptables
#增加以下代码
-A rh-firewall-1-input-m state--state new-m tcp-p TCP--dport 8080-j ACCEPT
Reboot firewall
[Root@admin java]# Service iptables restart
Check Tomcat installation Run
Check to see if Tomcat is functioning at the following address:
http://192.168.15.231:8080/
See the Tomcat system interface to indicate that the installation was successful.
Stop Tomcat
[Root@admin ~]# /usr/local/tomcat/bin/shutdown.sh /Stop Tomcat