Here I am explaining how we can start two tomcat server instances in a single machine. Here I have configured tomcat instances for windows operating system, and edit the corresponding .sh files instead of .bat files for linux operating system.
To start two tomcat server instances in one machine, we need to edit the following configuration files.
1. Edit server.xml, tomcatfolder/conf/server.xml and edit the following entries,
<Server port="8005" shutdown="SHUTDOWN">
Change 8005 to another port number, say 9005
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
Change 8080 to another port, 8081
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
change 8009 to another port, say 9009
2. Edit Server listener port. Default it is 8000
catalina.bat, tomcatfolder/bin/catalina.bat and edit the following entry
set JPDA_ADDRESS=8000
Change 8000 to 9000
startup.bat, tomcatfolder/bin/startup.bat and edit the following entry
set JPDA_ADDRESS=8000
Change 8000 to 9000
Now start both the tomcat servers one by one.
To start two tomcat server instances in one machine, we need to edit the following configuration files.
1. Edit server.xml, tomcatfolder/conf/server.xml and edit the following entries,
<Server port="8005" shutdown="SHUTDOWN">
Change 8005 to another port number, say 9005
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
Change 8080 to another port, 8081
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
change 8009 to another port, say 9009
2. Edit Server listener port. Default it is 8000
catalina.bat, tomcatfolder/bin/catalina.bat and edit the following entry
set JPDA_ADDRESS=8000
Change 8000 to 9000
startup.bat, tomcatfolder/bin/startup.bat and edit the following entry
set JPDA_ADDRESS=8000
Change 8000 to 9000
Now start both the tomcat servers one by one.