[z/OS]

在 z/OS 上安裝和配置 IBM HTTP Server for WebSphere Application Server 的外掛程式

IBM® HTTP Server for WebSphere® Application Server 外掛程式是 WebSphere Application Server Web 伺服器外掛程式元件的一部分。外掛程式可讓 IBM HTTP Server for WebSphere Application Server 與 WebSphere Application Server 通訊。如果要使用這個外掛程式,您必須具有 IBM HTTP Server for WebSphere Application Server(採用 Apache 技術),並且在 z/OS® 上執行。

開始之前

安裝外掛程式之前,請先將 IBM HTTP Server for WebSphere Application Server 軟體安裝在 z/OS 系統上,並且配置 IBM HTTP Server 實例。請參閱有關將 IBM HTTP Server for WebSphere Application Server 安裝在 z/OS 上的產品說明文件。

關於這項作業

在執行 Web 伺服器配置程序期間,您將建立 Web 伺服器實例的安裝目錄。下列範例使用 值 /etc/websrv1 作為 Web 伺服器的安裝目錄。外掛程式配置檔的建議位置是 Web 伺服器安裝目錄中的 子目錄 PluginsPlugins 目錄將含有子目錄 conf/WAS_webserver_name,外掛程式配置檔 plugin-cfg.xml 通常位於這個目錄中。

此程序概述如何將 IBM HTTP Server for WebSphere Application Server 外掛程式安裝及配置在 z/OS 上。

程序

  1. 安裝 Web 伺服器外掛程式。 使用 IBM Installation Manager,安裝 WebSphere Application Server for z/OS 的 Web 伺服器外掛程式,並將產品檔案系統裝載在目標 z/OS 系統上。依預設,外掛程式位於 /usr/lpp/WebSphere/Plugins/V9R0 目錄。
  2. 使用 Web 伺服器實例的伺服器 ID 登入 OMVS Shell。 install_pluginConfigureIHSPlugin Script 必須以這個使用者 ID 執行,這樣 Web 伺服器實例的相同群組即擁有所有的檔案。
  3. 建立外掛程式的安裝目錄。 外掛程式的目錄會包含配置資訊,當外掛程式在這個 Web 伺服器實例之下執行時,會使用此配置資訊。這個目錄的建議位置是 Web 伺服器實例安裝目錄中的子目錄 Plugins
    如果要建立執行時期安裝映像檔,請執行 plugin_smp_location/bin/install_plugin.sh 指令:
    ./install_plugin.sh 
       -pluginInstallLocation product_directory_of_plugin_code
       -pluginRuntimeLocation install_directory_of_Web_server_plugin
       -wasInstallLocation   product_directory_of_WebSphere_Application_Server
    以下是這個指令的呼叫範例:
    cd /usr/lpp/WebSphere/Plugins/V9R0/bin
    ./install_plugin.sh
       -pluginInstallLocation /usr/lpp/WebSphere/Plugins/V9R0/
       -pluginRuntimeLocation /etc/websrv1/Plugins
       -wasInstallLocation    /usr/lpp/WebSphere/AppServer/V9R0
  4. 將 IBM HTTP Server for z/OS 實例配置成使用 Web 伺服器外掛程式。
    執行 plugin_runtime_location/bin/ConfigureIHSPlugin.sh 指令,將 IBM HTTP Server 配置成使用 Web 伺服器外掛程式:
    ./ConfigureIHSPlugin.sh
       -plugin.home       install_directory_of_Webserver_plugin
       -plugin.config.xml location_of_plugin-cfg.xml_file
       -ihs.conf.file     location_of_httpd.conf_file
       -operating.system   ZOS
       -WAS.webserver.name Webserver_name_defined_to_WebSphere_Application_Server
       -WAS.host.name     hostname_or_IP_address_of_WebSphere_Application_Server
    以下是這個指令的呼叫範例:
    cd /etc/websrv1/Plugins/bin
    ./ConfigureIHSPlugin.sh 
       -plugin.home /etc/websrv1/Plugins 
       -plugin.config.xml /etc/websrv1/Plugins/config/webserver1/plugin-cfg.xml
       -ihs.conf.file /etc/websrv1/conf/httpd.conf 
       -operating.system ZOS
       -WAS.webserver.name webserver1 
       -WAS.host.name appsrv1.mycorp.com
  5. 將本端或遠端 z/OS Web 伺服器的 Web 伺服器定義,建立在 WebSphere Application Server 中。
    • 在建立設定檔期間,如果要新增 Web 伺服器定義,請使用「設定檔管理工具」或 zpmt 指令。
    • 如果要將 Web 伺服器新增至現有 WebSphere Application Server 設定檔,請使用管理主控台、createWebServerDefinition.jacl Script 或 wsadmin createWebServer 指令。
    將 Web 伺服器定義到 WebSphere Application Server
    • 對於 Web 伺服器名稱,請使用指定給 WAS.webserver.name 的值
    • 對於 Web 伺服器外掛程式安裝目錄,請使用指定給 PluginRuntimeLocation 的值
  6. 配置外掛程式。 使用管理主控台或發出 GenPluginCfg 指令,來建立 plugin-cfg.xml 檔。
    避免困難 避免困難: 您必須先刪除 profile_root/config/cells 目錄中的 plugin-cfg.xml 檔,才能完成這項作業。否則,配置變更不會持續保存在 plugin-cfg.xml 檔中。gotcha
    註: 這兩種方法都會建立 ASCII 格式的外掛程式配置檔 plugin-cfg.xml
    1. 如果您需要編輯這個檔案,請發出下列指令,將檔案轉換成 EBCDIC 格式:
      iconv  -f ISO8859-1 -t IBM-1047 plugin-cfg.xml.ASCII > plugin-cfg.xml.EBCDIC
    2. 編輯檔案,然後發出下列指令,將它轉換回 ASCII 格式:
      iconv  -f IBM-1047 -t ISO8859-1  plugin-cfg.xml.EBCDIC > plugin-cfg.xml.ASCII
    如果要使用管理主控台,請執行下列動作:
    1. 選取伺服器 > 伺服器類型 > Web 伺服器 > webserver > 外掛程式內容
    2. 選取自動產生外掛程式配置檔,或按一下下列一或多個主題,以手動配置 plugin-cfg.xml 檔:
      • 快取
      • 要求和回應
      • 要求遞送
      • 服務
    3. 按一下確定
    4. 您可能需要停止再重新啟動應用程式伺服器,讓 Web 伺服器可以找到 plugin-cfg.xml 檔。

    您可能需要手動將 plugin-cfg.xml 檔,複製到 Web 伺服器外掛程式安裝目錄中的正確位置。

  7. 確定您是以 IBM HTTP Server for z/OS 所用埠號的別名來配置虛擬主機。如果您已手動配置 plugin-cfg.xml 檔,請在管理主控台中,移至伺服器 > 伺服器類型 > WebSphere 應用程式伺服器 > 外掛程式內容 > 要求和回應頁面,並確定對於虛擬主機比對,選取的是實際使用要求中指定的埠
  8. 如果您想讓 Web 伺服器外掛程式使用私密標頭,請定義 SSL 配置儲存庫,且其定義了信任檔。然後在管理主控台中,按一下伺服器 > 伺服器類型 > WebSphere 應用程式伺服器 > server_name,然後在「儲存器設定」區段中,按一下 Web 儲存器設定 > Web 儲存器傳輸鏈 > secure_transport_chain > SSL 入埠通道 (SSL_2),並將這個儲存庫指定給該傳輸鏈。
    避免困難 避免困難: 信任檔提供給 IBM HTTP Server for z/OS(採用 Apache 技術)的功能,與提供給產品舊版中 5.3 版 HTTP Server for z/OS 的 TrustedProxy 自訂內容的功能相同。gotcha

    如果您嘗試使用私密標頭,卻沒有設定未包含信任檔定義的 SSL 配置儲存庫,將會忽略私密標頭。如果忽略私密標頭,應用程式伺服器可能找不到所要求的應用程式。

    啟用私密標頭之後,傳輸鏈的 SSL 入埠通道會信任它所收到的所有私密標頭。因此,您必須確定傳輸鏈的 SSL 入埠通道的所有路徑都是授信的。

  9. 如果您想讓 Web 伺服器外掛程式能夠使用「系統授權機能 (SAF)」金鑰環,而不是 kdb 檔與隱藏檔內容搭配使用,您必須從管理主控台建立下列兩個自訂外掛程式內容。
    • KeyringLocation:設為 SAF 金鑰環的目錄位置
    • StashfileLocation,設為 ""(空值)

    如需如何從管理主控台建立 KeyringLocation 和 StashfileLocation,以便在 SSL 配置中使用 SAF 金鑰環的相關指示,請參閱 Web 伺服器外掛程式配置內容的相關資訊。另請參閱 plugin-cfg.xml 檔中的資訊。

  10. 配置完成。 如果要啟動配置,請停止再重新啟動應用程式伺服器和 IBM HTTP Server 兩者。

