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