For distributed platformsFor z/OS platforms

动态路由选择命令

setupgenPluginCfggenKeystore dynamicRouting 命令操作用于生成插件配置和密钥库文件。进行初始设置后,可随时使用 genPluginCfg dynamicRouting 命令操作重新生成 plugin-cfg.xml 文件。例如,对新控制器启用动态路由选择功能部件或添加新 Web 服务器时。genKeystore dynamicRouting 命令操作用于生成密钥库文件。每个 dynamicRouting 命令操作都支持联机帮助。

动态路由选择功能部件的命令包括:

setup

setup dynamicRouting 命令以 PKCS12 或 JKS 格式生成密钥库文件及一个或多个 WebSphere® 插件配置文件。密钥库文件包含个人证书及 memberRootcontrollerRoot 签署者证书,它们允许在 WebSphere 插件与动态路由选择服务间安全通信。还会使用密钥库文件向 Liberty 集合体成员中的应用程序发送 HTTPS 请求。插件配置文件包含 <IntelligentManagement> 节,该节在 WebSphere 插件中启用智能管理。<IntelligentManagement> 节包含表示集合体的一个 <ConnectorCluster> 节。对于集合体中启用了动态路由选择功能部件的每个控制器,<ConnectorCluster> 节包含一个 <Connector> 节。

要获取命令帮助,请运行:${wlp.install.dir}/bin/dynamicRouting help setup

描述

setup dynamicRouting 命令生成密钥库文件,其中包含在动态路由选择服务与客户机之间进行安全通信时所需的个人证书和签署者证书。它还会生成带有 <IntelligentManagement> 节的 WebSphere 插件配置文件,该节将在 WebSphere 插件中启用智能管理。

用法

dynamicRouting setup [options]

选项

--host=name
它是单集合体动态路由选择所必需的。目标集合体控制器的主机名。

[17.0.0.1 and later]不要指定带 --collectives 选项的 --host

--password[=pwd]
它是单集合体动态路由选择所必需的。目标集合体控制器的管理员用户的密码。如果未定义值,那么系统会提示您进行定义。

[17.0.0.1 and later]不要指定带 --collectives 选项的 --password

--port=num
它是单集合体动态路由选择所必需的。目标集合体控制器的 HTTPS 端口号。

[17.0.0.1 and later]不要指定带 --collectives 选项的 --port

--user=name
它是单集合体动态路由选择所必需的。目标集合体控制器的管理员用户。

[17.0.0.1 and later]不要指定带 --collectives 选项的 --user

--pluginInstallRoot=path
必需。Web 服务器主机上的 WebSphere 插件根目录的标准路径。
--webServerNames=webServerName[,webServerName1]
必需。需要对其生成 WebSphere 插件配置文件的 Web 服务器的名称(名称之间以逗号分隔)。

[17.0.0.1 and later]使用 --collectives 选项,仅指定一个 Web 服务器名称。如果需要多个 plugin-cfg.xml 文件,请运行命令多次。再次运行此命令之前,完成处理所有生成的文件。

--keystorePassword[=pwd]
必需。所生成密钥库的密码。如果已指定但未定义值,那么系统会提示您进行定义。
--keystoreType=type
可选。所生成密钥库的类型。缺省类型为 JKS。有效值为 JKSPKCS12
--certificateSubject=DN

--certificateSubject=DN 不再使用,将忽略。有关更多信息,请参阅动态路由选择 SSL 证书

[17.0.0.1 and later]--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 证书。
注: setupgenKeystore 命令生成的密钥库为 JKSPKCS12 格式。需要将该库复制到 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,webServer2
Generating 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 and later]以下是针对多个集合体带所有必需自变量运行时的命令输出:

[17.0.0.1 and later]./dynamicRouting setup --collectives=admin:pw@controller1.acme.com:9443,admin:pw@controller2.acme.com:9443 --keystorePassword=keypass --pluginInstallRoot=/opt/HTTPServer_Plugins --webServerNames=webserver1
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.xmlplugin-cfg-webServer2.xml 文件。

[17.0.0.1 and later]使用 --collectives 选项,仅指定一个 Web 服务器名称。如果需要多个 plugin-cfg.xml 文件,请运行命令多次。将生成的 plugin-cfg.xml 文件复制到 Web 服务器目录,然后再次运行此命令。