結果

如果 IBM HTTP Server for z/OS 外掛程式在 IBM HTTP Server 重新啟動時能順利啟動,外掛程式日誌檔 /plugin_runtime_dir/log/webserver_name/http_plugin.log 中會新增一則訊息。出現在 http_plugin.log 中的訊息類似下列輸出範例:

PLUGIN: Plugins loaded.
PLUGIN: --------------------System Information-----------------------
PLUGIN: Bld version: 9.0.0
PLUGIN: Bld date: Jun 13 2016, 09:55:09
PLUGIN: Webserver: IHS 390 Webserver: Http Plug-in Build Info: build level 9.0.0.0 (cf031208.05) release WAS90.ZNATV date 06/13/16 09:54:07
PLUGIN: Hostname = ZWASAXXX
PLUGIN: NOFILES = hard: 64000, soft: 64000
PLUGIN: MAX COREFILE SZ = hard: 4194304, soft: 4194304
PLUGIN: DATA = hard: INFINITE, soft: INFINITE
PLUGIN: --------------------------------------------------------------

下一步

在適當配置應用程式伺服器、IBM HTTP Server 和外掛程式之後:
  • 適用於 z/OS 平台的 WebSphere Application Server 可以使用這個外掛程式來執行一般的外掛程式功能。
  • 要求可以從瀏覽器經由 IBM HTTP Server 和外掛程式,遞送至已部署所要求之應用程式的應用程式伺服器。新的要求會傳送到隨機選取並已部署該應用程式的應用程式伺服器。等建立階段作業之後,會將後續要求遞送至指派給原始要求的應用程式伺服器。
  • 使用私密標頭作為一種轉遞機制,藉以將 Proxy 資訊從 Web 伺服器外掛程式轉遞給 z/OS 系統上的應用程式伺服器。(HTTP 要求反而不會隨附此資訊。)

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



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