5.3. 使用管理 CLI 离线更新您的 JBoss EAP 服务器
以下示例演示了如何使用管理 CLI 在单机服务器和受管域中脱机更新 JBoss EAP。当目标服务器安装缺少对外部 Maven 存储库的访问权限时,这非常有用。您可以使用管理 CLI 更新服务器。要做到这一点,您需要指定包含更新服务器所需工件的 Maven 存储库的位置。您可以从红帽客户门户网站下载更新的 Maven 存储库 https://access.redhat.com/
前提条件
- 您有 Maven 归档存储库,其中包含您机器上本地所需的工件。
流程
启动管理 CLI:
EAP_HOME/bin/jboss-cli.sh
更新 JBoss EAP 离线:
在独立服务器中更新 JBoss EAP 离线:
[standalone@localhost:9990 /] installer update --maven-repo-files=<An absolute or a relative path pointing to the local archive file that contains a maven repository>
在受管域中更新 JBoss EAP 离线:
[domain@localhost:9990 /] installer update --host=target-host --maven-repo-files=<An absolute or a relative path pointing to the local archive file that contains a maven repository>
重启您的 JBoss EAP 服务器以完成更新过程:
注意在使用
--perform-installation
选项重新启动服务器时,您必须确保没有从JBOSS_EAP/bin
/jconsole.shJBOSS_EAP/bin/appclient.sh
启动其他进程。这种预防措施可防止编写在服务器更新期间可能被其他进程使用的文件冲突。在独立服务器中重启您的 JBoss EAP 服务器:
[standalone@localhost:9990 /] shutdown --perform-installation
在受管域中重启您的 JBoss EAP 服务器:
[domain@localhost:9990 /] shutdown --host=target-host --perform-installation