使用响应文件在分布式操作系统上安装 Liberty

您可以使用 Installation Manager 响应文件来安装 WebSphere® Application Server Liberty

开始之前

[17.0.0.3 and later]要点: 已于 2017 年 9 月终止对于 WebSphere Liberty 使用 Java™ SE 6 的支持。对于 17.0.0.3,Liberty 内核已重新编译。从 17.0.0.3 开始,Liberty 内核再也无法使用 Java SE 6 运行。如果您想要在终止支持日期之后继续使用先前发行版中的 Java SE 6,那么可能会给环境带来安全风险。

Java SE 8 是建议使用的 Java SDK,因为其提供了最新的功能部件和安全性更新。作为安装 Java SE 8 的替代方法,您可以安装另一个受支持的 Java SDK 版本。

准备您想要在其中安装产品的每个系统,如安装 Installation Manager 并准备安装 Liberty 中所述。

关于此任务

通过 Installation Manager,可以使用响应文件以各种方式安装产品。您可以按以下过程所述使用 GUI 记录响应文件,创建新响应文件,或者复制并修改现有响应文件。

新增内容: 缺省情况下,安装 Liberty 时,还会安装所有适用于 Liberty 产品版本的 Liberty 功能部件。 或者,您可以安装另一组功能部件,或者不安装任何功能部件。有关更多信息,请参阅提示一节。

过程

  1. 可选: 记录响应文件以安装产品。

    在其中一个系统上,执行下列操作以记录将安装产品的响应文件。

    1. 在命令行中,切换到 Installation Manager 的安装目录中的 eclipse 子目录。
    2. 从命令行使用 -record 选项启动 Installation Manager。
      例如:
      • For Windows platforms管理员或非管理员:
        IBMIM.exe -skipInstall "C:\temp\imRegistry" 
          -record C:\temp\install_response_file.xml
      • For AIX platformsFor HP UNIX platformsFor LINUX platformsFor Solaris platforms管理员:
        ./IBMIM -skipInstall /var/temp/imRegistry
          -record /var/temp/install_response_file.xml
      • For AIX platformsFor HP UNIX platformsFor LINUX platformsFor Solaris platforms非管理员:
        ./IBMIM -skipInstall user_home/var/temp/imRegistry
          -record user_home/var/temp/install_response_file.xml
      提示: 记录新的响应文件时,可以指定 -skipInstall 参数。使用此参数具有下列益处:
      • 不会对文件进行实际安装,并且这将加快记录速度。
      • 如果您将临时数据位置与 -skipInstall 参数配合使用,那么 Installation Manager 会在记录时将安装注册表写入指定的数据位置。如果在不使用 -skipInstall 参数的情况下再次启动 Installation Manager,那么您可以使用响应文件根据实际安装注册表进行安装。

        不应该在 Installation Manager 所使用的实际代理程序数据位置使用 -skipInstall 操作。此操作不受支持。请使用空白的可写位置,并对以后的记录会话复用该位置。

      有关更多信息,请参阅 IBM® Installation Manager 产品文档

    3. 请按照使用 GUI 在分布式操作系统上安装 Liberty 中的指示信息执行操作。
  2. 可选: 如果要使用已认证的远程存储库,请创建用于安装的凭证存储响应文件。
    提示: 在凭证存储文件中,可以为需要认证的 URL(例如远程存储库)存储凭证。
  3. 使用响应文件安装产品。
    1. 可选: 使用响应文件来安装凭证存储文件。

      转至要安装产品的每个系统上的命令行,切换到 Installation Manager 的安装目录中的 eclipse/tools 子目录并安装凭证存储文件。

      例如:
      • For Windows platforms管理员或非管理员:
        imcl.exe -acceptLicense
          input C:\temp\credentialstorage_response_file.xml
          -log C:\temp\credentialstorage_log.xml
      • For AIX platformsFor HP UNIX platformsFor LINUX platformsFor Solaris platforms管理员:
        ./imcl -acceptLicense 
          input /var/temp/credentialstorage_response_file.xml
          -log /var/temp/credentialstorage_log.xml
      • For AIX platformsFor HP UNIX platformsFor LINUX platformsFor Solaris platforms非管理员:
        ./imcl -acceptLicense 
          input user_home/var/temp/credentialstorage_response_file.xml
          -log user_home/var/temp/credentialstorage_log.xml
    2. 使用响应文件来安装产品。

      转至要安装产品的每个系统上的命令行,切换到 Installation Manager 的安装目录中的 eclipse/tools 子目录并安装产品。

      例如:
      • For Windows platforms管理员或非管理员:
        imcl.exe -acceptLicense
                input C:\temp\install_response_file.xml 
                -log C:\temp\install_log.xml 
          -secureStorageFile C:\IM\credential.store -masterPasswordFile C:\IM\master_password_file.txt
      • For AIX platformsFor HP UNIX platformsFor LINUX platformsFor Solaris platforms管理员:
        ./imcl -acceptLicense 
          input /var/temp/install_response_file.xml 
          -log /var/temp/install_log.xml 
          -secureStorageFile /var/IM/credential.store -masterPasswordFile /var/IM/master_password_file.txt
      • For AIX platformsFor HP UNIX platformsFor LINUX platformsFor Solaris platforms非管理员:
        ./imcl -acceptLicense 
          input user_home/var/temp/install_response_file.xml 
          -log user_home/var/temp/install_log.xml 
          -secureStorageFile user_home/var/IM/credential.store -masterPasswordFile user_home/var/IM/master_password_file.txt
      注:
      • 在此产品的安装映像或存储库的 lafilesoffering_name/lafiles 子目录中的许可协议文件中提供了相关条款和条件、声明以及其他信息。
      • 程序可能会将重要的安装后指示信息写入标准输出。

      有关更多信息,请参阅 IBM Installation Manager 产品文档

