Running multiple tomcat servers

Sarin J S picture Sarin J S · Nov 23, 2011 · Viewed 16.8k times · Source

I have installed tomcat 6 and 7 to the port 8080.

I am using tomcat 6 for deploying my projects in local LAN by loading files from its web apps.

At the same time I am using eclipse ide for developing purpose.

When ever I have to run my project from eclipse using tomcat7, I have to stop the tomcat6.

Is it possible to change the port of tomcat?

What I want is to run both the servers at the same time.

Thanks in advance..

Answer

user1184697 picture user1184697 · Feb 8, 2012

To install two instances of tomcat in this way:

Download tomcat, and unpack it twice, into two separate directories. Edit the conf/server.xml file in one of the copies in the following way: Change the port on the root Server element to a different number (e.g. 8006) Change the port attributes on the Connector elements to a different number (e.g. 8010 instead of 8009, 8081 instead of 8080 and 8444 instead of 8443) You should now be able to run the bin/startup.sh scripts in both installations to get two running tomcats. Connect using port 8080 and install the basic application services, and then connect using port 8081 to install the service provider management services. Source link. Some other useful links are given links, links.