首先是启动AS7[1],然后进入管理终端:
部署项目的命令很简单:
查询当然AS7服务器中部署的内容有多种方法,首先介绍最好记的方法:AS7支持使用ls像目录一样查看服务器中的资源:
因此我们可以很方便地查看deployment中的内容:
这是方法之一;还有一种方法是使用终端中的查询命令:
卸掉项目则使用undeploy命令:
更多使用方法请查阅参考资料[2]。
*参考资料*
[1] 本系列文章都假设AS7运行在standalone模式。
[2] "AS7关于deploy命令说明的官方文档":https://docs.jboss.org/author/display/AS7/Admin+Guide#AdminGuide-DeploymentCommands
% ./jboss-admin.sh
You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands.
[disconnected /] connect localhost
Connected to standalone controller at localhost:9999
部署项目的命令很简单:
[standalone@localhost:9999 /] deploy <your_war_or_ear_file>
查询当然AS7服务器中部署的内容有多种方法,首先介绍最好记的方法:AS7支持使用ls像目录一样查看服务器中的资源:
[standalone@localhost:9999 /] ls
extension core-service path subsystem system-property deployment interface socket-binding-group
因此我们可以很方便地查看deployment中的内容:
[standalone@localhost:9999 /] ls deployment
my-webapp.war
这是方法之一;还有一种方法是使用终端中的查询命令:
[standalone@localhost:9999 /] :read-children-names(child-type=deployment)
{
"outcome" => "success",
"result" => ["my-webapp.war"]
}
卸掉项目则使用undeploy命令:
[standalone@localhost:9999 /] undeploy my-webapp.war
Successfully undeployed my-webapp.war.
更多使用方法请查阅参考资料[2]。
*参考资料*
[1] 本系列文章都假设AS7运行在standalone模式。
[2] "AS7关于deploy命令说明的官方文档":https://docs.jboss.org/author/display/AS7/Admin+Guide#AdminGuide-DeploymentCommands