[AIX Solaris HP-UX Linux Windows]

使用 pct 工具來配置 Web 伺服器外掛程式

WCT 指令會呼叫 -tool 參數指定的指令行工具。您可以使用 WCT 指令,並指定 pct 工具,將 Web 伺服器配置成使用應用程式伺服器作為主伺服器。

程序

將 Web 伺服器配置成使用應用程式伺服器作為主伺服器。
WCT 指令的位置
產品包含下列用來設定環境並呼叫 WCT 指令的 Script。
  • [Windows]WCT_install_root\WCT\wctcmd.bat
  • [Linux]WCT_install_root/WCT/wctcmd.sh
呼叫 pct 工具時所用的 WCT 指令語法
[Windows]
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
[Linux]
./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
呼叫 pct 工具時所用的 WCT 指令參數
-tool pct
指定要啟動的工具名稱(如同其向 WCT 指令登錄的名稱)

這是必要參數。

-defLocName definition_location_name
指定外掛程式執行時期根位置的邏輯名稱

當您建立或刪除定義時,必須指定這個參數。

-defLocPathname definition_location_pathname
指定現有外掛程式執行時期根位置的絕對路徑名稱

當您建立或刪除定義時,必須指定這個參數。

-importDefinitionLocation
指定您想將 Web 伺服器外掛程式執行時期位置匯入至工具登錄

在執行這項作業期間,會建立新的定義。

用法範例:

[Windows]
wctcmd.bat -tool pct -importDefinitionLocation -defLocPathname C:\data\IBM\WebSphere\Plugins -defLocName DefinitionLocationName -response C:\IBM\WebSphere\tools\WCT\responsefile.txt
[Linux]
./wctcmd.sh -tool pct -importDefinitionLocation -defLocPathname /opt/IBM/WebSphere/Plugins -defLocName DefinitionLocationName -response /opt/IBM/WebSphere/tools/WCT/responsefile.txt
-listDefinitionLocations
指定您想產生一份內含所有定義位置的清單

用法範例:

[Windows]
wctcmd.bat -tool pct -listDefinitionLocations
[Linux]
./wctcmd.sh -tool pct -listDefinitionLocations
-removeDefinitionLocation
指定 pct 工具應移除定義位置

當您移除定義位置時,會使用這個參數。

用法範例:

[Windows]
wctcmd.bat -tool pct -removeDefinitionLocation -defLocPathname C:\data\IBM\WebSphere\Plugins
[Linux]
./wctcmd.sh -tool pct -removeDefinitionLocation -defLocPathname /opt/IBM/WebSphere/Plugins
[Windows]
wctcmd.bat -tool pct -removeDefinitionLocation -defLocName DefinitionLocationName
[Linux]
./wctcmd.sh -tool pct -removeDefinitionLocation -defLocName DefinitionLocationName
-createDefinition
指定您正在建立新的 Web 伺服器定義

用法範例:

[Windows]
wctcmd.bat -tool pct -createDefinition -defLocName DefinitionLocationName -response C:\IBM\WebSphere\tools\WCT\responsefile.txt
[Linux]
./wctcmd.sh -tool pct -createDefinition -defLocName DefinitionLocationName -response /opt/IBM/WebSphere/tools/WCT/responsefile.txt
-deleteDefinition webserver_definition_name
指定要刪除的唯一 Web 伺服器外掛程式定義

當您刪除現有定義時,會使用這個參數。

必須指定 definition_name。此外,亦需要下列其中一個參數:
  • -defLocName definition_location_name
  • -defLocPathname definition_location_pathname
如果同時提供兩個參數值,會採用第一個。如果所提供的第一個值沒有通過驗證檢查,指令會失敗,並產生錯誤訊息。

用法範例:

[Windows]
wctcmd.bat -tool pct -defLocPathname C:\data\IBM\WebSphere\Plugins -defLocName DefinitionLocationName -deleteDefinition WebServerDefinitionName
[Linux]
./wctcmd.sh -tool pct -defLocPathname /opt/IBM/WebSphere/Plugins -defLocName DefinitionLocationName -deleteDefinition WebServerDefinitionName
-listDefinitions
指定您想產生一份內含所有定義的清單

用法範例:

[Windows]
wctcmd.bat -tool pct -listDefinitions -defLocName DefinitionLocationName
[Linux]
./wctcmd.sh -tool pct -listDefinitions -defLocName DefinitionLocationName
-response response_file
指定含有工具引數的回應檔

當您建立定義時,必須指定這個參數。

附註:
  • 指令行引數有區分大小寫。
  • 如果引數接受含有空格的值,該值必須括上雙引號 (" ")。
