產生 plugin-cfg.xml 以遞送至多個群體
產生一個用來在 WebSphere® 外掛程式中啟用「智慧型管理」的 plugin-cfg.xml,以便遞送至多個群體。
程序
- 當您希望 WebSphere 外掛程式中的「智慧型管理」將要求遞送至特定群體時,請針對這每一個群體,執行下列動作:
- 選取群體控制器
- 編輯群體控制器的 server.xml,並新增 dynamicRouting 標籤。指定 connectorClusterName 內容的唯一名稱。 例如:<dynamicRouting connectorClusterName="collective1" />
- 在選取的群體控制器機器上,使用下列 dynamicRouting setup 指令,來產生 plugin-cfg.xml 和 plugin-key.p12 檔。
<Liberty 伺服器根目錄>/bin/dynamicRouting setup --port=<控制器埠> --host=<控制器主機> --user=<管理者 id> --password=<管理者密碼> --keystorePassword=<金鑰儲存庫密碼> --pluginInstallRoot=<WebServer 主機上的 WebSphere 外掛程式根目錄> --webServerNames=<Web 伺服器名稱> --keystoreType=pkcs12
- 合併產生之 plugin-cfg.xml 檔中的 <ConnectorClustor> 標籤。
- 將所有 plugin-cfg.xml 檔中的 <ConnectorCluster> 元素,複製到一個 plugin-cfg.xml 檔。
例如,如果您有兩個群體,請將 "collective2" 的 plugin-cfg.xml 中的 <ConnectorCluster> 段落,複製到 "collective1" 的 plugin-cfg.xml。
合併後的 plugin-cfg.xml 檔類似下列範例:
<?xml version="1.0" encoding="UTF-8"?><!--HTTP server plug-in config file for defaultServer generated on 2014.05.13 at 15:24:23 EDT--> <Config ASDisableNagle="false" AcceptAllContent="false" AppServerPortPreference="HostHeader" ChunkedResponse="false" FIPSEnable="false" IISDisableNagle="false" IISPluginPriority="High" IgnoreDNSFailures="false" RefreshInterval="60" ResponseChunkSize="64" SSLConsolidate="false" TrustedProxyEnable="false" VHostMatchingCompat="false"><Log LogLevel="Error" Name="/opt/IBM/HTTPServer_Plugins/logs/webserver1/http_plugin.log"/> <Property Name="ESIEnable" Value="true"/> <Property Name="ESIMaxCacheSize" Value="1024"/> <Property Name="ESIInvalidationMonitor" Value="false"/> <Property Name="ESIEnableToPassCookies" Value="false"/> <Property Name="PluginInstallRoot" Value="/opt/IBM/HTTPServer_Plugins/"/> <!-- Configuration generated using httpEndpointRef=defaultHttpEndpoint--> <Property Name="Keyfile" Value="/opt/IBM/HTTPServer_Plugins/config/webserver1/plugin-key-collective1.kdb"/> <Property Name="Stashfile" Value="/opt/IBM/HTTPServer_Plugins/config/webserver1/plugin-key-collective1.sth"/> <IntelligentManagement> <TraceSpecification name="default" specification=":DEBUG"/> <Property name="webserverName" value="webserver1"/> <ConnectorCluster enabled="true" maxRetries="10" name="collective1" retryInterval="30"> <Property name="uri" value="/ibm/api/dynamicRouting"/> <Connector host="controller1.acme.com" port="9443" protocol="https"> <Property name="keyring" value="/opt/IBM/HTTPServer_Plugins/config/webserver1/plugin-key-collective1.kdb"/> </Connector> </ConnectorCluster> <ConnectorCluster enabled="true" maxRetries="10" name="collective2" retryInterval="30"> <Property name="uri" value="/ibm/api/dynamicRouting"/> <Connector host="controller2.acme.com" port="9443" protocol="https"> <Property name="keyring" value="/opt/IBM/HTTPServer_Plugins/config/webserver1/plugin-key-collective2.kdb"/> </Connector> </ConnectorCluster> </IntelligentManagement> </Config>
- 將所有 plugin-cfg.xml 檔中的 <ConnectorCluster> 元素,複製到一個 plugin-cfg.xml 檔。
- 針對每一個群體,將 pkcs12 格式的金鑰儲存庫,轉換成 CMS 格式。
- 將產生的 plugin-key-<connectorClusterName>.p12 檔,複製到 IHS 主機上的 /tmp 目錄。
- 按照 dynamicRouting
setup 指令輸出的指示,執行 gskcmd,將它轉換成 CMS 格式的儲存庫。
./gskcmd -keydb -convert -pw <<password>> -db /tmp/plugin-key-collective1.p12 -old_format p12 -target /tmp/plugin-key-collective1.kdb -new_format cms -stash
- 將產生的 .kdb, .sth 和 .rdb 儲存庫複製到 <plugininstallRoot>/config/<webServerName> 目錄。
- 從每一個群體的 kdb 儲存庫擷取所有 memberroot certificates,並匯入到新的金鑰儲存庫,這是供經由 SSL 的前端使用者要求使用。
比方說,執行下列指令,來擷取 memberroot certificate:
./gskcmd -cert -extract -db /tmp/plugin-key-collective1.kdb -label memberroot -pw <<password>> -target /tmp/memberroot.cer
建立 CMS 格式的新儲存庫(稱為 plugin-key.kdb),並將 memberroot certificates 匯入到其中。
./gskcmd -cert -add -db /tmp/plugin-key.kdb -pw <<password>> -file /tmp/memberroot.cer -label memberroot
將產生的 plugin-key .kdb、.sth 和 .rdb 檔複製到 <plugininstallRoot>/config/<webServerName> 目錄。
- 修改合併後的 plugin-cfg.xml,以便將 keyfile 和 Stashfile 內容變更成使用 plugin-key.kdb 和 plugin-key.sth。修改後的 plugin-cfg.xml 類似下列範例:
<?xml version="1.0" encoding="UTF-8"?><!--HTTP server plug-in config file for defaultServer generated on 2014.05.13 at 15:24:23 EDT--> <Config ASDisableNagle="false" AcceptAllContent="false" AppServerPortPreference="HostHeader" ChunkedResponse="false" FIPSEnable="false" IISDisableNagle="false" IISPluginPriority="High" IgnoreDNSFailures="false" RefreshInterval="60" ResponseChunkSize="64" SSLConsolidate="false" TrustedProxyEnable="false" VHostMatchingCompat="false"> <Log LogLevel="Error" Name="/opt/IBM/HTTPServer_Plugins/logs/webserver1/http_plugin.log"/> <Property Name="ESIEnable" Value="true"/> <Property Name="ESIMaxCacheSize" Value="1024"/> <Property Name="ESIInvalidationMonitor" Value="false"/> <Property Name="ESIEnableToPassCookies" Value="false"/> <Property Name="PluginInstallRoot" Value="/opt/IBM/HTTPServer_Plugins/"/> <!-- Configuration generated using httpEndpointRef=defaultHttpEndpoint--> <Property Name="Keyfile" Value="/opt/IBM/HTTPServer_Plugins/config/webserver1/plugin-key.kdb"/> <Property Name="Stashfile" Value="/opt/IBM/HTTPServer_Plugins/config/webserver1/plugin-key.sth"/> <IntelligentManagement> <TraceSpecification name="default" specification=":DEBUG"/> <Property name="webserverName" value="webserver1"/> <ConnectorCluster enabled="true" maxRetries="10" name="collective1" retryInterval="30"> <Property name="uri" value="/ibm/api/dynamicRouting"/> <Connector host="controller1.acme.com" port="9443" protocol="https"> <Property name="keyring" value="/opt/IBM/HTTPServer_Plugins/config/webserver1/plugin-key-collective1.kdb"/> </Connector> </ConnectorCluster> <ConnectorCluster enabled="true" maxRetries="10" name="collective2" retryInterval="30"> <Property name="uri" value="/ibm/api/dynamicRouting"/> <Connector host="controller2.acme.com" port="9443" protocol="https"> <Property name="keyring" value="/opt/IBM/HTTPServer_Plugins/config/webserver1/plugin-key-collective2.kdb"/> </Connector> </ConnectorCluster> <IntelligentManagement> </Config>

檔名:twlp_wve_plugincfgmultcollect.html