glassfish 命令行常用命令

925 2020-08-24 22:21

Glassfish是速度很快的一个J2EE容器,其不仅有WEB的控制台界面,还有命令行工具,下面是一些常用命令。

启动、关闭
asadmin start-domain
asadmin stop-domain
asadmin restart-domain

部署
asadmin deploy *.war
asadmin undeploy *.war

 

cd /user1/glassfish4/glassfish/bin

./asadmin undeploy qiandaoapp

./asadmin deploy /user1/tmp/qiandaoapp.war

查看
asadmin list-domains
asadmin list-applications

禁用某应用

asadmin disable homeworkapp

 

[root@iz2ze88rg4xz5rebqsxut7z ~]# cd /user1/glassfish4/glassfish/bin        
[root@iz2ze88rg4xz5rebqsxut7z bin]# ./asadmin
Use "exit" to exit and "help" for online help.
asadmin> rotate-log
Enter admin user name>  admin
Enter admin password for user "admin">
Rotated log on instance named 'server'.
Command rotate-log executed successfully.
asadmin>

全部评论

·