0. Summary 0.1 Target Configuration One Scalable, High Available, Load Balancing and Error Recovery Tomcat Cluster 0.2 License Agreement GNU Free Documentation license allows any reprinted, but please keep this document If there is a modification, please notify the author 1 Download 1.1 Tomcat1.2 Tomcat Session Replication Library 2. Installation 2.1 First Tomcat $ TAR VFXZ JAKARTA-TOMCAT-4.1.27.TAR.GZ $ CP -R Jakarta-Tomcat-4.1.27 / WWW / Server / Tomcat1 2.2 Second Tomcat # temporarily not install, wait for a Tomcat, directly copy the copy, modify the copy of 2.3 JK2 # on the basis of the copy, to install the JSP / PHP Web Server "under Linux" compilation. 3 . Configuration 3.1 Apache's JK2 Profile Workers2.properties # This is the Apache's JK2 profile, located in the confed directory in the apache installation directory, if there is no file, the new # content is as follows $ VI WORKERS2.PROPERTIES [SHM] File = $ {serverroot} /logs/shm.file size = 1048576
# First tomcat [channel.socket: Tomcat1] port = 11009 host = 127.0.0.1
[AJP13: Tomcat1] channel = channel.socket: Tomcat1
# Second Tomcat [Channel. Socket: Tomcat2] Port = 12009 Host = 127.0.0.1
[AJP13: Tomcat2] channel = channel.socket: Tomcat2
# Loading balance [lb: lb1] worker = ajp13: Tomcat1 worker = ajp13: Tomcat2
# Uri mapping [uri: / *. Jsp] group = lb: lb1 3.2 The first Tomcat JK2 configuration file jk2.properties # This is the first Tomcat JK2 configuration file, located in the first Tomcat installation directory Conf Directory # 找 c n elT.port = 8009 # Cancel Comment and modify to channelsocket.port = 11009 3.3 The first Tomcat configuration file server.xml # This is the first Tomcat configuration file, located in the first Tomcat installation directory In the CONF directory # # = = "shutdown" debug = "0"> # = "0"> # = "limited" debug = "limited" debug = "0"> # Open JK2 AJP Connector, close other Connector (that is, remove other Connector delete or comment) # 修 j j j j a 端, 11, <........................................ AJP13Connector "port =" 11009 "minprocessors =" 5 "MaxProcessors =" 75 "acceptcount =" 10 "debug =" 0 "/> # To add the cluster supported WebApp's Context, add the following manager