Installation and configuration in CentOS 7 JDK8
Installing Tomcat
The apache-tomcat-8.0.14.tar.gz file is uploaded to/usr/local to perform the following actions:
- [Root@localhost ~]# cd/usr/local
- [Root@localhost ~]# tar-zxv-f apache-tomcat-8.0. 14.tar.gz //Unpacking the Compression pack
- [Root@localhost ~]# rm-rf apache-tomcat-8.0. 14.tar.gz //Delete a compressed package
- [Root@localhost ~]# mv apache-tomcat-8.0. 14.tar.gz
Perform the following actions:
[Java]View Plaincopy
- [Root@localhost ~]#/soft/tomcat02/bin/startup.sh
Shown below, it represents a 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. Firewall open 8080 port add 8080 port to the firewall configuration, do the following:
[Java]View Plaincopy
- [Root@localhost ~]# vi +/etc/sysconfig/iptables</span>
#增加以下代码
-A rh-firewall-1-input-m state--state new-m tcp-p TCP--dport 8080-j ACCEPT
Restarting the firewall
[Java]View Plaincopy
- [Root@localhost ~]# service iptables restart</span>
Check Tomcat installation Run
See if Tomcat is working properly with the following address:
http://127.0.0.1:8080/
See the Tomcat system interface to show that the installation was successful!
Stop Tomcat
[Java]View Plaincopy
- [Root@localhost ~]#/usr/local/tomcat/bin/shutdown.sh //Stop tomcat</span>
Installing and configuring the Tomcat-8 method in CentOS 7