Setting up tomcat multiple instances
1) First Original Instance, download apache-tomcat-5.5.33 ( any version) this will be the original
Instance and change nothing here.
2) For the instance 2 ... to N do the following as mentioned below
a) Create a new Folder (TomcatInstance1….N) as many as you instances as you want
b) Copy following folders over to TomcatInstance1… to N
conf
logs
temp
webapps
work
c) Write a script to startup/shutdown the second instance(name it as startup.sh
and shutdown.sh) and place under TomcatInstance1..N folders
d) Add following to the newly created startup.sh
CATALINA_HOME=~/Documents/apache-tomcat-5.5.33
CATALINA_BASE=~/Documents/TomcatInstance1
export CATALINA_HOME CATALINA_BASE
$CATALINA_HOME/bin/catalina.sh start
e) Add the following to the newly created shutdown.sh
CATALINA_HOME=~/Documents/apache-tomcat-5.5.33
CATALINA_BASE=~/Documents/TomcatInstance1
export CATALINA_HOME CATALINA_BASE
$CATALINA_HOME/bin/catalina.sh stop
f) Modify the server.xml file in TomcatInstance1/conf/server.xml and change the port
number to 8180
AND change port number to 8109 for the Connector Port of "AJP/1.3"
That's it now start the server with following command " sh startup.sh" and login to
http://localhost:8180 and you should see the tomcat page, do the same for as many instances as you want
1) First Original Instance, download apache-tomcat-5.5.33 ( any version) this will be the original
Instance and change nothing here.
2) For the instance 2 ... to N do the following as mentioned below
a) Create a new Folder (TomcatInstance1….N) as many as you instances as you want
b) Copy following folders over to TomcatInstance1… to N
conf
logs
temp
webapps
work
c) Write a script to startup/shutdown the second instance(name it as startup.sh
and shutdown.sh) and place under TomcatInstance1..N folders
d) Add following to the newly created startup.sh
CATALINA_HOME=~/Documents/apache-tomcat-5.5.33
CATALINA_BASE=~/Documents/TomcatInstance1
export CATALINA_HOME CATALINA_BASE
$CATALINA_HOME/bin/catalina.sh start
e) Add the following to the newly created shutdown.sh
CATALINA_HOME=~/Documents/apache-tomcat-5.5.33
CATALINA_BASE=~/Documents/TomcatInstance1
export CATALINA_HOME CATALINA_BASE
$CATALINA_HOME/bin/catalina.sh stop
f) Modify the server.xml file in TomcatInstance1/conf/server.xml and change the port
number to 8180
AND change port number to 8109 for the Connector Port of "AJP/1.3"
That's it now start the server with following command " sh startup.sh" and login to
http://localhost:8180 and you should see the tomcat page, do the same for as many instances as you want
No comments:
Post a Comment