execute 命令为指定的配置概要文件或单个任务应用配置 XML 文件中的设置。命令名不区分大小写。
如果为在配置管理器图形用户界面中进行创建或编辑的概要文件运行配置 XML 文件,请验证这些 XML 文件是否包含必需密码的值。请先完成此验证,再尝试运行这些文件。
要运行配置 XML 文件,请完成下列步骤:
- 启动或停止应用程序服务器。
表 1. 所需的应用程序服务器状态应用程序服务器类型 |
描述 |
WebSphere® Application
Server |
如果应用程序服务器尚未运行,请将其启动。 |
JBoss Application Server |
停止应用程序服务器。 |
Oracle WebLogic Server |
如果应用程序服务器尚未运行,请将其启动。 |
- 运行配置 XML 文件,可以同时运行所有文件,也可以每次运行一个文件,如以下语法所示。
execute 命令语法
为了便于您阅读,以下命令语法分行显示。请将命令和选项输入在一行上,不要使用任何换行符。
configmgr_cl.exe execute -profile profile_path
[-task task_type | -taskfile
task_file_name] [-silent] [-force] [-debug] [-help]
execute 命令参数
- -profile profile_path
- -profile profile_path 参数指定要创建的概要文件的完整目录路径,例如
C:\Program Files\IBM\EnterpriseRecords\configure
\profiles\WASWebApplicationDeploymentProile
或者以 ..\profiles 文件夹开始的相对路径。
- -task task_type
- -task task_type 参数表示要运行的任务。如果要运行所有任务或者如果指定了 -taskfile task_file_name 参数,那么可以省略 -task task_type 参数。
- -taskfile task_file_name
- -taskfile task_file_name 参数指定要使用的配置 XML 文件。
task_file_name 值不区分大小写。任务文件名由 listTasks 命令报告。
- 可以使用 -task 或 -taskfile 来指定在此概要文件中运行的任务。如果 -task 和 -taskfile 均未指定,那么将运行该概要文件中的所有任务。您不需要同时指定 -task 和 -taskfile。
如果您同时指定了这两项,并且它们不匹配,那么该命令将抛出错误。
- -silent
- -silent 参数表示在该命令运行期间看不到任何输出。
- -debug
- -debug 参数启用针对命令的日志记录。
限制: 安装 HP-UX 时不支持此参数。
- -help
- -help 显示命令帮助。
execute 命令示例
以下示例包括换行符,用于将命令设置为方便阅读的格式。
请将命令和选项输入在一行上,不要使用任何换行符。
- 运行概要文件中的所有任务。
- 以下命令将运行 WSWebApplicationDeploymentProfile 概要文件中的所有任务,该概要文件位于 C:\Program Files\IBM\EnterpriseRecords\configure\profiles\WSWebApplicationDeploymentProfile 目录中。
configmgr_cl.exe execute -profile "C:\Program Files\IBM\EnterpriseRecords
\configure\profiles\WSWebApplicationDeploymentProfile"
- 运行概要文件中的一个任务。
- 以下命令将运行 C:\Program Files\IBM\EnterpriseRecords\configure\profiles\WSWebApplicationDeploymentProfile 目录中的 deployWebApplication 任务:
configmgr_cl.exe execute -profile "C:\Program Files\IBM
\EnterpriseRecords\configure\profiles
\WSWebApplicationDeploymentProfile" -task deployWebApplication
- 运行 -taskfile 指定的一个任务
- 以下命令将运行 C:\Program Files\IBM\EnterpriseRecords\configure\profiles\WSWebApplicationDeploymentProfile 目录中的 redeployWebApplication.xml 配置 XML 文件:
configmgr_cl.exe execute -profile "C:\Program Files\IBM
\EnterpriseRecords\configure\profiles
\WSWebApplicationDeploymentProfile"
-taskfile redeployWebApplication.xml
- 使用 -silent 选项运行概要文件中的一个任务(不显示输出)。
- 以下命令将运行 C:\Program Files\IBM\EnterpriseRecords\configure\profiles\WSWebApplicationDeploymentProfile 目录中的 deployIER 任务(带有 -silent 参数),不显示任何输出:
configmgr_cl.exe execute -profile "C:\Program Files\IBM
\EnterpriseRecords\configure\profiles
\WSWebApplicationDeploymentProfile" -task deployIER -silent
- 显示 execute 命令的帮助。
- 以下命令将显示 execute 命令的帮助:
configmgr_cl.exe execute -help
- 使用 -silent 选项运行(不显示此命令的输出)。
- 以下命令将运行 C:\Program Files\IBM\EnterpriseRecords\configure\profiles\WSWebApplicationDeploymentProfile 目录中的 deployWebApplication 任务(带有 -silent 参数),不显示任何输出:
configmgr_cl.exe execute -profile "C:\Program Files
\IBM\EnterpriseRecords\configure\profiles
\WSWebApplicationDeploymentProfile"
-task deployWebApplication -silent