![[AIX Solaris HP-UX Linux Windows]](../images/dist.gif)
使用 pct 工具來配置 Web 伺服器外掛程式
WCT 指令會呼叫 -tool 參數指定的指令行工具。您可以使用 WCT 指令,並指定 pct 工具,將 Web 伺服器配置成使用應用程式伺服器作為主伺服器。
程序
- 產品包含下列用來設定環境並呼叫 WCT 指令的 Script。
wctcmd.bat -tool pct -defLocPathname definition_location_pathname -defLocName definition_location_name -importDefinitionLocation -removeDefinitionLocation definition_location_name -listDefinitionLocations -createDefinition -deleteDefinition webserver_definition_name -listDefinitions -response response_file
./wctcmd.sh -tool pct -defLocPathname definition_location_pathname -defLocName definition_location_name -importDefinitionLocation -removeDefinitionLocation definition_location_name -listDefinitionLocations -createDefinition -deleteDefinition webserver_definition_name -listDefinitions -response response_file
- 指定要啟動的工具名稱(如同其向 WCT 指令登錄的名稱)
這是必要參數。
- 指定外掛程式執行時期根位置的邏輯名稱
當您建立或刪除定義時,必須指定這個參數。
- 指定現有外掛程式執行時期根位置的絕對路徑名稱
當您建立或刪除定義時,必須指定這個參數。
- 指定您想將 Web 伺服器外掛程式執行時期位置匯入至工具登錄
在執行這項作業期間,會建立新的定義。
用法範例:
wctcmd.bat -tool pct -importDefinitionLocation -defLocPathname C:\data\IBM\WebSphere\Plugins -defLocName DefinitionLocationName -response C:\IBM\WebSphere\tools\WCT\responsefile.txt
./wctcmd.sh -tool pct -importDefinitionLocation -defLocPathname /opt/IBM/WebSphere/Plugins -defLocName DefinitionLocationName -response /opt/IBM/WebSphere/tools/WCT/responsefile.txt
- 指定您想產生一份內含所有定義位置的清單
用法範例:
wctcmd.bat -tool pct -listDefinitionLocations
./wctcmd.sh -tool pct -listDefinitionLocations
- 指定 pct 工具應移除定義位置
當您移除定義位置時,會使用這個參數。
用法範例:
wctcmd.bat -tool pct -removeDefinitionLocation -defLocPathname C:\data\IBM\WebSphere\Plugins
或./wctcmd.sh -tool pct -removeDefinitionLocation -defLocPathname /opt/IBM/WebSphere/Plugins
wctcmd.bat -tool pct -removeDefinitionLocation -defLocName DefinitionLocationName
./wctcmd.sh -tool pct -removeDefinitionLocation -defLocName DefinitionLocationName
- 指定您正在建立新的 Web 伺服器定義
用法範例:
wctcmd.bat -tool pct -createDefinition -defLocName DefinitionLocationName -response C:\IBM\WebSphere\tools\WCT\responsefile.txt
./wctcmd.sh -tool pct -createDefinition -defLocName DefinitionLocationName -response /opt/IBM/WebSphere/tools/WCT/responsefile.txt
- 指定要刪除的唯一 Web 伺服器外掛程式定義
當您刪除現有定義時,會使用這個參數。
必須指定 definition_name。此外,亦需要下列其中一個參數:用法範例:
wctcmd.bat -tool pct -defLocPathname C:\data\IBM\WebSphere\Plugins -defLocName DefinitionLocationName -deleteDefinition WebServerDefinitionName
./wctcmd.sh -tool pct -defLocPathname /opt/IBM/WebSphere/Plugins -defLocName DefinitionLocationName -deleteDefinition WebServerDefinitionName
- 指定您想產生一份內含所有定義的清單
用法範例:
wctcmd.bat -tool pct -listDefinitions -defLocName DefinitionLocationName
./wctcmd.sh -tool pct -listDefinitions -defLocName DefinitionLocationName
- 指定含有工具引數的回應檔
當您建立定義時,必須指定這個參數。
附註:- 指定要啟動的工具名稱(如同其向 WCT 指令登錄的名稱)
- 指出日誌輸出的精度。引數值可以是一個 1 到 7 的整數,其中 7 是最細微的記載層次。
- 一般參數
參數 值 - 指定配置類型
- WebSphere® Application Server 和 Web 伺服器位於相同機器上
- WebSphere Application Server 和 Web 伺服器分別位於不同機器上
- WebSphere Application Server 上的設定檔會聯合至部署管理程式
- 指定 WebSphere Application
Server 安裝起始目錄的位置
這個選項僅適用於本端配置類型。
WebSphere Application Server 安裝起始目錄的位置
- 指定要配置的 Web 伺服器
只指定一部要配置的 Web 伺服器。
- Apache Web 伺服器 2.2 版
- Lotus® Domino® Web 伺服器 7.0 版
HP-UX 或 Solaris x64 (x86_64) 不支援
- Lotus Domino Web 伺服器 8.0 版
HP-UX 或 Solaris x64 (x86_64) 不支援
- IBM® HTTP Server 7.0 版
- Microsoft Internet
Information Services 第 6 版
Windows 可支援
- Microsoft Internet
Information Services 第 7 版
Windows 可支援
- Microsoft Internet
Information Services 第 8 版
Windows 可支援
- Sun Java™ System Web Server 6.1 版或 Sun Java System Web Server 7.0 版
- 指定 HTTP 管理埠號
只有在配置 IHS 時,才指定此值。
HTTP 管理埠號
- 指定 IHS 管理伺服器的 IHS 管理者使用者 ID
只有在配置 IHS 時,才指定此值。
IHS 管理伺服器的 IHS 管理者使用者 ID
- 指定 IHS 管理伺服器的使用者群組
只有在配置 IHS 時,才指定此值。
IHS 管理伺服器的使用者群組
- 指定第一個 Web 伺服器配置檔
指定的檔案必須存在。
- httpd.conf限制: 為了順利配置伺服器,配置檔的名稱必須保留為 httpd.conf。
- notes.jar
- notes.jar
- httpd.conf限制: 為了順利配置伺服器,配置檔的名稱必須保留為 httpd.conf。
- magnus.conf
- 指定第二個 Web 伺服器配置檔
指定的檔案必須存在。
- names.jar
- names.jar
- obj.conf
- 指定要配置之 Web 伺服器的 Web 伺服器埠
要配置之 Web 伺服器的 Web 伺服器埠
- 指定 Domino 7.0 版或 8.0 版使用者 ID
Domino 7.0 版或 8.0 版使用者 ID
- 指定 Web 伺服器定義名稱
Web 伺服器定義名稱中不能有空格。
Web 伺服器定義名稱(不空格)
- 指定 WebSphere Application
Server 機器的主機名稱
若為 local_standalone 安裝類型,可以省略此規格。
- "hostname"
安裝作業將使用機器上的 hostname 主機名稱。
- ""
將使用目標安裝機器的主機名稱。
小心: 如果您使用 WCT 指令來建立多個 Web 伺服器,並視需要在 Web 伺服器機器上執行 WCT,則每一個 Web 伺服器的主機名稱都是一個衍生的主機名稱 - 是根據您向作業系統查詢其主機名稱的相同類型而來。以這種方式執行 WCT 時,將會建立兩個具有相同主機名稱的 Script 檔,以用來建立節點和 serverindex.xml 檔。
由於同一部機器上有兩個 Web 伺服器,您將會有兩個網路 IP 位址,且您可能希望它們具有唯一的主機名稱。
由於主機名稱是衍生的,且不會提示您提供 Web 伺服器主機名稱,WCT 工具和相關聯的 configurewebserverx.bat/sh Script 將會建立使用相同主機名稱的節點和 serverindex.xml 檔。
為了確保您在同一部機器上建立的兩個 Web 伺服器具有兩個不同的網路 IP 位址,請移至管理主控台,並執行下列動作:- 伺服器 > Web 伺服器 > webserverName
- 按一下「埠」
- 若為受管理節點,請按一下 WEBSERVER_ADDRESS。若為未受管理的節點,請按一下 WEBSERVER_ADMIN_ADDRESS
- 變更 IP 位址(主機名稱)。
- 按一下確定,再按一下儲存。
- 進階參數(僅適用於無聲自動安裝)
參數 值 - 指定是否將所有現有已部署的應用程式對映至 Web 伺服器
如果沒有設定為有效選項,安裝程式將會設為 true,並繼續安裝。
- 將 Web 伺服器定義當成目標對映至現有已部署的應用程式,例如 snoop 和 hit count。(建議)
- 不將應用程式對映至 Web 伺服器定義。
- 在進階實務中,當使用者在機器上具有多個 Web 伺服器主機名稱時,指定用來配置的 Web 伺服器主機名稱
- 安裝作業會解析成在機器上偵測到的主機名稱。(建議)
- 安裝作業將使用機器上的 hostname 主機名稱。
- 指定 Web 伺服器安裝架構
- 適用於 32 位元 Web 伺服器安裝架構
- 適用於 64 位元 Web 伺服器安裝架構
- 要使用的 Web 伺服器機器架構
- 指定要配置之 WebSphere Application Server 設定檔的名稱
- 必須輸入現有 WebSphere Application Server 設定檔的名稱。
如果保留空字串,安裝程式將使用預設設定檔。
這個選項僅適用於本端安裝實務。
- 指定要配置之 IHS 管理伺服器的使用者密碼
只有在配置 IHS 時,才指定此值。
- 必須輸入將用來配置 IHS 管理伺服器的使用者密碼。
- 指定是否要配置 IHS 管理伺服器
只有在配置 IHS 時,才指定此值。
- 將啟用支援,且將配置 IHS 管理伺服器。
- 不啟用支援,且不配置 IHS 管理伺服器。
- 指定是否支援在配置 IHS 管理伺服器時,使用使用者 ID 與密碼作為認證
只有在配置 IHS 時,才指定此值。
- 支援在配置 IHS 管理伺服器時,使用給定的使用者 ID 與密碼。
必須提供其他相關的認證。
- 不支援在配置 IHS 管理伺服器時,使用給定的使用者 ID 與密碼。
不需要其他值。
- 指定要配置的 Web 伺服器類型
只指定一部要配置的 Web 伺服器。
- Apache Web 伺服器 2.2 版
- Lotus Domino Web 伺服器 7.0 版或 8.0 版
HP-UX 或 Solaris x64 (x86_64) 不支援
- IBM HTTP Server 7.0 版
- Microsoft Internet
Information Services 第 6 版、第 7 版或第 8 版
Windows 可支援
- Sun Java System Web Server 6.1 版或 7.0 版
- 指定要建立在 Windows 上的 IHS 管理服務的啟動類型
只有在配置 IHS 時,才指定此值。
只能與 Windows 作業系統搭配使用。
- 當系統開機時,服務會自動啟動。
- 必須提出要求,服務才會啟動。
- 指定在 Windows 上配置 IHS 管理伺服器時,要使用的使用者 ID
只有在配置 IHS 時,才指定此值。
只能與 Windows 作業系統搭配使用。
- 必須輸入將用來配置 IHS 管理伺服器的名稱。
- 指定在 Windows 上配置 IHS 管理伺服器時,要使用的使用者密碼
只有在配置 IHS 時,才指定此值。
只能與 Windows 作業系統搭配使用。
- 必須輸入將用來配置 IHS 管理伺服器的使用者密碼。
- 指定是否將 IHS 管理伺服器配置成以 Windows 服務形式執行
只有在配置 IHS 時,才指定此值。
只能與 Windows 作業系統搭配使用。
- 支援將 IHS 管理伺服器配置成 Windows 服務
- 不支援將 IHS 管理伺服器配置成 Windows 服務。
註: 執行 WCT 指令之後,會將 Web 伺服器配置成使用應用程式伺服器作為主伺服器。WCT 指令也會在含有配置檔的目錄中,建立新的回應檔。這個回應檔可能含有兩個未記載的項目:defLocPathname 和 profilePath,就功能上來說,產品不支援這兩項。新的回應檔含有用來建立 Web 伺服器配置的資訊。 - 指定是否將所有現有已部署的應用程式對映至 Web 伺服器
下列範例是 IHS 本端外掛程式配置的回應檔內容。webServerOS 參數用來指定 Web 伺服器的作業系統,其有效值是 Windows、Linux、Solaris、AIX®、HPUX、OS390 和 OS400。
configType=local_standalone enableAdminServerSupport=true enableUserAndPass=true enableWinService=false ihsAdminCreateUserAndGroup=true ihsAdminPassword=****** ihsAdminPort=8008 ihsAdminUnixUserGroup=grp101 ihsAdminUnixUserID=user1 mapWebServerToApplications=true profileName=AppSrv01 wasExistingLocation=/opt/IBM/WebSphere/AppServer85 webServerConfigFile1=/opt/IBM/HTTPServer/conf/httpd.conf webServerDefinition=webserver1 webServerHostName=local.ibm.com webServerOS=operating_system_value webServerPortNumber=80 webServerSelected=ihs
configType=local_standalone enableAdminServerSupport=true enableUserAndPass=true enableWinService=true ihsAdminPassword=****** ihsAdminPort=8008 ihsAdminUserID=admin1 ihsWindowsPassword=****** ihsWindowsStartupType=auto ihsWindowsUserID=user1 mapWebServerToApplications=true profileName=AppSrv01 wasExistingLocation=D:\\IBM\\WebSphere\\AppServer85 webServerConfigFile1=D:\\IBM\\HTTPServer\\conf\\httpd.conf webServerDefinition=webserver1 webServerHostName=local.ibm.com webServerInstallArch=32 webServerPortNumber=80 webServerSelected=ihs
下列範例是 IHS 遠端外掛程式配置的回應檔內容。webServerOS 參數用來指定 Web 伺服器的作業系統,其有效值是 Windows、Linux、Solaris、AIX、HPUX、OS390 和 OS400。
configType=remote enableAdminServerSupport=true enableUserAndPass=true enableWinService=false ihsAdminCreateUserAndGroup=true ihsAdminPassword=****** ihsAdminPort=8008 ihsAdminUnixUserGroup=grp101 ihsAdminUnixUserID=user1 mapWebServerToApplications=true wasMachineHostname=192.168.1.2 webServerConfigFile1=/opt/IBM/HTTPServer/conf/httpd.conf webServerDefinition=webserver1 webServerHostName=remote.ibm.com webServerOS=operating_system_value webServerPortNumber=80 webServerSelected=ihs
configType=remote enableAdminServerSupport=true enableUserAndPass=true enableWinService=true ihsAdminPassword=****** ihsAdminPort=8008 ihsAdminUserID=admin1 ihsWindowsPassword=****** ihsWindowsStartupType=auto ihsWindowsUserID=user1 mapWebServerToApplications=true wasMachineHostname=192.168.1.2 webServerConfigFile1=D:\IBM\HTTPServer\conf\httpd.conf webServerDefinition=webserver1 webServerHostName=remote.ibm.com webServerInstallArch=32 webServerOS=windows webServerPortNumber=80 webServerSelected=ihs
下一步
- 按一下埠。
- 按一下 WEBSERVER_ADDRESS。如果是未受管理模式,請按一下 WEBSERVER_ADMIN_ADDRESS。
- 變更主機名稱。
- 按一下確定,加以儲存。