示例

For Windows platforms下面举例说明了用于安装产品的响应文件。
<?xml version="1.0" encoding="UTF-8"?>
<agent-input clean="true" temporary="true">
<server>
<repository location="http://www.ibm.com/software/repositorymanager/com.ibm.websphere.liberty.BASE" />
</server>
<install modify='false'>
<offering id='com.ibm.websphere.liberty.BASE' 
  profile='WebSphere Liberty' 
  features='embeddablecontainer' installFixes='none'/>
</install>
<profile id='WebSphere Liberty' 
  installLocation='C:\Program Files\IBM\WebSphere\Liberty'>
</profile>
</agent-input>
提示:
  • 新增内容: 缺省情况下,安装 Liberty 时,会安装所有适用于产品版本的 Liberty 功能部件。
    您可以通过在 user.addonuser.feature 属性中指定一组定制 Liberty 附加组件和功能部件来安装这些附加组件和功能部件,而无需安装所有功能部件,如以下示例所示。请注意,功能部件短名称或符号名称必须以双逗号进行分隔。
    以下示例安装“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 附加组件或功能部件,请对 user.addonuser.feature 属性指定空值:
    <data key='user.feature' value=''/>
    <data key='user.addon' value=''/>
    有关更多信息,请参阅以下主题:
  • 无论您是否能够访问互联网,您都可以从 Liberty Asset Repository Service Asset Repository Service 实例或基于本地目录的存储库安装资产。有关更多信息,请参阅使用 Installation Manager 安装资产。在 repository 元素中添加存储库 URL、目录路径或归档路径。如果 Installation Manager 不识别该存储库,请直接指向 repository.config 文件。安装资产时,将按您指定存储库的顺序来访问存储库。
    <server>
    <repository location="http://www.ibm.com/software/repositorymanager/com.ibm.websphere.liberty.BASE" />
    <repository location="https://your_onprem_asset_repo_url" />
    <repository location="D:\IBM\LocalAssetRepo" />
    <repository location="D:\IBM\LocalAssetRepo2.zip" />
    </server>
    要启用对 Liberty Repository 的访问,请将 data 元素中的 user.useLibertyRepository 参数设置为 trueLiberty Repository 是安装期间所访问的最后一个存储库。
    <data key='user.useLibertyRepository' value='true'/>
  • Installation Manager 会根据操作系统体系结构自动选择安装包的体系结构。在 64 位系统上,可以通过将以下首选项设置为 32 位操作系统体系结构值来指定 32 位安装:
    <profile>
    ...
    <data key='cic.selector.arch' value='x86'/>
    ...
    </profile>

    要获取 cic.selector.arch 的体系结构值的列表,请参阅 Installation Manager 产品文档中的 imcl 命令的命令行自变量表。

  • 要在响应文件中禁止对更新进行远程搜索,请将以下首选项设为 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 产品文档

  • 要安装此产品的多个副本,请为每个安装指定不同的安装位置和新的软件包组。例如,将产品的第二个副本安装到 C:\Program Files\IBM\WebSphere\Liberty_1 目录,并创建 WebSphere Liberty_1 软件包组。例如,将
    <profile id='WebSphere Liberty' 
      installLocation='C:\Program Files\IBM\WebSphere\Liberty'>
    替换为
    <profile id='WebSphere Liberty_1'
      installLocation='C:\Program Files\IBM\WebSphere\Liberty_1'>
  • 要添加可选可嵌入 EJB 容器和 JPA 客户机功能部件 (embeddablecontainer),请在产品中添加该功能部件。例如:
    <offering id='com.ibm.websphere.liberty.BASE' 
      profile='WebSphere Liberty'
      features='embeddablecontainer' installFixes='none'/>
    注: 自 16.0.0.2 修订包起,发布了针对可嵌入 EJB 容器及 JPA 客户机功能部件的移除通知,因此后续发行版中可能会移除此功能部件。有关更多信息,请参阅移除通知
  • Installation Manager 可以保存软件包的较早版本,以便您稍后遇到问题时可以回滚。Installation Manager 将软件包回滚到先前版本时,会卸载当前版本的文件并重新安装较早版本。如果您选择不针对回滚保存文件,那么可通过在响应文件中更改以下首选项来阻止保存文件:
    <preference name='com.ibm.cic.common.core.preferences.preserveDownloadedArtifacts' value='true'/>
    更改为以下内容来阻止保存文件:
    <preference name='com.ibm.cic.common.core.preferences.preserveDownloadedArtifacts' value='false'/>

    有关设置 Installation Manager 首选项的更多信息,请参阅 IBM Installation Manager 产品文档

    提示: 即使您选择不使用此选项在本地保留用于回滚的文件,也仍可以通过访问相应的产品存储库来回滚到先前安装的级别。

用于指示主题类型的图标 任务主题

文件名:twlp_ins_installation_dist_silent.html