ü 安装jboss
安装jdk,配置环境变量(略)
安装jboss;
拷贝jboss-4.2.3.GA目录至jboss的服务器(如C:\):
ü 配置Jboss:刘兵召写于2008122316:55
找到%JBOSS_HOME%/server/all/deploy/jbossweb-tomcat55.sar/server.xml,
下面代码:
<Engine name=”jboss.web” defaultHost=”localhost” jvmRoute=”node1″>
ip分别为192.168.20.2 修改为:
<Engine name=”jboss.web” defaultHost=”localhost” jvmRoute=”node1″>
ip分别为192.168.20.3 修改为:
<Engine name=”jboss.web” defaultHost=”localhost” jvmRoute=”node2″>
//注意jvmRoute是用来让apache识别的节点名称,一个节点一个名称, 注意不要有重复的。
ü 改变集群广播地址。$JBOSS_HOME/ 找到文件:%JBOSS_HOME%\server\all\deploy\jboss-web-cluster.sar\META-INFl\jboss-service.xml中的下面代码
<config>
<TCP bind_addr="192.168.20.1" start_port="7810" loopback="true"
tcp_nodelay="true"
recv_buf_size="20000000"
send_buf_size="640000"
discard_incompatible_packets="true"
enable_bundling="true"
max_bundle_size="64000"
max_bundle_timeout="30"
use_incoming_packet_handler="true"
use_outgoing_packet_handler="false"
down_thread="false" up_thread="false"
use_send_queues="false"
sock_conn_timeout="300"
skip_suspected_members="true"/>
<TCPPING initial_hosts="192.168.20.2[7810],192.168.20.3[7810]" port_range="3"
timeout="3000"
down_thread="false" up_thread="false"
num_initial_members="3"/>
<MERGE2 max_interval="100000"
down_thread="false" up_thread="false" min_interval="20000"/>
<FD_SOCK down_thread="false" up_thread="false"/>
<FD timeout="10000" max_tries="5" down_thread="false" up_thread="false" shun="true"/>
<VERIFY_SUSPECT timeout="1500" down_thread="false" up_thread="false"/>
<pbcast.NAKACK max_xmit_size="60000"
use_mcast_xmit="false" gc_lag="0"
retransmit_timeout="300,600,1200,2400,4800"
down_thread="false" up_thread="false"
discard_delivered_msgs="true"/>
<pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
down_thread="false" up_thread="false"
max_bytes="400000"/>
<pbcast.GMS print_local_addr="true" join_timeout="3000"
down_thread="false" up_thread="false"
join_retry_timeout="2000" shun="true"
view_bundling="true"/>
<FC max_credits="2000000" down_thread="false" up_thread="false"
min_threshold="0.10"/>
<FRAG2 frag_size="60000" down_thread="false" up_thread="false"/>
<pbcast.STATE_TRANSFER down_thread="false" up_thread="false" use_flush="false"/>
</config>
ü 测试Jboss:刘
在%JBOSS_HOME%\bin目录下分别执行startup.bat, 测试每个jboss的启动是否正常
ü 配置应用程序刘兵召写于2008122316:55
1 在应用程序(如test.war)的web.xml的<web-app>段中增加:<distributable />。
2 拷贝jboss-web.xml文件到应用程序的WEB—INF目录
ü 测试集群刘兵
http:// 192.168.20.1/test/