利用回應檔在 IBM i 作業系統上安裝 Liberty

您可以利用 Installation Manager 回應檔,在 IBM® i 作業系統上,安裝所有的 WebSphere® Application Server Liberty 供應項目。

開始之前

[16.0.0.4 以及更新版本]註: 「Java SE 6 與 WebSphere Liberty 搭配使用」支援將在 2017 年 9 月結束。在結束支援之後, Liberty 核心會重新編譯,並且再也無法與 SE 6 搭配執行。在過了支援日期之後,如果您繼續在舊有修正套件上使用 Java SE 6,可能使您的環境暴露在安全風險中。

建議使用的 Java SDK 是 Java SE 8,因為它提供最新的特性與安全更新。

使用本程序之前,請先做好安裝準備。如需相關資訊,請參閱準備作業系統以便安裝在 IBM i 上

如果您想從本端目錄型儲存庫或「Liberty 資產儲存庫服務」實例,來安裝 Liberty 資產,請配置儲存庫。如需 Liberty 資產儲存庫的相關資訊,請參閱使用 Installation Manager 來安裝資產

重要: 安裝 Liberty 之前,您必須先閱讀產品檔案隨附的授權合約。請依照這個主題所說明,在指令中指定 -acceptLicense,表示您接受授權合約。

如果尚未安裝 IBM Installation Manager 1.8.5 版或更新版本,請將它安裝在您想安裝產品的系統上:

  1. 下載 IBM Installation Manager。
    有三個基本選項可供您存取 Installation Manager 安裝檔案。
    • IBMInstallation Manager 下載網站,下載 Installation Manager 最新版本。
    • 從媒體上的產品儲存庫,來安裝 Installation Manager。
    • 從 Passport Advantage® 網站下載檔案,並且採用本端安裝

      具有 Passport Advantage ID 和密碼的授權客戶,可以從 Passport Advantage 網站下載必要的產品儲存庫。

  2. 針對 Installation Manager 的二進位檔、執行時期資料(代理程式資料)及共用資料的位置,選擇三個不同的位置。
  3. 利用 Installation Manager 指令行來安裝 Installation Manager。
    1. 利用具備 *ALLOBJ 和 *SECADM 特殊權限的使用者設定檔來登入 IBM i 系統。
    2. 在 CL 指令行上,執行 STRQSH 指令,以啟動 Qshell 指令 Shell。
    3. 確定 umask 已設為 022。
      如果要驗證 Umask 設定,請發出下列指令:
      umask
      如果要將 Umask 設定設為 022,請發出下列指令:
      umask 022
    4. 切換至包含 Installation Manager 安裝檔案的位置,然後執行下列指令:
      installc -acceptLicense -log log_file_path_and_name
      附註:

程序

  1. 選擇性的: 如果儲存庫需要使用者名稱和密碼,請建立認證儲存檔和主要密碼檔,以存取這個儲存庫。
    1. 選擇性的: 建立主要密碼檔。

      主要密碼檔是一個包含通行詞組的文字檔,例如 "This text is the master password"。此檔案用來維護您鑑別認證的安全。

      如果您建立主要密碼檔,並在建立認證時使用它,您一律必須指定主要密碼檔。

      提示: 為了保護此檔案,請針對您的作業系統設定適當的許可權,以限制存取此檔案。
    2. 執行 imutilsc saveCredential 指令,建立一個認證儲存檔。
      適用於 Windows 平台
      imutilsc.exe saveCredential 
        -secureStorageFile storage_file
        -userName user_ID -userPassword user_password
        -url repository_URL_or_path 
      適用於 AIX 平台適用於 HP UNIX 平台適用於 LINUX 平台適用於 Solaris 平台
      ./imutilsc saveCredential 
        -secureStorageFile storage_file
        -userName user_ID -userPassword user_password
        -url repository_URL_or_path 
      提示: 如果 imutilsc 指令找不到您建立認證儲存檔時所指定的 URL,請在儲存庫 URL 位置尾端附加 /repository.config
  2. 利用具備 *ALLOBJ 和 *SECADM 特殊權限的使用者設定檔來登入 IBM i 系統。
  3. 在 CL 指令行上,執行 STRQSH 指令,以啟動 Qshell 指令 Shell。
  4. 確定 umask 已設為 022。
    如果要驗證 Umask 設定,請發出下列指令:
    umask
    如果要將 Umask 設定設為 022,請發出下列指令:
    umask 022
  5. 利用回應檔來安裝產品。
    切換至 Installation Manager 安裝目錄中的 eclipse/tools 子目錄,然後安裝產品。例如:
    ./imcl -acceptLicense
      input $HOME/WASFiles/temp/install_response_file.xml
      -log $HOME/WASFiles/temp/install_log.xml
      -secureStorageFile $HOME/WASFiles/temp/credential.store -masterPasswordFile $HOME/WASFiles/master_password_file.txt
    附註:
    • 在這個供應項目的安裝映像檔或儲存庫的 lafilesproduct_name/lafiles 子目錄中,授權合約檔提供了相關的條款、注意事項及其他資訊。
    • /QIBM/ProdData/InstallationManager 是 Installation Manager 檔案在 IBM i 系統上的預設安裝位置。
    • 程式可能會將重要的後置安裝指示寫在標準輸出中。

    如需相關資訊,請閱讀 IBM Installation Manager 產品說明文件