-logLevel integer_value
指出日誌輸出的精度。引數值可以是一個 1 到 7 的整數,其中 7 是最細微的記載層次。
pct 工具的參數
一般參數
參數
configType
指定配置類型
local_standalone
WebSphere® Application Server 和 Web 伺服器位於相同機器上
remote
WebSphere Application Server 和 Web 伺服器分別位於不同機器上
local_distributed
WebSphere Application Server 上的設定檔會聯合至部署管理程式
wasExistingLocation
指定 WebSphere Application Server 安裝起始目錄的位置

這個選項僅適用於本端配置類型。

WebSphere Application Server 安裝起始目錄的位置

webServerSelected
指定要配置的 Web 伺服器

只指定一部要配置的 Web 伺服器。

apache22
Apache Web 伺服器 2.2 版
domino7
Lotus® Domino® Web 伺服器 7.0 版

HP-UX 或 Solaris x64 (x86_64) 不支援

domino8
Lotus Domino Web 伺服器 8.0 版

HP-UX 或 Solaris x64 (x86_64) 不支援

ihs
IBM® HTTP Server 7.0 版
iis6
Microsoft Internet Information Services 第 6 版

Windows 可支援

iis7
Microsoft Internet Information Services 第 7 版

Windows 可支援

iis8
Microsoft Internet Information Services 第 8 版

Windows 可支援

sunone
Sun Java™ System Web Server 6.1 版或 Sun Java System Web Server 7.0 版
ihsAdminPort
指定 HTTP 管理埠號

只有在配置 IHS 時,才指定此值。

HTTP 管理埠號

ihsAdminUserID
指定 IHS 管理伺服器的 IHS 管理者使用者 ID

只有在配置 IHS 時,才指定此值。

IHS 管理伺服器的 IHS 管理者使用者 ID

ihsAdminUserGroup
指定 IHS 管理伺服器的使用者群組

只有在配置 IHS 時,才指定此值。

IHS 管理伺服器的使用者群組

webServerConfigFile1
指定第一個 Web 伺服器配置檔

指定的檔案必須存在。

apache
httpd.conf
限制: 為了順利配置伺服器,配置檔的名稱必須保留為 httpd.conf
domino7
notes.jar
domino8
notes.jar
ihs
httpd.conf
限制: 為了順利配置伺服器,配置檔的名稱必須保留為 httpd.conf
sunone
magnus.conf
webServerConfigFile2
指定第二個 Web 伺服器配置檔

指定的檔案必須存在。

domino7
names.jar
domino8
names.jar
sunone
obj.conf
webServerPortNumber
指定要配置之 Web 伺服器的 Web 伺服器埠

要配置之 Web 伺服器的 Web 伺服器埠

dominoUserID
指定 Domino 7.0 版或 8.0 版使用者 ID

Domino 7.0 版或 8.0 版使用者 ID

webServerDefinition
指定 Web 伺服器定義名稱

Web 伺服器定義名稱中不能有空格。

Web 伺服器定義名稱(不空格)

wasMachineHostName
指定 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 位址,請移至管理主控台,並執行下列動作:
  1. 伺服器 > Web 伺服器 > webserverName
  2. 按一下「埠」
  3. 若為受管理節點,請按一下 WEBSERVER_ADDRESS。若為未受管理的節點,請按一下 WEBSERVER_ADMIN_ADDRESS
  4. 變更 IP 位址(主機名稱)。
  5. 按一下確定,再按一下儲存
進階參數(僅適用於無聲自動安裝)
參數
mapWebserverToApplications
指定是否將所有現有已部署的應用程式對映至 Web 伺服器

如果沒有設定為有效選項,安裝程式將會設為 true,並繼續安裝。

true
將 Web 伺服器定義當成目標對映至現有已部署的應用程式,例如 snoop 和 hit count。(建議)
false
不將應用程式對映至 Web 伺服器定義。
webServerHostName
在進階實務中,當使用者在機器上具有多個 Web 伺服器主機名稱時,指定用來配置的 Web 伺服器主機名稱
""
安裝作業會解析成在機器上偵測到的主機名稱。(建議)
"hostname"
安裝作業將使用機器上的 hostname 主機名稱。
webServerInstallArch
指定 Web 伺服器安裝架構
"32"
適用於 32 位元 Web 伺服器安裝架構
"64"
適用於 64 位元 Web 伺服器安裝架構
""
要使用的 Web 伺服器機器架構
profileName
指定要配置之 WebSphere Application Server 設定檔的名稱
"profile_name"
必須輸入現有 WebSphere Application Server 設定檔的名稱。

如果保留空字串,安裝程式將使用預設設定檔。

這個選項僅適用於本端安裝實務。

ihsAdminPassword
指定要配置之 IHS 管理伺服器的使用者密碼

