#Install JDK
#Set Environment Variables
JAVA_HOME C:\Program Files\Java\jdk1.6.0_25
#Copy extracted Tomcat folder to
c:\Tomcat\
#Set Environment Variables
CATALINA_HOME C:\Tomcat\apache-tomcat-6.0.32
#Add following text to tomcat-users.xml
<role rolename="manager-gui"/>
<user username="admin" password="******" roles="manager-gui"/>
#Modify catalina.properties to add shared libraries
shared.loader=${catalina.home}/shared/lib,${catalina.home}/shared/lib/*.jar
#Copy C:\Tomcat\apache-tomcat-6.0.32
C:\Tomcat\node01-6.0.32
#Delete contents from the following subfolders
logs
temp
webapps
work
#Add startNode.bat on both nodes
set CATALINA_HOME=C:\Tomcat\apache-tomcat-6.0.32
set CATALINA_BASE=C:\Tomcat\node01-6.0.32
C:\Tomcat\node01-6.0.32\bin\startup.bat
#stopNode.bat
set CATALINA_HOME=C:\Tomcat\apache-tomcat-6.0.32
set CATALINA_BASE=C:\Tomcat\node01-6.0.32
C:\Tomcat\node01-6.0.32\bin\shutdown.bat
#installService.bat to install windows service
set CATALINA_HOME=C:\Tomcat\apache-tomcat-6.0.32
set CATALINA_BASE=C:\Tomcat\node01-6.0.32
C:\Tomcat\node01-6.0.32\bin\service.bat install NODE01
#uninstallService.bat to uninstall windows service
set CATALINA_HOME=C:\Tomcat\apache-tomcat-6.0.32
set CATALINA_BASE=C:\Tomcat\node01-6.0.32
C:\Tomcat\node01-6.0.32\bin\service.bat remove NODE01
#Modify server.xml to add jvmRoute
<Engine name="Catalina" defaultHost="localhost" jvmRoute="node01">
#Modify server.xml to change ports
<Server port="8006" shutdown="SHUTDOWN">
<Connector port="8081" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
<Connector port="8010" protocol="AJP/1.3" redirectPort="8443" />
#Install httpd-2.2.xx
#Uncomment following LoadModules from httpd.conf
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
#Add the following settings to httpd.conf
<VirtualHost *>
<Proxy balancer://ajpCluster>
BalancerMember ajp://localhost:8010 route=node01 retry=60
#BalancerMember ajp://localhost:8011 route=node02 retry=60
</Proxy>
<Location />
Allow From All
ProxyPass balancer://ajpCluster/ stickysession=JSESSIONID nofailover=off
</Location>
</VirtualHost>
#To configure the instance
C:\Tomcat\apache-tomcat-6.0.32\bin>tomcat6w //ES//node01
Friday, June 3, 2011
Tomcat Loadbalancing
Subscribe to:
Posts (Atom)