CentOS-6.5 installation configuration tomcat-7

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.cgi

Prerequisites

The system must have jdk6 + installed and configured. If not, see CentOS-6.3 installation configuration JDK-7.

Install Tomcat

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

[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:

[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 preceding printed 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:

[[Email protected] ~] # 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

[[Email protected] 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. Congratulations, the installation is successful!

Stop Tomcat

[[Email protected] ~] #/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.