Configure Tomcat cluster

xiaoxiao2021-03-06  69

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 3.4 The first Tomcat startup script catalina.sh # This is the first Tomcat startup script, located in the bin directory in the first Tomcat installation directory # Add Start the environment variable as follows Java_Home = / usr / java / jdk catalina_home = / www / server / tomcat1 # The java_home pointing to the system actually installs the JDK path # here's Catalina_Home points to the first Tomcat installation path 3.5 by the first one Tomcat Copy Get the Second Tomcat CP -R Tomcat1 Tomcat2 3.6 Second Tomcat JK2 Profile JK2.Properties # Reference 3.2 # Modify ChannelSocket.Port to ChannelSocket.port = 12009 # Note and the First Tomcat Differences 3.7 Second Tomcat configuration file server.xml # Reference 3.3 # Modify Close port is # Modify the JK2 AJP Connector port is 12009, the modified Connector may Image below # Note and the first Tomcat difference 3.8 Second Tomcat startup script CataLina.sh # Reference 3.4 # Add startup environment variable As follows Java_Home = / usr / java / jdk catalina_home =

转载请注明原文地址:https://www.9cbs.com/read-87761.html

New Post(0)