要获取命令帮助,请运行:${wlp.install.dir}/bin/dynamicRouting help genPluginCfg

描述

生成带有 <IntelligentManagement> 节的 WebSphere 插件配置文件,该节将在 WebSphere 插件中启用智能管理。

用法

dynamicRouting genPluginCfg [options]

选项

--host=name
它是单集合体动态路由选择所必需的。目标集合体控制器的主机名。

[17.0.0.1 and later]不要指定带 --collectives 选项的 --host

--password[=pwd]
它是单集合体动态路由选择所必需的。目标集合体控制器的管理员用户的密码。如果未定义值,那么系统会提示您进行定义。

[17.0.0.1 and later]不要指定带 --collectives 选项的 --password

--port=num
它是单集合体动态路由选择所必需的。目标集合体控制器的 HTTPS 端口号。

[17.0.0.1 and later]不要指定带 --collectives 选项的 --port

--user=name
它是单集合体动态路由选择所必需的。目标集合体控制器的管理员用户。

[17.0.0.1 and later]不要指定带 --collectives 选项的 --user

--pluginInstallRoot=path
必需。Web 服务器主机上的 WebSphere 插件根目录的标准路径。
--webServerNames=webServerName[,webServerName1]
必需。需要对其生成 WebSphere 插件配置文件的 Web 服务器的名称(名称之间以逗号分隔)。

[17.0.0.1 and later]使用 --collectives 选项,仅指定一个 Web 服务器名称。如果需要多个 plugin-cfg.xml 文件,请运行命令多次。将生成的 plugin-cfg.xml 文件复制到 Web 服务器目录,然后再次运行此命令。

[17.0.0.1 and later]--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. 

[17.0.0.1 and later]对于 --collectives 选项,生成的 plugin-cfg.xml 文件包含有关所有集合体的信息。

genKeystore

此操作以 PKCS12 或 JKS 格式生成密钥库文件。使用 --keystoreType 操作以指定密钥库格式。仅当使用 IBM Java 时,才支持生成 PKCS12 密钥库。密钥库文件包含个人证书及 memberRootcontrollerRoot 签署者证书,它们允许在 WebSphere 插件与动态路由选择服务间安全通信。还会使用密钥库文件向 Liberty 集合体成员中的应用程序发送 HTTPS 请求。

要获取命令帮助,请运行:${wlp.install.dir}/bin/dynamicRouting help genKeystore

描述

生成密钥库,此密钥库包含在动态路由选择服务与客户机之间进行安全通信时所需的个人证书和签署者证书。

用法

dynamicRouting genKeystore [options]

选项

--host=name
它是单集合体动态路由选择所必需的。目标集合体控制器的主机名。

[17.0.0.1 and later]不要指定带 --collectives 选项的 --host

--password[=pwd]
它是单集合体动态路由选择所必需的。目标集合体控制器的管理员用户的密码。如果未定义值,那么系统会提示您进行定义。

[17.0.0.1 and later]不要指定带 --collectives 选项的 --password

--port=num
它是单集合体动态路由选择所必需的。目标集合体控制器的 HTTPS 端口号。

[17.0.0.1 and later]不要指定带 --collectives 选项的 --port

--user=name
它是单集合体动态路由选择所必需的。目标集合体控制器的管理员用户。

[17.0.0.1 and later]不要指定带 --collectives 选项的 --user

--keystorePassword[=pwd]
必需。所生成密钥库的密码。如果已指定但未定义值,那么系统会提示您进行定义。
--keystoreType=type
可选。所生成密钥库的类型。缺省类型为 JKS。有效值为 JKSPKCS12
--certificateSubject=DN

--certificateSubject=DN 不再使用,将忽略。有关更多信息,请参阅动态路由选择 SSL 证书

[17.0.0.1 and later]--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 and later]以下是针对多个集合体带所有必需自变量运行时的命令输出:

[17.0.0.1 and later]./dynamicRouting genKeystore --collectives=admin:admin@localhost:9443,admin:admin@localhost:9446 --keystorePassword=webAS
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.

用于指示主题类型的图标 参考主题

文件名:rwlp_wve_dynroutcollect.html