websphere Express 6.0 实现简易集群

来源:互联网 发布:boll公式源码 编辑:程序博客网 时间:2024/04/29 11:53
 [文章转载]

 第一步分别安装各个集群结点的application server并布署应用。
第二步选择其中一个结点安装IBM  http server
第三步安装Ibm web 插件。
第四步检查$http server$/conf/httpd.conf文件WebSpherePluginConfigplugin-cfg.xml文件指向路径。
第五步打开plugin-cfg.xml文件,修改为
<Config ASDisableNagle="false" IISDisableNagle="false"
        IgnoreDNSFailures="false" RefreshInterval="60"
        ResponseChunkSize="64" AcceptAllContent="false"
        AppServerPortPreference="webserverPort" VHostMatchingCompat="true"
        ChunkedResponse="false">
    <Log LogLevel="Error" Name="E:/IBM/plug_in/logs/webserver1/http_plugin.log"/>
    <Property Name="ESIEnable" Value="true"/>
    <Property Name="ESIMaxCacheSize" Value="1024"/>
    <Property Name="ESIInvalidationMonitor" Value="false"/>
    <VirtualHostGroup Name="default_host">
        <VirtualHost Name="*:9080"/><!--application server
访问端口-->
        <VirtualHost Name="*:80"/><!--
这个端口要加上-->
        <VirtualHost Name="*:9443"/>
    </VirtualHostGroup><!--
第一个集群结点的名字-->
     <ServerCluster Name="server1_Cluster" CloneSeparatorChange="false" LoadBalance="Round Robin"
        PostSizeLimit="-1" RemoveSpecialHeaders="true" RetryInterval="60">
        <Server Name="server1" ConnectTimeout="0" ExtendedHandshake="false"
            LoadBalanceWeight="1" MaxConnections="-1" WaitForContinue="false">
            <Transport Hostname="192.168.1.1" Port="9080" Protocol="http"/>
            <Transport Hostname="192.168.1.1" Port="9443" Protocol="https">
                <Property name="keyring" value="E:/IBM/plug_in/etc/plugin-key.kdb"/>
                <Property name="stashfile" value="E:/IBM/plug_in/etc/plugin-key.sth"/>
            </Transport>
        </Server>
    </ServerCluster><!--
第二个集群结点的名字-->
    <ServerCluster Name="server2_Cluster" CloneSeparatorChange="false" LoadBalance="Round Robin"
        PostSizeLimit="-1" RemoveSpecialHeaders="true" RetryInterval="60">
        <Server Name="server2" ConnectTimeout="0" ExtendedHandshake="false"
            LoadBalanceWeight="1" MaxConnections="-1" WaitForContinue="false">
            <Transport Hostname="192.168.1.2" Port="9080" Protocol="http"/>
            <Transport Hostname="192.168.1.2" Port="9443" Protocol="https">
                <Property name="keyring" value="E:/IBM/plug_in/etc/plugin-key.kdb"/>
                <Property name="stashfile" value="E:/IBM/plug_in/etc/plugin-key.sth"/>
            </Transport>
        </Server>
    </ServerCluster>   
    <UriGroup Name="server1_Cluster_URIs">
        <Uri Name="*.jsp"/>
        <Uri Name="*.jsv"/>
        <Uri Name="*.jsw"/>
        <Uri Name="/mycase/*"/><!--
应用的URL路径-->
    </UriGroup>
    <UriGroup Name="server2_Cluster_URIs">
        <Uri Name="*.jsp"/>
        <Uri Name="*.jsv"/>
        <Uri Name="*.jsw"/>
        <Uri Name="/mycase/*"/>
    </UriGroup>   
    <Route ServerCluster="server1_Cluster"
        UriGroup="server1_Cluster_URIs" VirtualHostGroup="default_host"/>
    <Route ServerCluster="server2_Cluster"
        UriGroup="server2_Cluster_URIs" VirtualHostGroup="default_host"/>       
    <RequestMetrics armEnabled="false" newBehavior="false"
        rmEnabled="false" traceLevel="HOPS">
        <filters enable="false" type="URI">
            <filterValues enable="false" value="/servlet/snoop"/>
            <filterValues enable="false" value="/webapp/examples/HitCount"/>
        </filters>
        <filters enable="false" type="SOURCE_IP">
            <filterValues enable="false" value="255.255.255.255"/>
            <filterValues enable="false" value="254.254.254.254"/>
        </filters>
    </RequestMetrics>
</Config>