CentOS7 install and configure Tomcat-8

Source: Internet
Author: User
Tags gz file
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
  1. [Root @ localhost ~] # Cd/usr/local
  2. [Root @ localhost ~] # Tar-zxv-f apache-tomcat-8.0.14.tar.gz // extract the compressed package
  3. [Root @ localhost ~] # Rm-rf apache-tomcat-8.0.14.tar.gz // delete package
  4. [Root @ localhost ~] # Music apache-tomcat-8.0.14.tar.gz

Start TOMCAT

Perform the following operations:

[Java]View plaincopy
  1. [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
  1. [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
  1. [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
  1. [Root @ localhost ~] #/Usr/local/tomcat/bin/shutdown. sh // stop tomcat

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.