execute 指令對指定的配置設定檔或個別作業套用配置 XML 檔中的設定。
指令名稱不區分大小寫。
如果您需要對於在「配置管理程式」圖形使用者介面中建立或編輯的設定檔執行配置 XML 檔,在嘗試執行檔案之前,請確認 XML 檔包含必要密碼的值。
如果要執行配置 XML 檔,請執行下列動作:
- 啟動或停止應用程式伺服器。
表 1. 必要的應用程式伺服器狀態應用程式伺服器類型 |
說明 |
WebSphere® Application Server |
啟動尚未執行的應用程式伺服器。 |
JBoss Application Server |
停止應用程式伺服器。 |
Oracle WebLogic 伺服器 |
啟動尚未執行的應用程式伺服器。 |
- 同時執行所有的配置 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 以及設定檔中的一項作業,不會顯示輸出。
- 下列指令以 -silent 執行 C:\Program Files\IBM\EnterpriseRecords\configure\profiles\WSWebApplicationDeploymentProfile 目錄中的 deployIER 作業,不會顯示輸出:
configmgr_cl.exe execute -profile "C:\Program Files\IBM
\EnterpriseRecords\configure\profiles
\WSWebApplicationDeploymentProfile" -task deployIER -silent
- 顯示 execute 指令的說明。
- 下列指令顯示 execute 指令的說明:
configmgr_cl.exe execute -help
- 執行 -silent,不會顯示此指令的輸出。
- 下列指令以 -silent 執行 C:\Program Files\IBM\EnterpriseRecords\configure\profiles\WSWebApplicationDeploymentProfile 目錄中的 deployWebApplication 作業,不會顯示輸出:
configmgr_cl.exe execute -profile "C:\Program Files
\IBM\EnterpriseRecords\configure\profiles
\WSWebApplicationDeploymentProfile"
-task deployWebApplication -silent