Translate

Installing multiple instances of apache tomcat server in single server

Create a new directory in “ C:\Program Files\Apache Software Foundation\Tomcat 6.0\ ” and rename it to master. This will be our master.

Copy conf, logs, temp, webapps and work directories from “ C:\Program Files\Apache Software Foundation\Tomcat 6.0 ” to master directories that we created above.

Modify the conf/server.xml files in “master” directory and change the ports so that all three ports are different on.

Go into the \bin directory of “master” directory and rename the files tomcat6w and tomcat6 to tomcat6masterw and tomcat6master

Open up a command prompt and go to the \bin directory of your new tomcat (master) and run following command. (Make sure to change the directories to match your environment)

“tomcat6Master //IS//Tomcat6Master -DisplayName = "Apache Tomcat 6 Master" -Install = "C:\Program Files\Apache Software Foundation\Tomcat 6.0\Master\bin\tomcat6Master.exe" -Jvm = auto -StartMode = jvm -StopMode = jvm -StartClass = org.apache.catalina.startup.Bootstrap -StartParams = start -StopClass = org.apache.catalina.startup.Bootstrap -StopParam = stop”

To control the new Tomcat server you can use the tomcat6masterw.exe program located in tomcat\bin we also see new services have created.

Run tomcat6masterw.exe and set the value for all tabs as existing Apache tomcat 6 Property. But file path will be newly created directory like “ C:\Program Files\Apache Software Foundation\Tomcat 6.0 ” will be “ C:\Program Files\Apache Software Foundation\Tomcat 6.0\master ”. Copy following setting and paste in Java option in java tab see below screenshot.

-Dcatalina.home = C:\Program Files\Apache Software Foundation\Tomcat 6.0

-Dcatalina.base = C:\Program Files\Apache Software Foundation\Tomcat 6.0\Master

-Djava.endorsed.dirs = C:\Program Files\Apache Software Foundation\Tomcat 6.0\Master\endorsed

-Djava.io.tmpdir = C:\Program Files\Apache Software Foundation\Tomcat 6.0\Master\temp

-Djava.util.logging.manager = org.apache.juli.ClassLoaderLogManager

-Djava.util.logging.config.file = C:\Program Files\Apache Software Foundation\Tomcat 6.0\Master\conf\logging.properties

Restart both tomcat service and Verify localhost: 8085. Mention port number that you have changed.

 

No comments:

Post a Comment