範例

以下是回應檔範例,它會利用位於 http://www.ibm.com/software/repositorymanager/com.ibm.websphere.liberty.CORE.ND 的 Web 型儲存庫,將不含選用特性的產品安裝到 /QIBM/ProdData/WebSphere/Liberty/LibertyCore目錄。
<?xml version="1.0" encoding="UTF-8"?>
<agent-input>
<server>
  <repository location='http://www.ibm.com/software/repositorymanager/com.ibm.websphere.liberty.CORE.ND'/>
</server>
<profile id='WebSphere Liberty' installLocation='/QIBM/ProdData/WebSphere/Liberty/LibertyCore'>
  <data key='was.install.os400.profile.location' value='/QIBM/UserData/WebSphere/Liberty/LibertyCore'/>
  <data key='user.import.profile' value='false'/>
</profile>
<install modify='false'>
  <offering profile='WebSphere Liberty' 
    features='' id='com.ibm.websphere.liberty.CORE.ND'/>
</install>
<preference name='com.ibm.cic.common.core.preferences.eclipseCache'
  value='/QIBM/UserData/InstallationManager/IMShared'/>
<preference name='com.ibm.cic.common.core.preferences.connectTimeout' value='30'/>
<preference name='com.ibm.cic.common.core.preferences.readTimeout' value='30'/>
<preference name='com.ibm.cic.common.core.preferences.downloadAutoRetryCount' value='0'/>
<preference name='offering.service.repositories.areUsed' value='true'/>
<preference name='com.ibm.cic.common.core.preferences.ssl.nonsecureMode' value='false'/>
<preference name='com.ibm.cic.common.core.preferences.http.disablePreemptiveAuthentication' value='false'/>
<preference name='http.ntlm.auth.kind' value='NTLM'/>
<preference name='http.ntlm.auth.enableIntegrated.win32' value='true'/>
<preference name='com.ibm.cic.common.core.preferences.preserveDownloadedArtifacts' value='true'/>
<preference name='com.ibm.cic.common.core.preferences.keepFetchedFiles' value='false'/>
<preference name='PassportAdvantageIsEnabled' value='false'/>
<preference name='com.ibm.cic.common.core.preferences.searchForUpdates' value='false'/>
</agent-input>
提示:
  • 新建: 依預設,在您安裝 Liberty 時,會安裝適用於您產品版本的所有 Liberty 特性。
    您可以不安裝所有特性,而改為安裝自訂的一組 Liberty 附加程式和特性,作法是如下列範例所示,在 user.addonuser.feature 內容中指定它們。請注意,特性簡稱或符號名稱必須以兩個逗點區隔。
    下列範例使用符號名稱來安裝「Portlet 儲存器」特性,使用簡稱來安裝「Portlet 服務」特性,以及安裝「延伸程式設計模型」附加程式。
    <data key='user.feature' value='com.ibm.websphere.appserver.portlet-2.0,,portletserving-2.0'/>
    <data key='user.addon' value='extendedPackage-1.0'/>
    <data key='user.accept.license' value='true'/>
    無論是否能夠存取網際網路,您可以從「Liberty 資產儲存庫服務」實例或本端目錄型儲存庫,來安裝資產。如需相關資訊,請參閱使用 Installation Manager 來安裝資產。在 repository 元素中,新增儲存庫 URL、目錄或保存檔路徑。如果 Installation Manager 無法辨識儲存庫,請直接指向 repository.config 檔。當您安裝資產時,會依儲存庫的指定順序來存取儲存庫。
    <server>
    <repository location="http://www.ibm.com/software/repositorymanager/com.ibm.websphere.liberty" />
    <repository location="https://your_onprem_asset_repo_url" />
    <repository location="/QIBM/LocalAssetRepo" />
    <repository location="/QIBM/LocalAssetRepo2.zip" />
    </server>
    如果要能夠存取 Liberty Repository,請在 data 元素中,將 user.useLibertyRepository 參數設為 true。Liberty Repository 是在安裝期間所存取的最後一個儲存庫。
    <data key='user.useLibertyRepository' value='true'/>
    重要: 如果您不想安裝 Liberty 附加程式或特性,對於 user.addonuser.feature 內容,請指定空白值:
    <data key='user.feature' value=''/>
    <data key='user.addon' value=''/>
    如需相關資訊,請參閱下列主題:
  • 確定儲存庫位置指向 Web 型或本端產品儲存庫。例如:
    <repository location='https://downloads.mycorp.com:8080/WAS_Liberty_repository'/>
  • 範例中的下面這一行指定 IBM i 設定檔位置的預設值:
    <data key='was.install.os400.profile.location' value='/QIBM/UserData/WebSphere/Liberty/LibertyCore'/>
    如果要置換這個預設位置,請指定一個不同的位置
  • 範例中的下面這一行指定 IBM i 共用資源目錄的預設值:
    <preference name='com.ibm.cic.common.core.preferences.eclipseCache' value='/QIBM/UserData/InstallationManager/IMShared'/>
    如果要置換這個預設位置,請指定一個不同的位置
    註: Installation Manager 只有一個共用的資源目錄。 如果系統上過去已有一個安裝架構,它會使用該共用的資源目錄,而不是回應檔所指定的目錄。
  • 如果要停用回應檔中的更新項目遠端搜尋,請將下列喜好設定設為 false:
    • offering.service.repositories.areUsed

      用來搜尋遠端儲存庫中已安裝之供應項目的更新項目

    • com.ibm.cic.common.core.preferences.searchForUpdates

      用來搜尋 Installation Manager 的更新項目

    例如:
    <preference value='false' name='offering.service.repositories.areUsed'/>
    <preference value='false' name='com.ibm.cic.common.core.preferences.searchForUpdates'/>
    您可以在 IBM Installation Manager 產品說明文件中,尋找無聲自動喜好設定索引鍵的詳細資料。
  • 如果要安裝某個供應項目的多重實例,您必須使每個其他實例的設定檔 ID 都是唯一的。例如:
    <offering profile='WebSphere Liberty - Another User's WAS Liberty CORE' 
        features='' id='com.ibm.websphere.liberty.CORE.ND'/>
    回應檔中兩個指定設定檔 ID 的位置,都需要變更這個項目。
  • 如果要新增選用的內嵌式 EJB 儲存器和 JPA 用戶端特性 (embeddablecontainer),請在供應項目中新增特性。例如:
    <offering id='com.ibm.websphere.liberty.CORE.ND' 
      profile='WebSphere Liberty'
      features='embeddablecontainer' installFixes='none'/>
以下是您可以進行的變更範例,以便操作這個回應檔來執行替代的動作。
  • 如果要變更安裝位置,只需變更安裝位置。例如:
    <profile id='WebSphere Liberty' installLocation='/QIBM/ProdData/WebSphere/Liberty/LibertyCore'>
    取代為
    <profile id='WebSphere Liberty' installLocation='/home/user/IBM/WebSphere/Liberty/Server'>
  • 如果要從本端儲存庫安裝,不從現用的遠端儲存庫來安裝,請取代儲存庫位置。例如:
    <repository location='http://www.ibm.com/software/repositorymanager/com.ibm.websphere.liberty.CORE.ND'/>
    取代為
    <repository location='/home/user/repositories/WAS/local-repositories'/>

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



「時間戳記」圖示 前次更新: 2016 年 11 月 30 日
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-libcore-mp&topic=twlp_ins_installation_is_silent
檔名:twlp_ins_installation_is_silent.html