3.4. 管理 CLI
部署应用程序时注册 Web 上下文
您可以从管理命令行界面(CLI)使用 部署 deploy-file 命令,将应用程序部署到单机服务器或受管域中。
将应用部署到独立服务器
deployment deploy-file /path/to/test-application.war
deployment deploy-file /path/to/test-application.war
将应用部署到受管域中的所有服务器组
deployment deploy-file /path/to/test-application.war --all-server-groups
deployment deploy-file /path/to/test-application.war --all-server-groups
将应用部署到受管域中的特定服务器组
deployment deploy-file /path/to/test-application.war --server-groups=main-server-group,other-server-group
deployment deploy-file /path/to/test-application.war --server-groups=main-server-group,other-server-group
在前面的示例中,runtime-name 属性的默认值为 test-application.war。
使用 -- 选项指定 runtime-name 属性时,您必须在名称中包含 runtime-name .war 扩展,否则 Web 上下文不会由 JBoss EAP 注册。例如:
--runtime-name=my-application.war
--runtime-name=my-application.war