Posts Tagged server

Run second instances of Tomcat on same machine

[edited]

In this tutorial, I assume you know how to install and set up Tomcat environment on Windows Machine.

If you ever come to need to run second Tomcat server on same machine which the first Tomcat Server already run on port 8080 or 8443 or others port on CATALINA_HOME and CATALINA_BASE environment. Below are some steps might helps you:

1. Now, you need to copy the entire 1st apache-tomcat-* to new location (where we call it as 2nd apache-tomcat-*) and create another CATALINA_HOME2 and CATALINA_BASE2 on the Window Environment which point to the new location of 2nd apache-tomcat-* on the environment setting.

For Instance it should look like this in your machine environment variable:

CATALINA_HOME : C:\apache-tomcat-5.5.26
CATALINA_BASE : C:\apache-tomcat-5.5.26
CATALINA_HOME2 : C:\secondTomcat\apache-tomcat-5.5.26
CATALINA_BASE2 : C:\secondTomcat\apache-tomcat-5.5.26

2. Then, go to the 2nd apache-tomcat-*\conf reside and edit the server.xml file. Change port 8080 (http port) and 8443 (ssl port) (it should be default port, if you hadn’t change it) to new port say like 9090 (http port) and 9443 (ssl port). Look for the port 8005 or SHUTDOWN and change the port to 9005. This make sure the port doesn’t conflict when 8080 or 8443 port had already be up running.

3. Go the new location of your 2nd apache-tomcat-*\bin reside and edit the startup.bat, catalina.bat and shutdown.bat from CATALINA_HOME to CATALINA_HOME2 and CATALINA_BASE to CATALINA_BASE2. You can use favourite notepad replace to do that. :)

4. Start up the new server and if no exception being thrown, you will be fine. To test both running instance, fire up your browser and type in http://localhost:8080 and http://localhost:9090.

Yes, you are done.

1 comment 1 May, 2008


Charles Ling

Founder of ecomjunction.com

My Favourite Web

 

December 2009
M T W T F S S
« Nov    
 123456
78910111213
14151617181920
21222324252627
28293031  

Categories

Archives

Tags

Adobe bitcomet book coding Firefox Intelligent Intelligent Web J2ME Java javascript javascript framework jQuery Jsp jsr 172 kite runner LWUIT Machine Learning Mysql novel Nuance Talks painted veil parse Personalization Photoshop PHP plug-in privacy programming protocol buffer proxy Security server tcp Technology Tomcat web web 2.0 Web Service web services wep Wireless WSDL wsf wso2 xml

Category Cloud

About Adobe barcamp Books css Firefox Free Icons Intelligent Web J2ME Java Javascript Joomla jQuery Mysql Open Source Software PayPal PHP task Technology Tomcat Uncategorized Web Design Web Service Wireless Zend

Delicious Bookmark

Join ME

Blogroll

Meta