Glassfish 3 quick start
Windows System: C:\glassfish3\glassfish\bin\asadmin.bat
默认路径和文件名:
|
glassfish默认安装路径:(as-install)
Windows下是SystemDrive:\glassfish3\glassfish,比如我上面的
C:\glassfish3\glassfish
glassfish安装父目录:(as-install-parent)
SystemDrive:\glassfish3
域名默认创建目录:(domain-root-dir)
as-install/domains/ (as-install指的是glassfish的安装路径)
如我的是C:\glassfish3\glassfish\domains\
域名目录:(domain-dir)
Represents the directory in which a domain's configuration is stored.
domain-root-dir/domain-name
如我的有一个:
C:\glassfish3\glassfish\domains\domain1
------------------------------------------------------------------------
默认管理员值:
Domain name: domain1,见上面
Master password: changeit
asadmin.bat文件所在目录:as-install/bin
配置文件: domain-dir/config
日志文件(Log Files):domain-dir/logs
Admin Port(Administration server port): 4848
HTTP port: 8080
HTTPS port: 8181
Pure JMX clients port: 8686
Message Queue port: 7676
IIOP port: 3700
IIOP/SSL port: 3820
IIOP/SSL port with mutual authentication: 3920
------------------------------------------------------------------------
How to start and stop domain1 when it is the only domain?
1. Start domain:
asadmin>start-domain
2. Stop the running domain(default):
asadmin>stop-domain
列举出正在运行的domain信息:
asadmin>list-domains
------------------------------------------------------------------------
如何启动和停止数据库服务器?
A database server is not started by default when you start the GlassFish Server domain. If your applications require a database back end, you must start and stop the database server manually.
The following procedures describe how to start and stop the Java DB server that is bundled with GlassFish Server.
1. 启动Java DB服务器
asadmin>start-database --dbhome directory-path
例如:
asadmin>start-database --dbhome as-install-parent/javadb
2. 停止Java DB服务器
asadmin>stop-database
------------------------------------------------------------------------
如何打开管理员控制台?
这之前先确保domain被打开。
在浏览器中输入:
------------------------------------------------------------------------
如何发布和取消发布应用程序?
asadmin>
下主要是deploy xx.war发布,undeploy xx.war撤下已经发布的Web应用程序
使用list-applications查看已经部署(发布)的应用程序
------------------------------------------------------------------------
如何自动部署和取消部署(发布)应用程序?
You can deploy applications automatically by placing them in the as-install/domains/domain-name/autodeploy directory.
On Windows systems, type this command:
copy sample-dir\hello.war as-install\domains\domain-name\autodeploy
GlassFish Server automatically discovers and deploys the application. The default URL for the application is as follows:
自动取消部署更加简单:
去as-install\domains\domain-name\autodeploy目录下找到hello.war文件,删除其即可。
------------------------------------------------------------------------
如何更新和扩展当前安装?
as-install-parent/bin/updatetool