

「動態遞送」指令
setup、genPluginCfg 和 genKeystore dynamicRouting 指令動作用來產生外掛程式配置檔和金鑰儲存庫檔。在起始設定之後,可隨時使用 genPluginCfg dynamicRouting 指令動作來重新產生 plugin-cfg.xml 檔。比方說,當在新的控制器上啟用動態遞送特性時,或是在新增 Web 伺服器時,就可以使用。genKeystore dynamicRouting 指令動作用來產生金鑰儲存庫檔。每一個 dynamicRouting 指令動作都支援線上說明。
setup
setup dynamicRouting 指令會產生 PKCS12 或 JKS 格式的金鑰儲存庫檔,以及一或多個 WebSphere® 外掛程式配置檔。金鑰儲存庫檔含有個人憑證以及 memberRoot 和 controllerRoot 這兩份簽章者憑證,如此就能在 WebSphere 外掛程式和「動態遞送」服務之間進行安全通訊。金鑰儲存庫檔亦用來傳送 HTTPS 要求給 Liberty 群體成員中的應用程式。外掛程式配置檔含有 <IntelligentManagement> 段落,這用來在 WebSphere 外掛程式中啟用「智慧型管理」。<IntelligentManagement> 段落含有一個代表群體的 <ConnectorCluster> 段落。在 <ConnectorCluster> 段落中,每一個啟用動態遞送特性的控制器各有一個 <Connector> 段落。
如果要取得指令說明,請執行:${wlp.install.dir}/bin/dynamicRouting help setup
說明
setup dynamicRouting 指令會產生金鑰儲存庫檔,內含在「動態遞送」服務與用戶端之間啟用安全通訊所需要的個人憑證和簽章者憑證。此外也會產生 WebSphere 外掛程式配置檔,內含 <IntelligentManagement> 段落,可在 WebSphere 外掛程式中啟用「智慧型管理」。
用法
dynamicRouting setup [options]
選項
- --host=name
- 單一群體動態遞送的必要選項。目標群體控制器的主機名稱。
--host 和 --collectives 選項不可同時指定。
- --password[=pwd]
- 單一群體動態遞送的必要選項。目標群體控制器的「管理者」使用者的密碼。如果沒有定義任何值,則會提示您。
--password 和 --collectives 選項不可同時指定。
- --port=num
- 單一群體動態遞送的必要選項。目標群體控制器的 HTTPS 埠號。
--port 和 --collectives 選項不可同時指定。
- --user=name
- 單一群體動態遞送的必要選項。目標群體控制器的「管理者」使用者。
--user 和 --collectives 選項不可同時指定。
- --pluginInstallRoot=path
- 必要。Web 伺服器主機上之 WebSphere 外掛程式根目錄的完整路徑。
- --webServerNames=webServerName[,webServerName1]
- 必要。需要產生其 WebSphere 外掛程式配置檔的 Web 伺服器名稱(以逗點區隔)。
使用 --collectives 選項時,只指定一個 Web 伺服器名稱。 如果您需要多個 plugin-cfg.xml 檔,請多次執行這個指令。再次執行指令之前,請先將所有產生的檔案處理完畢。
- --keystorePassword[=pwd]
- 必要。產生之金鑰儲存庫的密碼。若有指定,但沒有定義任何值,將會提示您。
- --keystoreType=type
- 選用。產生之金鑰儲存庫的類型。預設類型是 JKS。有效值是 JKS 和 PKCS12。
- --certificateSubject=DN
--certificateSubject=DN 不再使用,將會被忽略。如需相關資訊,請參閱動態遞送 SSL 憑證。
--collectives=user1[:password1]@host1:port1,user2[:password2]@host2:port2,…
- 為多個群體產生構件的必要選項。為了取得動態遞送資訊而連接的群體控制器清單。從每一個群體中選取一個控制器。所有控制器都必須啟動。 請以 collective_user:user_password@collective_host:port 格式指定群體,並利用逗點區隔每一個群體。如果未指定密碼,則會提示您。
- --autoAcceptCertificates
- 選用。在這個指令期間,自動信任 SSL 憑證。或者,您也可以將 JVM 內容 com.ibm.websphere.collective.utility.autoAcceptCertificates 設為 true,以自動信任 SSL 憑證。註: setup 和 genKeystore 指令產生的金鑰儲存庫會是 JKS 或 PKCS12 格式。需要將它複製到 Web 伺服器機器上的目錄,並執行 gskcmd,將它轉換成 CMS 格式的儲存庫。必須將 CMS 格式的儲存庫檔案 (.kdb) 移至 --pluginInstallRoot_argument_value/config/web_server_name 目錄。 .rdb 和 .sth 檔也必須移至相同的目錄。
以下是針對單一群體,使用所有必要引數來執行指令時的輸出:
./dynamicRouting setup --port=9444 --host=controller1.acme.com --user=admin --password=password --keystorePassword=keypass --pluginInstallRoot=/opt/HTTPServer_Plugins --webServerNames=webServer1,webServer2Generating WebSphere plug-in configuration files for web servers webServer1, webServer2
Auto-accepting the certificate chain for target server.
Certificate subject DN: CN=admin, OU=controller1, O=ibm, C=us
Successfully completed MBean request to the controller.
Successfully generated WebSphere plug-in configuration files plugin-cfg-webServer1.xml, plugin-cfg-webServer2.xml
Generating keystore for web servers webServer1, webServer2
Successfully completed MBean request to the controller.
Successfully generated keystore plugin-key.jks.
Generated WebSphere plug-in configuration files plugin-cfg-webServer1.xml, plugin-cfg-webServer2.xml for web servers webServer1, webServer2.
Also generated keystore file plugin-key.p12 that enables secure communication between the Dynamic Routing service and clients.
Copy the WebSphere plug-in configuration file to the directory specified
in the WebSpherePluginConfig directive in the IBM HTTP Server httpd.conffile.
Copy keystore file plugin-key.jks to a directory on the
web server host, and run "gskcmd" to convert the keystore to CMS format and
to set personal certificate as the default.
For example:
gskcmd -keydb -convert -pw <password> -db /tmp/plugin-key.jks -old_format jks -target /tmp/plugin-key.kdb -new_format cms -stash
gskcmd -cert -setdefault -pw <password> -db /tmp/plugin-key.kdb -label default
Copy resulting /tmp/plugin-key.kdb, .sth, .rdb files to the directory /opt/HTTPServer_Plugins/config/webServer1/
以下是針對多個群體,使用所有必要引數來執行指令時的輸出:
![[17.0.0.1 以及更新版本]](../ng_v17001plus.gif)
Auto-accepting the certificate chain for target server.
Certificate subject DN: CN=myuser.ibm.com, OU=mycontroller, O=ibm, C=us
Generating WebSphere plug-in configuration file for web server webserver1
Successfully completed MBean request to the controller.
Auto-accepting the certificate chain for target server.
Certificate subject DN: CN=myuser.ibm.com, OU=mycontroller2, O=ibm, C=us
Generating WebSphere plug-in configuration file for web server webserver1
Successfully completed MBean request to the controller.
The merged plugin configuration document is created successfully = /extra/workspaces/CD-Liberty/build.image/wlp/bin/plugin-cfg.xml
Generating keystore...
Successfully completed MBean request to the controller.
Successfully generated keystore plugin-key-default.p12.
Generating keystore...
Successfully completed MBean request to the controller.
Successfully generated keystore plugin-key-collective2.p12.
Generated WebSphere plug-in configuration file plugin-cfg.xml for web server webserver1.
Also generated keystore files (plugin-key-default.p12, plugin-key-collective2.p12, plugin-key.p12) that enable secure communication between the Dynamic Routing service and clients.
Copy the WebSphere plug-in configuration file to the directory specified in the WebSpherePluginConfig directive in the IBM HTTP Server httpd.conf file. Copy keystore files (plugin-key-default.p12, plugin-key-collective2.p12, plugin-key.p12) to a directory on the web server host, and run "gskcmd" to convert the keystore to CMS format and to set personal certificate as the default.
For example:
gskcmd -keydb -convert -pw <password> -db /tmp/<<keystore file>> -old_format pkcs12 -target /tmp/plugin-key.kdb -new_format cms -stash
gskcmd -cert -setdefault -pw <password> -db /tmp/plugin-key.kdb -label default
Copy resulting /tmp/plugin-key.kdb, .sth, .rdb files to the directory /opt/IBM/WebSphere/Plugins/config/webserver1/
genPluginCfg
這個動作會產生外掛程式配置檔。每一個外掛程式配置檔都含有 <IntelligentManagement> 段落,這用來在外掛程式中啟用「智慧型管理」特性。 在 <IntelligentManagement> 段落中,每一個群體各有一個 <ConnectorCluster> 段落。 在 <ConnectCluster> 段落中,每一個啟用動態遞送特性的控制器各有一個 <Connector> 段落。--webServerNames 引數用來指定以逗點區隔的 Web 伺服器名稱。例如,如果指定 --webServerNames=webServer1,webServer2,會產生 plugin-cfg-webServer1.xml 和 plugin-cfg-webServer2.xml 檔。
使用 --collectives 選項時,只指定一個 Web 伺服器名稱。
如果您需要多個 plugin-cfg.xml 檔,請多次執行這個指令。再次執行指令之前,請將產生的 plugin-cfg.xml 檔複製到 Web 伺服器目錄。
如果要取得指令說明,請執行:${wlp.install.dir}/bin/dynamicRouting help genPluginCfg
說明
產生 WebSphere 外掛程式配置檔,內含 <IntelligentManagement> 段落,可在 WebSphere 外掛程式中啟用「智慧型管理」。
用法
dynamicRouting genPluginCfg [options]
選項
- --host=name
- 單一群體動態遞送的必要選項。目標群體控制器的主機名稱。
--host 和 --collectives 選項不可同時指定。
- --password[=pwd]
- 單一群體動態遞送的必要選項。目標群體控制器的「管理者」使用者的密碼。如果沒有定義任何值,則會提示您。
--password 和 --collectives 選項不可同時指定。
- --port=num
- 單一群體動態遞送的必要選項。目標群體控制器的 HTTPS 埠號。
--port 和 --collectives 選項不可同時指定。
- --user=name
- 單一群體動態遞送的必要選項。目標群體控制器的「管理者」使用者。
--user 和 --collectives 選項不可同時指定。
- --pluginInstallRoot=path
- 必要。Web 伺服器主機上之 WebSphere 外掛程式根目錄的完整路徑。
- --webServerNames=webServerName[,webServerName1]
- 必要。需要產生其 WebSphere 外掛程式配置檔的 Web 伺服器名稱(以逗點區隔)。
使用 --collectives 選項時,只指定一個 Web 伺服器名稱。 如果您需要多個 plugin-cfg.xml 檔,請多次執行這個指令。再次執行指令之前,請將產生的 plugin-cfg.xml 檔複製到 Web 伺服器目錄。
--collectives=user1[:password1]@host1:port1,user2[:password2]@host2:port2,…
- 為多個群體產生構件的必要選項。為了取得動態遞送資訊而連接的群體控制器清單。從每一個群體中選取一個控制器。所有控制器都必須啟動。 請以 collective_user:user_password@collective_host:port 格式指定群體,並利用逗點區隔每一個群體。如果未指定密碼,則會提示您。
- --autoAcceptCertificates
- 選用。在這個指令期間,自動信任 SSL 憑證。或者,您也可以將 JVM 內容 com.ibm.websphere.collective.utility.autoAcceptCertificates 設為 true,以自動信任 SSL 憑證。
以下是針對單一群體,使用所有必要引數來執行指令時的輸出:
./dynamicRouting genPluginCfg --port=9444 --host=controller1.acme.com --user=admin --password=password --pluginInstallRoot=/opt/HTTPServer_Plugins --webServerNames=webServer1,webServer2
Generating WebSphere plug-in configuration file for web server webServer1
Auto-accepting the certificate chain for target server.
Certificate subject DN: CN=admin, OU=controller1, O=ibm, C=us
Successfully completed MBean request to the controller.
Successfully generated WebSphere plug-in configuration file s plugin-cfg-webserver1.xml, plugin-cfg-webserver2.xml
Generated WebSphere plug-in configurations plugin-cfg-webserver1.xml, plugin-cfg-webserver2.xml for web servers webserver1, webserver2..
Copy the WebSphere plug-in configuration file to the directory specified in the WebSpherePluginConfig directive in the IBM HTTP Server httpd.conf file.
使用 --collectives 選項時,產生的 plugin-cfg.xml 檔會包含所有群體的相關資訊。
genKeystore
這個動作會產生 PKCS12 或 JKS 格式的金鑰儲存庫檔。請使用 --keystoreType 動作來指定金鑰儲存庫格式。只有在使用 IBM Java 時,才支援產生 PKCS12 金鑰儲存庫。金鑰儲存庫檔含有個人憑證以及 memberRoot 和 controllerRoot 這兩份簽章者憑證,如此就能在 WebSphere 外掛程式和「動態遞送」服務之間進行安全通訊。金鑰儲存庫檔亦用來傳送 HTTPS 要求給 Liberty 群體成員中的應用程式。
如果要取得指令說明,請執行:${wlp.install.dir}/bin/dynamicRouting help genKeystore
說明
產生金鑰儲存庫,內含在「動態遞送」服務與用戶端之間啟用安全通訊所需要的個人憑證和簽章者憑證。
用法
dynamicRouting genKeystore [options]
選項
- --host=name
- 單一群體動態遞送的必要選項。目標群體控制器的主機名稱。
--host 和 --collectives 選項不可同時指定。
- --password[=pwd]
- 單一群體動態遞送的必要選項。目標群體控制器的「管理者」使用者的密碼。如果沒有定義任何值,則會提示您。
--password 和 --collectives 選項不可同時指定。
- --port=num
- 單一群體動態遞送的必要選項。目標群體控制器的 HTTPS 埠號。
--port 和 --collectives 選項不可同時指定。
- --user=name
- 單一群體動態遞送的必要選項。目標群體控制器的「管理者」使用者。
--user 和 --collectives 選項不可同時指定。
- --keystorePassword[=pwd]
- 必要。產生之金鑰儲存庫的密碼。若有指定,但沒有定義任何值,將會提示您。
- --keystoreType=type
- 選用。產生之金鑰儲存庫的類型。預設類型是 JKS。有效值是 JKS 和 PKCS12。
- --certificateSubject=DN
--certificateSubject=DN 不再使用,將會被忽略。如需相關資訊,請參閱動態遞送 SSL 憑證。
--collectives=user1[:password1]@host1:port1,user2[:password2]@host2:port2,…
- 為多個群體產生構件的必要選項。為了取得動態遞送資訊而連接的群體控制器清單。從每一個群體中選取一個控制器。所有控制器都必須啟動。 請以 collective_user:user_password@collective_host:port 格式指定群體,並利用逗點區隔每一個群體。如果未指定密碼,則會提示您。
- --autoAcceptCertificates
- 選用。在這個指令期間,自動信任 SSL 憑證。或者,您也可以將 JVM 內容 com.ibm.websphere.collective.utility.autoAcceptCertificates 設為 true,以自動信任 SSL 憑證。
以下是針對單一群體,使用所有必要引數來執行指令時的輸出:
./dynamicRouting genKeystore --port=9444 --host=controller1.acme.com --user=admin --password=password --keystorePassword
Enter password --keystorePassword:
Re-enter password --keystorePassword:
Auto-accepting the certificate chain for target server.
Certificate subject DN: CN=admin, OU=mycontroller, O=ibm, C=us
Generating keystore...
Successfully completed MBean request to the controller.
Successfully generated keystore plugin-key.jks.
Generated keystore file plugin-key.jks that enables secure communication between the Dynamic Routing service and clients.
If you are using Intelligent Management in the WebSphere plug-in, copy keystore file plugin-key.jks to a directory on the web server host,and run "gskcmd" to convert the keystore to CMS format and to set personal certificate as the default.
For example:
gskcmd -keydb -convert -pw <password> -db /tmp/plugin-key.jks -old_format jks -target /tmp/plugin-key.kdb -new_format cms -stash
gskcmd -cert -setdefault -pw <password> -db /tmp/plugin-key.kdb -label default
Copy resulting /tmp/plugin-key.kdb, .sth, .rdb files to the keyring directory specified in the WebSphere plug-in configuration file.
以下是針對多個群體,使用所有必要引數來執行指令時的輸出:
![[17.0.0.1 以及更新版本]](../ng_v17001plus.gif)
Generating keystore...
Successfully completed MBean request to the controller.
Successfully generated keystore plugin-key-default.jks.
Generating keystore...
Successfully completed MBean request to the controller.
Successfully generated keystore plugin-key-collective2.jks.
Generated keystore file plugin-key-default.jks, plugin-key-collective2.jks, plugin-key.jks that enables secure communication between the Dynamic Routing service and clients.
If you are using Intelligent Management in the WebSphere plug-in, copy keystore file plugin-key-default.jks, plugin-key-collective2.jks, plugin-key.jks to a directory on the web server host,
and run "gskcmd" to convert the keystore to CMS format and to set personal certificate as the default.
For example:
gskcmd -keydb -convert -pw <password> -db /tmp/plugin-key-default.jks, plugin-key-collective2.jks, plugin-key.jks -old_format jks -target /tmp/plugin-key.kdb -new_format cms -stash
gskcmd -cert -setdefault -pw <password> -db /tmp/plugin-key.kdb -label default
Copy resulting /tmp/plugin-key.kdb, .sth, .rdb files to the keyring directory specified in the WebSphere plug-in configuration file.