Cluster configuration of Apache2.0 + Tomcat5.5 under RHEL5

Source: Internet
Author: User
Two machines: RHEL5 is installed by default (no network server is installed, and the system development tool selected by the system is fully installed) 188 install JDK and Tomcat189 only to install JDK, Tomcat, Apache, and NFS server. A, 188 machine 1, install JDK: # sh/yourpath/jdk-1_5_0_16-linux-i586-rpm.bin2, install Tomcat: copy it to/usr/tomcat-5.5.27/# t

Two machines: RHEL5 is installed by default (no network server is installed, and the system development tool selected by the system is fully installed)
188 install JDK and Tomcat only
189 install JDK, Tomcat, Apache, and NFS server.

Machines A and 188

1. Install JDK:
# Sh/yourpath/jdk-1_5_0_16-linux-i586-rpm.bin

2. install Tomcat:
Copy it to/usr/tomcat-5.5.27 /.
# Tar-zxvf tomcat-5.5.27.tar.gz
# Cp-rf apache-tomcat-5.5.27/path/tomcat-5.5.27
Deployment Project
# Unzip webapp.zip
# Cp-rf webapp/path/webapp-abc

3. Configuration required by Tomcat and JDK:
# Vi/etc/profile
Add the following content as appropriate:
Export JAVA_HOME =/usr/java/jdk1.5.0 _ 16
Export CLASSPATH = $ JAVA_HOME/lib: $ JAVA_HOME/jre/lib
Export TOMCAT_HOME =/usr/tomcat-5.5.27
Export PATH = $ JAVA_HOME/bin: $ PATH
# Source/etc/profile
Note: JDK installation path on PPC:/opt/ibm/java2-pppc64-50/

4. Modify Tomcat configuration server. xml
Remove the comments before the Cluster and enable the tomcat Cluster function.
Generally, there is no need to modify anything, but on my side, the two linux tomcat servers cannot find the node, and the same configuration file runs normally under the window.
Note that the session synchronization function of tomcat requires multicast. In windows, the multicast service is activated by default, but not in linux by default, you can use commands to open
Route add-net 224.0.0.0 netmask 240.0.0.0 dev eth0,
To enable multicast when the server is started, add eht0 net 224.0.0.0 netmask 240.0.0.0 to the/etc/sysconfig/static-routes file. For more information about the concept of multicast, see CCNP.

You can view the multicast status through netstate-g, or in the route-e command.

Modify


ClassName ="
Org. apache. catalina. cluster. tcp. ReplicationListener"
TcpListenAddress = "auto"
TcpListenPort = "4001"
TcpSelectorTimeout = "100"
TcpThreadCount = "6"/>
Change

ClassName ="
Org. apache. catalina. cluster. tcp. ReplicationListener"
TcpListenAddress = "192.168.6.188"
TcpListenPort = "4001"
TcpSelectorTimeout = "100"
TcpThreadCount = "6"/>
Open jvmRoute (search jvm) and match the two tomcat names of workers. properties.
188 machines

189 machines


5. Add management account tomcat-user.xml

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.