您可使用 featureManager 命令在 Liberty 概要文件环境中安装 Liberty Repository 功能部件。
开始之前
必须先为 WebSphere Application Server V8.5.5.2 或更高版本安装 Liberty 概要文件,才能使用
featureManager 命令访问 Liberty Repository。
关于此任务
安装 Liberty 概要文件之后,可通过运行
featureManager 命令安装 Liberty Repository 功能部件。
featureManager 命令会自动安装资产依赖关系。
要管理更多资产类型并从多个存储库中安装、查找或下载资产,请使用
installUtility 命令而不是 featureManager 命令。有关更多信息,请参阅使用 installUtility 命令安装资产。
过程

查看 Liberty Repository 中的资产,并获取您要安装的每个资产的 feature_shortName。 下载和安装资产时,需要资产 feature_shortName。可使用 featureManager
命令以搜索和查看资产,也可在 WASdev.net 上的 Downloads 页面上查找这些资产。- 要使用 featureManager 命令查看资产并获取资产 feature_shortName,请使用 featureManager
find 命令。
- 要从 WASdev Web 站点查看资产并获取资产 feature_shortName,请查看 WASdev Web 站点上的资产详细信息页面以获取您要安装的每个功能部件。 feature_shortName 位于资产详细信息页面的安装指令中,例如,Portlet 容器 feature_shortName 为 portlet-2.0。
- 针对要安装的每个功能部件,从 WASdev Web 站点上的资产详细信息页面获取 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 Repository,请使用 --offlineOnly
选项以从本地目录安装功能部件;例如:
bin/featureManager install feature_shortName1,feature_shortName2 --offlineOnly --location=directoryPath
- 使用 featureManager 命令来查看您已安装哪些资产或获取帮助。 有关更多信息,请参阅featureManager 命令