只有在配置 IHS 時,才指定此值。

"IHS_admin_password"
必須輸入將用來配置 IHS 管理伺服器的使用者密碼。
enableAdminServerSupport
指定是否要配置 IHS 管理伺服器

只有在配置 IHS 時,才指定此值。

true
將啟用支援,且將配置 IHS 管理伺服器。
false
不啟用支援,且不配置 IHS 管理伺服器。
enableUserAndPass
指定是否支援在配置 IHS 管理伺服器時,使用使用者 ID 與密碼作為認證

只有在配置 IHS 時,才指定此值。

true
支援在配置 IHS 管理伺服器時,使用給定的使用者 ID 與密碼。

必須提供其他相關的認證。

false
不支援在配置 IHS 管理伺服器時,使用給定的使用者 ID 與密碼。

不需要其他值。

webServerType
指定要配置的 Web 伺服器類型

只指定一部要配置的 Web 伺服器。

APACHE
Apache Web 伺服器 2.2 版
DOMINO
Lotus Domino Web 伺服器 7.0 版或 8.0 版

HP-UX 或 Solaris x64 (x86_64) 不支援

IHS
IBM HTTP Server 7.0 版
IIS
Microsoft Internet Information Services 第 6 版、第 7 版或第 8 版

Windows 可支援

SUNJAVASYSTEM
Sun Java System Web Server 6.1 版或 7.0 版
ihsWindowsStartupType
指定要建立在 Windows 上的 IHS 管理服務的啟動類型

只有在配置 IHS 時,才指定此值。

只能與 Windows 作業系統搭配使用。

auto
當系統開機時,服務會自動啟動。
demand
必須提出要求,服務才會啟動。
ihsAdminWinUserID
指定在 Windows 上配置 IHS 管理伺服器時,要使用的使用者 ID

只有在配置 IHS 時,才指定此值。

只能與 Windows 作業系統搭配使用。

"IHS_admin_user_ID"
必須輸入將用來配置 IHS 管理伺服器的名稱。
ihsAdminWinPassword
指定在 Windows 上配置 IHS 管理伺服器時,要使用的使用者密碼

只有在配置 IHS 時,才指定此值。

只能與 Windows 作業系統搭配使用。

"IHS_admin_password"
必須輸入將用來配置 IHS 管理伺服器的使用者密碼。
enableWinService
指定是否將 IHS 管理伺服器配置成以 Windows 服務形式執行

只有在配置 IHS 時,才指定此值。

只能與 Windows 作業系統搭配使用。

true
支援將 IHS 管理伺服器配置成 Windows 服務
false
不支援將 IHS 管理伺服器配置成 Windows 服務。
註: 執行 WCT 指令之後,會將 Web 伺服器配置成使用應用程式伺服器作為主伺服器。WCT 指令也會在含有配置檔的目錄中,建立新的回應檔。這個回應檔可能含有兩個未記載的項目:defLocPathnameprofilePath,就功能上來說,產品不支援這兩項。新的回應檔含有用來建立 Web 伺服器配置的資訊。
使用 pct 工具將 IHS Web 伺服器配置成使用應用程式伺服器作為主伺服器的範例如下:
  • [Windows]wctcmd.bat -tool pct -defLocPathname C:\data\IBM\WebSphere\Plugins -defLocName someDefinitionLocationName -createDefinition -response C:\IBM\WebSphere\tools\WCT\responsefile.txt
  • [Linux]./wctcmd.sh -tool pct -defLocPathname /opt/IBM/WebSphere/Plugins -defLocName someDefinitionLocationName -createDefinition -response /opt/IBM/WebSphere/tools/WCT/responsefile.txt

下列範例是 IHS 本端外掛程式配置的回應檔內容。webServerOS 參數用來指定 Web 伺服器的作業系統,其有效值是 Windows、Linux、Solaris、AIX®、HPUX、OS390 和 OS400。

[AIX][HP-UX][Linux][Solaris]
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
[Windows]
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。

[AIX][HP-UX][Linux][Solaris]
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
[Windows]
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

下一步

註: 如果您的機器有多個主機名稱和 IP 位址,您可以使用 pct 工具。不過,透過 PCT 圖形使用者介面來配置 Web 伺服器之後,必須利用下列程序來設定主機名稱:
  1. 按一下
  2. 按一下 WEBSERVER_ADDRESS。如果是未受管理模式,請按一下 WEBSERVER_ADMIN_ADDRESS
  3. 變更主機名稱。
  4. 按一下確定,加以儲存。

指出主題類型的圖示 作業主題



時間戳記圖示 前次更新: last_date
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=tins_pctcl_using
檔名:tins_pctcl_using.html