此内容没有您所选择的语言版本。

10.3. Deploy with the Management CLI


10.3.1. Manage Application Deployment in the Management CLI

Deploying applications via the Management CLI gives you the benefit of single command line interface with the ability to create and run deployment scripts. You can use this scripting ability to configure specific application deployment and management scenarios. You can manage the deployment status of a single server in the case of a standalone instance, or an entire network of servers in the case of a managed domain.

Procedure 10.4. Deploy an Application in a Standalone Server

  • Run the deploy command

    From the Management CLI, enter the deploy command with the path to the application deployment.

    Example 10.1. The Deploy command

    [standalone@localhost:9999 /] deploy /path/to/test-application.wardeploy /path/to/test-application.war
    Copy to Clipboard Toggle word wrap
    Note that a successful deploy does not produce any output to the CLI.
Result

The specified application is now deployed in the standalone server.

Procedure 10.5. Undeploy an Application in a Standalone Server

By default the undeploy command will undeploy and delete the deployment content from a standalone instance of JBoss EAP. To retain the deployment content, add the parameter --keep-content.
  • Run the undeploy command

    To undeploy the application and delete the deployment content, enter the Management CLI undeploy command with the filename of the application deployment.
    [standalone@localhost:9999 /] undeploy test-application.warundeploy test-application.war
    Copy to Clipboard Toggle word wrap
    To undeploy the application, but retain the deployment content, enter the Management CLI undeploy command with the filename of the application deployment and the parameter --keep-content.
    [standalone@localhost:9999 /] undeploy test-application.warundeploy test-application.war --keep-content
    Copy to Clipboard Toggle word wrap
Result

The specified application is now undeployed. Note that the undeploy command does not produce any output to the Management CLI if it is successful.

Procedure 10.6. Deploy an Application in a Managed Domain

  • Run the deploy command

    From the Management CLI, enter the deploy command with the path to the application deployment. Include the --all-server-groups parameter to deploy to all server groups.
    [domain@localhost:9999 /] deploy /path/to/test-application.war --all-server-groupsdeploy /path/to/test-application.war --all-server-groupsdeploy /path/to/test-application.war --all-server-groups
    Copy to Clipboard Toggle word wrap
    • Alternatively, define specific server groups for the deployment with the --server-groups parameter.
      [domain@localhost:9999 /] deploy /path/to/test-application.war --server-groups=server_group_1,server_group_2deploy /path/to/test-application.war --server-groups=server_group_1,server_group_2deploy /path/to/test-application.war --server-groups=server_group_1,server_group_2deploy /path/to/test-application.war --server-groups=server_group_1,server_group_2
      Copy to Clipboard Toggle word wrap
    Note that a successful deploy does not produce any output to the CLI.
Result

The specified application is now deployed to a server group in your managed domain.

Procedure 10.7. Undeploy an Application in a Managed Domain

  • Run the undeploy command

    From the Management CLI, enter the undeploy command with the filename of the application deployment. The application can be undeployed from any server group that it was originally deployed to with the addition of the --all-relevant-server-groups parameter.
    [domain@localhost:9999 /] undeploy test-application.war --all-relevant-server-groups
    Copy to Clipboard Toggle word wrap
    Note that a successful undeploy does not produce any output to the CLI.
Result

The specified application is now undeployed.

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat