Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hi How can I start two Tomcat instances in a single LINUX machine. Both the tomcat must run on the different ports. If this is possible then How can I do this


share|improve this question

migrated from Jun 25 '10 at 1:06

This question came from our site for professional and enthusiast programmers.

It's very possible, just create two copies of the installation and make sure to edit the TOMCAT_HOME/conf/server.xml in one instance and change the ports so they don't clash. Start each instance with their own TOMCAT_HOME/bin/ script.

The one port you will have to change in one of your Tomcats is the one defined in the port attribute of your <Connector> (8080 here):

<Connector port="8080"
           redirectPort="8443" />
share|improve this answer

Edit the tomcat configuration file (usually server.xml in tomcat\conf) and change the value after the line:


to another port (example 8081).

Read Multiple Tomcat JVM on Jajakarta for more information.

share|improve this answer

You need to start tomcat with different catalina bases. This can be controlled for instance by the CATALINA_BASE environment variable. That variable has to point to a location containing conf, logs, temp, webapps and work subdirectories. Then you can put into the corresponding conf and webapps directories the configurations and webapps you want for the individual instances.

So something along those lines will give you two instances:

SET CATALINA_BASE=/home/tomcat_inst1/
tomcat start
SET CATALINA_BASE=/home/tomcat_inst2/
tomcat start

Of course, as other people wrote, you have to ensure that the listening ports for any connectors are different in each instance.

Also see here:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.