In centos, multiple tomcat servers are configured to run simultaneously.
First, install jdk and download tomcat. My name is apache-tomcat-7.0.50. You 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 ="
8005
"Shutdown =" SHUTDOWN "> <Connector port ="
8888
"Protocol =" HTTP/1.1 "connectionTimeout =" 20000 "redirectPort =" 8443 "/> <Connector port ="
8009
"Protocol =" AJP/1.3 "redirectPort =" 8443 "/>
The web page cannot be opened sometimes after startup, which may beIptablesThe port is blocked. The enable and disable iptables.
1. Linux Firewall (Iptables) restarts the system to take effect
2. the Linux Firewall (Iptables) takes effect immediately and becomes invalid after restart.
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: