您可以使用 featureManager 指令,在您的 Liberty 設定檔環境中安裝「Liberty 儲存庫」特性。
開始之前
您必須先安裝 WebSphere Application Server Liberty 設定檔 8.5.5.2 版或更新的版本,才能使用
featureManager 指令來存取「Liberty 儲存庫」。
關於這項作業
安裝 Liberty 設定檔之後,您可以執行
featureManager 指令來安裝「Liberty 儲存庫」特性。
featureManager 指令會自動安裝資產相依關係。
如果要管理更多的資產類型,並安裝、尋找或下載多個儲存庫中的資產,請使用 installUtility 指令而不是 featureManager 指令。如需相關資訊,請參閱使用 installUtility 指令來安裝資產。
程序

檢閱「Liberty 儲存庫」中的資產,並取得您要安裝之每一個資產的 feature_shortName。 需要資產的 feature_shortName,才能下載並安裝資產。您可以使用 featureManager 指令,來尋找和檢閱資產,或者可以在 WASdev.net 的「下載」頁面中尋找它們。- 如果要使用 featureManager 指令,來檢閱資產並取得資產的 feature_shortName,請使用 featureManager find 指令。
- 如果要從 WASdev 網站檢閱資產,並取得資產的 feature_shortName,請針對您要安裝的每一個特性,在 WASdev 網站上查看資產詳細資料頁面。 feature_shortName 可在資產詳細資料頁面的安裝指示中找到;例如:Portlet 儲存器 feature_shortName 是 portlet-2.0。
- 針對您想要安裝的每個特性,從 WASdev 網站上的資產詳細資料頁面中取得 feature_shortName。 feature_shortName 可在資產詳細資料頁面的安裝指示中找到;例如:Portlet 儲存器 feature_shortName 是 portlet-2.0。
- 執行 featureManager 指令來安裝資產。 請執行下列指令:
bin/featureManager install feature_shortName --when-file-exists=ignore
如果要安裝多個特性,請使用逗點將每個 feature_shortName 隔開,例如:
bin/featureManager install feature_shortName1,feature_shortName2 --when-file-exists=ignore

如果要將特性下載至本端目錄,而不安裝特性,請使用 --downloadOnly 選項;例如:
bin/featureManager install feature_shortName1,feature_shortName2 --downloadOnly=[all|required*|none]
您可以將這個選項配置成下載所有的相依特性、此執行時期所需的相依特性,或是不下載任何相依特性。預設值是下載必要的相依特性。如果要指定本端目的地目錄,請搭配使用這個選項與 --location=directoryPath 選項。
如果要從本端來源目錄來安裝特性,請使用 --location=directoryPath 選項;例如:
bin/featureManager install feature_shortName1,feature_shortName2 --location=directoryPath

如果您不想連接「Liberty 儲存庫」,請使用 --offlineOnly 選項,從本端目錄來安裝特性;例如:
bin/featureManager install feature_shortName1,feature_shortName2 --offlineOnly --location=directoryPath
- 使用 featureManager 指令來查看您已安裝的資產或取得說明。 如需相關資訊,請參閱:featureManager 指令