Installation Instructions installation environment: CentOS-7 installation method: Source code installation software: apache-tomcat-8.0.14.tar.gz: License.
Installation Instructions
Installation environment: CentOS-7
Installation method: Source code installation
Software: apache-tomcat-8.0.14.tar.gz
: Http://tomcat.apache.org/download-80.cgi
Prerequisites
You must have installed and configured JDK 6 +. for installation instructions, see install and configure JDK 8 in CentOS 7.
Install tomcat
Upload the apache-tomcat-8.0.14.tar.gz file to/usr/local and perform the following operations:
[Java]View plaincopy
- [Root @ localhost ~] # Cd/usr/local
- [Root @ localhost ~] # Tar-zxv-f apache-tomcat-8.0.14.tar.gz // extract the compressed package
- [Root @ localhost ~] # Rm-rf apache-tomcat-8.0.14.tar.gz // delete package
- [Root @ localhost ~] # Music apache-tomcat-8.0.14.tar.gz
Start TOMCAT
Perform the following operations:
[Java]View plaincopy
- [Root @ localhost ~] #/Soft/tomcat02/bin/startup. sh
If the following information is displayed, the operation is successful.
Using CATALINA_BASE:/soft/tomcat02
Using CATALINA_HOME:/soft/tomcat02
Using CATALINA_TMPDIR:/soft/tomcat02/temp
Using JRE_HOME :/
Using CLASSPATH:/soft/tomcat02/bin/bootstrap. jar:/soft/tomcat02/bin/tomcat-juli.jar
Tomcat started. open port 8080 in the firewall and add port 8080 to the firewall configuration. perform the following operations:
[Java]View plaincopy
- [Root @ localhost ~] # 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
[Java]View plaincopy
- [Root @ localhost ~] # Service iptables restart
Verify Tomcat installation and running
Check whether tomcat is running properly at the following address:
Http: // 127.0.0.1: 8080/
The tomcat System interface is displayed, indicating that the installation is successful!
Stop Tomcat
[Java]View plaincopy
- [Root @ localhost ~] #/Usr/local/tomcat/bin/shutdown. sh // stop tomcat