Configure multiple Tomcat servers to run simultaneously in CentOS

Source: Internet
Author: User

Configure multiple Tomcat servers to run simultaneously in CentOS

First, install JDK in CentOS and download Tomcat. I use apache-tomcat-7.0.50 and do not need to configure environment variables such as CATALINA_2_BASE and CATALINA_2_HOME.

Decompress tomcat to two different linux folders, and then open the server. xml file under the conf file to modify and close the port and start the port. In this way, two tomcat servers can be run simultaneously in linux. Running more tomcat methods is the same.

<Server port ="
"Shutdown =" SHUTDOWN ">
<Connector port ="
& Quot; protocol = & quot; HTTP/1.1 & quot"
ConnectionTimeout = "20000"
RedirectPort = "8443" type = "regxph" text = "yourobjectname"/>
<Connector port ="
"Protocol =" AJP/1.3 "redirectPort =" 8443 "/>

After the service is started, the web page may not be opened. iptables may block the port.

1. Linux Firewall (Iptables) restarts the system to take effect

Enable: chkconfig iptables on

Close: chkconfig iptables off

2. the Linux Firewall (Iptables) takes effect immediately and becomes invalid after restart.

Enable: service iptables start

Disable: service iptables stop

You can use the preceding command to enable or disable other services in Linux.

When Linux Firewall (Iptables) is enabled, set ports 25 and 110 as follows,

Modify the/etc/sysconfig/iptables file and add the following content:

-A RH-Firewall-1-INPUT-m state -- state NEW-p tcp-m tcp -- dport 25 -- syn-j ACCEPT

-A RH-Firewall-1-INPUT-m state -- state NEW-p tcp-m tcp -- dport 110 -- syn-j ACCEPT

Install JDK 1.8.0 _ 25 on Ubuntu 14.04 and configure Environment Variables

Install Oracle JDK 14.04 on Ubuntu 1.8 LTS

CentOS6.3 install JDK and environment Configuration

Install JDK + Tomcat in RedHat Linux 5.5 and deploy Java Projects

Tomcat authoritative guide (second edition) (Chinese/English hd pdf + bookmarks)

Tomcat Security Configuration and Performance Optimization

How to Use Xshell to view Tomcat real-time logs with Chinese garbled characters in Linux

Install JDK and Tomcat in CentOS 64-bit and set the Tomcat Startup Procedure

Install Tomcat in CentOS 6.5

Tomcat details: click here
Tomcat: click here

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.