Java EE 7 教程 第一部分 简介 第2章 使用教程示例 第2.2节 启动和停止GlassFish服务器

原文:http://docs.oracle.com/javaee/7/tutorial/doc/usingexamples002.htm
翻译:石卓林 shizhuolin@hotmail.com

2.2 Starting and Stopping GlassFish Server

You can start and stop GlassFish Server using either NetBeans IDE or the command line.

2.2 启动和停止GlassFish服务器

你可以使用NetBeans IDE或命令行启动和停止GlassFish服务器.

2.2.1 To Start GlassFish Server Using NetBeans IDE

  1. Click the Services tab.
  2. Expand Servers.
  3. Right-click the GlassFish Server instance and select Start.

2.2.1 使用NetBeans IDE启动GlassFish服务器

  1. 点击Services选项卡.
  2. 展开Servers.
  3. 右键点击GlassFish服务器实例,选择Start.

2.2.2 To Stop GlassFish Server Using NetBeans IDE

To stop GlassFish Server using NetBeans IDE, right-click the GlassFish Server instance and select Stop.

2.2.2 使用NetBeans IDE停止GlassFish服务器

要使用NetBeans IDE停止服务器,请右键点击GlassFish服务器实例并选择Stop.

2.2.3 To Start GlassFish Server Using the Command Line

To start GlassFish Server from the command line, open a terminal window or command prompt and execute the following:

asadmin start-domain --verbose

A domain is a set of one or more GlassFish Server instances managed by one administration server. The following elements are associated with a domain:

  • The GlassFish Server port number: The default is 8080.
  • The administration server’s port number: The default is 4848.
  • An administration user name and password: The default user name is admin, and by default no password is required.

You specify these values when you install GlassFish Server. The examples in this tutorial assume that you chose the default ports as well as the default user name and lack of password.

With no arguments, the start-domain command initiates the default domain, which is domain1. The –verbose flag causes all logging and debugging output to appear on the terminal window or command prompt. The output also goes into the server log, which is located in domain-dir/logs/server.log.

Or, on Windows, from the Start menu, choose All Programs, then choose Java EE 7 SDK, then choose Start Application Server.

2.2.3 使用命令行启动GlassFish服务器

要从命令行启动GlassFish服务器, 打开一个终端窗口或命令提示框并执行以下操作:

asadmin start-domain --verbose

一个domain是管理服务中托管的一个或多个GlassFish服务器实例的集合,一个域有以下相关元素:

  • GlassFish服务器端口: 默认是8080.
  • 服务器的管理端口: 默认是4848.
  • 一组管理用户名和密码: 默认用户名是admin, 默认是空密码.

在你安装GlassFish服务器时指定这些值, 本教程中的示例假定你选择了默认端口,默认用户名和缺省密码.

在不带参数的情况下,start-domain命令启动默认域, 就是domain1. 使用–verbose标志则将在终端窗口或命令提示框中显示所有的日志记录和调试输出. 这些输出也被写入服务器日志, 日志文件位于domain-dir/logs/server.log.

如果在Windows平台启动, 访问Start菜单, 选择All Programs, 然后选择Java EE 7 SDK, 再选择Start Application Server.

2.2.4 To Stop GlassFish Server Using the Command Line

To stop GlassFish Server, open a terminal window or command prompt and execute:

asadmin stop-domain domain1

Or, on Windows, from the Start menu, choose All Programs, then choose Java EE 7 SDK, then choose Stop Application Server.

2.2.4 使用命令行停止GlassFish服务器

要停止GlassFish服务器, 打开一个终端窗口或命令提示框并执行:

asadmin stop-domain domain1

或在Windows上, 访问Start菜单, 选择All Programs, 然后选择Java EE 7 SDK, 再选择Stop Application Server.

Pingbacks/Trackbacks

  1. homepage - 2017年7月20日

    homepage

    I know this if off topic but I’m looking into starting my own blog and was curious what all is needed to get set up? I’m assuming having a blog like yours would cost a pretty penny? I’m not very web smart so I’m not 100% sure. Any suggestions or ad…

Leave a Reply

Your email address will not be published.

Time limit is exhausted. Please reload the CAPTCHA.

Proudly powered by WordPress   Premium Style Theme by www.gopiplus.com
渝公网安渝公网安备 50010702500270号 渝ICP备09056628号-7