Installing and configuring the Tomcat-8 method in CentOS 7

Source: Internet
Author: User
Tags gz file centos iptables

Command Main reference http://www.jb51.net/os/RedHat/73032.html


Installation Instructions
Installation Environment: CENTOS-7
Installation method: Source Installation
Software: apache-tomcat-8.0.14.tar.gz
Download Address: http://tomcat.apache.org/download-80.cgi


Installation Prerequisites
The system must have a configuration jdk6+ installed, please refer to: Install and configure JDK8 in CentOS 7.

Installing Tomcat
Upload the apache-tomcat-8.0.14.tar.gz file to the/usr/local to do the following:

[Root@localhost ~]# cd/usr/local
[root@localhost ~]# tar-zxv-f apache-tomcat-8.0.14.tar.gz//Decompression Pack
[ Root@localhost ~]# rm-rf apache-tomcat-8.0.14.tar.gz//Delete compressed package
[root@localhost ~]# MV apache-tomcat-8.0.14.tar.gz

Start Tomcat

Perform the following actions:


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:

[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
[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 indicate that the installation was successful.


Stop Tomcat
[Root@localhost ~]#/usr/local/tomcat/bin/shutdown.sh//Stop tomcat</span>


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.