[8.5.5.6 或更新版本]

為 installUtility 指令配置儲存庫和 Proxy 設定

您可以配置 installUtility 指令,以存取本端目錄型儲存庫、「Liberty 資產儲存庫服務」實例,以及「IBM® WebSphere® Liberty 儲存庫」。

關於這項作業

使用 installUtility 指令,來尋找和取得本端目錄型儲存庫、內部部署儲存庫或 IBM WebSphere Liberty 儲存庫中之資產的相關資訊,並安裝這些資產。
installUtility 指令可存取下列儲存庫:
  • IBM WebSphere Liberty 儲存庫,這是一個可透過網際網路存取且由 IBM 管理的公用儲存庫。如需相關資訊,請參閱Liberty 儲存庫
  • Liberty 資產儲存庫服務,這是開放程式碼服務,可用來建立內部部署儲存庫,以便在企業防火牆保護下從遠端存取它;請參閱 GitHub 上的 WASdev/tool.lars 儲存庫
  • 本端目錄型儲存庫,這些儲存庫是使用 installUtility download 動作來建立的。如需相關資訊,請參閱使用 installUtility 指令來下載資產

installUtility 指令和 featureManager 指令使用相同的配置內容檔 repositories.properties。Proxy 設定是共用的,但是儲存庫設定僅供 installUtility 指令使用。在您管理資產以及完成儲存庫型的安裝、尋找或解除安裝作業時,請使用 installUtility 指令而不是 featureManager 指令。

如果要使用有限的網際網路存取權,來存取 IBM WebSphere Liberty 儲存庫,或透過防火牆來存取,請確定您具備下列主機和埠的存取權:
  • 埠 443 上的 public.dhe.ibm.com
  • 埠 443 上的 asset-websphere.ibm.com
註: installUtility 指令只支援使用 HTTP/HTTPS 通訊協定的 Proxy 伺服器。

程序

  1. ${wlp.install.dir}/etc/repositories.properties 中建立內容檔。 內容檔必須是適用於所有平台的 ASCII 格式。
  2. 如果要定義儲存庫,請以 repoName.url=url 形式來新增內容。 所定義的儲存庫會依其在 repositories.properties 檔中指定順序來存取。
    dev-rep.url=http://dev.repo.ibm.com:9080/ma/v1
  3. 設定儲存庫的使用者名稱和密碼。 設定 repoName.user=userIdrepoName.userPassword=encodedPassword 內容。如果您沒有設定使用者名稱和密碼,您會收到提示,要求您提供。securityUtility 編碼動作也會產生 encodedPassword;如需相關資訊,請參閱 Liberty 設定檔:securityUtility 指令
    dev-rep.user=myname                            
    dev-rep.userPassword={aes}AH5NLyd7DfGb12pK17Pw+
  4. 如果要停用「Liberty 儲存庫」的存取權,請將 useDefaultRepository 內容設為 false 依預設,一律會存取「Liberty 儲存庫」,並且是安裝或下載時所存取的最後一個儲存庫。
    useDefaultRepository=false
  5. 設定 Proxy 內容。 如果您的系統要求透過 Proxy 伺服器存取「IBM WebSphere Liberty 儲存庫」,請設定 proxyHostproxyPortproxyUserproxyPassword Proxy 內容。proxyPassword 內容需要 encodedPassword 變數。如果您沒有設定使用者名稱和密碼,您會收到提示,要求您提供。 例如:
    proxyHost=my.proxy.server.ibm.com
    proxyPort=9080
    proxyUser=myname
    proxyPassword={aes}AH5NLyd7DfGb12pK17Pw+
  6. 檢閱儲存庫設定。 如果要檢視儲存庫設定清單,請使用 installUtility viewSettings 動作;例如:
    >installUtility viewSettings
    
    installUtility Settings
    ----------------------------------------------------------------------
    Properties File: c:\wlp\etc\repositories.properties
    Default Assets Repository: IBM WebSphere Liberty Repository
    Use Default Repository: True
    
    Configured Repositories
    ----------------------------------------------------------------------
    Name: dev-rep
    Location: http://dev.repo.ibm.com:9080/ma/v1
    User Name: myname
    Password: <Unspecified>
    
    Proxy Settings
    ----------------------------------------------------------------------
    Proxy Server: my.proxy.server.ibm.com
    Port: 9080
    User Name: myname
    Password: ********
  7. 測試儲存庫連線。 使用 installUtility testConnection 動作,來測試儲存庫。如果您沒有設定使用者名稱和密碼,您會收到提示,要求您提供。 使用下列範例,來測試儲存庫連線:
    >installUtility testConnection
    Testing the connection to all configured repositories...
    This process might take several minutes to complete.
    
    Configured Repositories
    ----------------------------------------------------------------------
    Name: dev-rep
    Location: http://dev.repo.ibm.com:9080/ma/v1
    Status: Successfully connected to the configured repository.
    您可以執行 installUtility testConnection 指令,且不要指定 repoName,以測試 repositories.properties 檔中所配置的所有儲存庫。「Liberty 儲存庫」的儲存庫名稱為 default。如果要測試「Liberty 儲存庫」連線,請執行下列指令:
    >installUtility testConnection default

下一步

您可以使用 installUtility 指令,來搜尋資產,並從儲存庫下載它們。

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

資訊中心條款 | 意見


「時間戳記」圖示 前次更新: 2015 年 6 月 22 日
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=phil&product=was-libcore-mp&topic=twlp_config_installutility
檔名:twlp_config_installutility.html