标签:jboss wildfly mod_cluster 集群 负载均衡
继上次使用mod_jk进行了Apache+JBoss集群配置之后,由于JBoss5.1启动过于缓慢,所以开始尝试使用最新的WildFly8.1进行配置(WildFly就是JBoss,在JBoss7之后改名)。<server-groups> <!-- 配置服务器组 --> <server-group name="main-server-group" profile="full-ha"> <jvm name="default"> <heap size="64m" max-size="512m"/> </jvm> <socket-binding-group ref="full-ha-sockets"/> </server-group> </server-groups>
<cluster-password>password</cluster-password>
<interfaces> <interface name="management"> <inet-address value="${jboss.bind.address.management:192.168.0.10}"/> </interface> <interface name="public"> <inet-address value="${jboss.bind.address:192.168.0.10}"/> </interface> <interface name="unsecure"> <!-- Used for IIOP sockets in the standard configuration. To secure JacORB you need to setup SSL --> <inet-address value="${jboss.bind.address.unsecure:192.168.0.10}"/> </interface> </interfaces>
<servers> <server name="master-one" group="main-server-group" auto-start="true"> <socket-bindings port-offset="0"/> </server> <server name="master-two" group="main-server-group" auto-start="true"> <socket-bindings port-offset="100"/> </server> </servers>
<server-groups />
<cluster-password>password</cluster-password>
<domain-controller> <remote host="${jboss.domain.master.address:192.168.0.10}" ... /> </domain-controller>
<interfaces> <interface name="management"> <inet-address value="${jboss.bind.address.management:192.168.0.11}"/> </interface> <interface name="public"> <inet-address value="${jboss.bind.address:192.168.0.11}"/> </interface> <interface name="unsecure"> <!-- Used for IIOP sockets in the standard configuration. To secure JacORB you need to setup SSL --> <inet-address value="${jboss.bind.address.unsecure:192.168.0.11}"/> </interface> </interfaces>
<servers> <server name="slave1-one" group="main-server-group" auto-start="true"> <socket-bindings port-offset="0"/> </server> <server name="slave1-two" group="main-server-group" auto-start="true"> <socket-bindings port-offset="1"/> </server> </servers>
<host name="slave1" xmlns="urn:jboss:domain:2.1">
<server-identities> <secret value="MTIzMTIz" /> </server-identities>3、按照上述配置后,依次在master和slave1中,使用bin/domain.bat启动服务器。待全部启动后,访问http://192.168.0.10:9990/,输入master用户名和密码,进入界面,即可查看服务器的运行状况。
<IfModule manager_module> Listen 192.168.0.10:6666 ManagerBalancerName mycluster <VirtualHost 192.168.0.10:6666> <Location /> Order deny,allow Deny from all Allow from all </Location> KeepAliveTimeout 300 MaxKeepAliveRequests 0 AdvertiseFrequency 5 EnableMCPMReceive <Location /mod_cluster_manager> SetHandler mod_cluster-manager Order deny,allow Deny from all Allow from all </Location> </VirtualHost> </IfModule>
WildFly8.1(JBoss)+mod_cluster(Apache)集群配置
标签:jboss wildfly mod_cluster 集群 负载均衡
原文地址:http://blog.csdn.net/tylanbin/article/details/40432907