CentOS-7.0. How to install and configure Tomcat-7 in

Source: Internet
Author: User
Tags gz file

Installation Instructions
Installation Environment: CentOS-7.0.1406
Installation method: Source Installation
Software: apache-tomcat-7.0.29.tar.gz
: http://tomcat.apache.org/download-70.cgi
Installation Prerequisites
The system must have a configuration jdk6+ installed, please refer to: Install and configure JDK-7 in CentOS-6.3.
Installing Tomcat
Upload the apache-tomcat-7.0.29.tar.gz file to the/usr/local to do the following:


The code is as follows:

[Plain] view plaincopyprint?

    1. [Email protected] local]# cd/usr/local
    2. [Email protected] local]# wget http://apache.fayea.com/apache-mirror/tomcat/tomcat-7/v7.0.57/bin/ Apache-tomcat-7.0.57.tar.gz
    3. [[email protected] local]# tar-zxv-f apache-tomcat-7.0.29.tar.gz//Decompression Pack
    4. [[email protected] local]# RM-RF apache-tomcat-7.0.29.tar.gz//Delete compressed package
    5. [Email protected] local]# MV apache-tomcat-7.0.29 Tomcat

Start Tomcat

Perform the following actions:

The code is as follows:

[Plain] view plaincopyprint?

    1. [[email protected] ~]#/usr/local/tomcat/bin/startup.sh//Start Tomcat
    2. Using catalina_base:/usr/local/tomcat
    3. Using Catalina_home:/usr/local/tomcat
    4. Using Catalina_tmpdir:/usr/local/tomcat/temp
    5. Using Jre_home:/usr/java/jdk1.7.0/jre
    6. Using CLASSPATH:/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar

The above information indicates that the message has been successfully started.

Firewall Open 8080 Port
Add 8080 ports to the firewall configuration and do the following:

[Plain] view plaincopyprint?

    1. [Email protected] ~]# VI +/etc/sysconfig/iptables

#增加以下代码

[Plain] view plaincopyprint?

    1. -A rh-firewall-1-input-m state--state new-m tcp-p TCP--dport 8080-j ACCEPT

Restarting the firewall

[Plain] view plaincopyprint?

    1. [Email protected] java]# service iptables restart

Check Tomcat installation Run

See if Tomcat is working properly with the following address:
http://192.168.15.231:8080/
See the Tomcat system interface to show that the installation was successful!

Stop Tomcat

[Plain] view plaincopyprint?

    1. [[email protected] ~]#/usr/local/tomcat/bin/shutdown.sh//Stop Tomcat

CentOS-7.0. How to install and configure Tomcat-7 in

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.