Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install and configure Tomcat-7 in CentOS 6.3

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains how to install and configure Tomcat-7 in CentOS 6.3.The explanation in this article is simple, clear and easy to learn and understand. please follow the editor's train of thought to study and learn "how to install and configure Tomcat-7 in CentOS 6.3".

Installation instructions

Installation environment: CentOS-6.3

Installation method: source code installation

Software: apache-tomcat-7.0.29.tar.gz

Download address: http://tomcat.apache.org/download-70.cgi

Installation premise

The system must be installed and configured JDK6+, installation please refer to: install and configure JDK-7 in CentOS-6.3.

Install tomcat

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

The code is as follows:

[root@admin local] # cd / usr/local

[root@admin local] # tar-zxv-f apache-tomcat-7.0.29.tar.gz / / decompress the package

[root@admin local] # rm-rf apache-tomcat-7.0.29.tar.gz / / Delete a compressed package

[root@admin local] # mv apache-tomcat-7.0.29 tomcat

Start Tomcat

Do the following:

The 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 message indicates that it has been started successfully.

Firewall opens port 8080

Add port 8080 to the firewall configuration, do the following:

[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 the firewall

[root@admin java] # service iptables restart

Verify Tomcat installation and operation

Check to see if tomcat is working properly at the following address:

Http://192.168.15.231:8080/

See the tomcat system interface, indicating that the installation is successful!

Stop Tomcat

[root@admin ~] # / usr/local/tomcat/bin/shutdown.sh / / stop tomcat

Thank you for your reading, the above is the content of "how to install and configure Tomcat-7 in CentOS 6.3". After the study of this article, I believe you have a deeper understanding of how to install and configure Tomcat-7 in CentOS 6.3. the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report