Install and configure Tomcat-7 in CentOS6.3

Source: Internet
Author: User
Installation Instructions installation environment: CentOS-6.3 installation method: Source code installation software: apache-tomcat-7.0.29.tar.gz: http://tomcat.apache.org/download-70.cgiinstallation before the lifting system has been installed jdk6+, security

Installation Instructions
Installation environment: CentOS-6.3
Installation method: Source code installation
Software: apache-tomcat-7.0.29.tar.gz
: Http://tomcat.apache.org/download-70.cgi

Prerequisites 

The system must have JDK6 + installed, see install and configure the CentOS-6.3 in the JDK-7.

Install tomcat
Upload the apache-tomcat-7.0.29.tar.gz file to/usr/local and perform the following operations:

 

Copy codeThe code is as follows:
[Root @ admin local] # cd/usr/local
[Root @ admin local] # tar-zxv-f apache-tomcat-7.0.29.tar.gz // Unzip the package
[Root @ admin local] # rm-rf apache-tomcat-7.0.29.tar.gz // delete compressed package
[Root @ admin local] # mv apache-tomcat-7.0.29 tomcat

 

Start Tomcat

Perform the following operations:
 

Copy codeThe code is as follows:
[Root @ admin ~] #/Usr/local/tomcat/bin/startup. sh // start tomcat
Using CATALINA_BASE:/usr/local/tomcat
Using CATALINA_HOME:/usr/local/tomcat
Using CATALINA_TMPDIR:/usr/local/tomcat/temp
Using JRE_HOME:/usr/java/jdk1.7.0/jre
Using CLASSPATH:/usr/local/tomcat/bin/bootstrap. jar:/usr/local/tomcat/bin/tomcat-juli.jar

 

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

Open Firewall port 8080

Add port 8080 to the firewall configuration and perform the following operations:
[Root @ admin ~] # 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
[Root @ admin java] # service iptables restart
Verify Tomcat installation and running

Check whether tomcat is running properly at the following address:
Http: // 192.168.15.231: 8080/
The tomcat System interface is displayed, indicating that the installation is successful!

Stop Tomcat
[Root @ admin ~] #/Usr/local/tomcat/bin/shutdown. sh // stop tomcat

Turn: http://www.jb51.net/ OS /RedHat/73032.html


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.