[Windows]

使用 WASServiceHelper 实用程序,为应用程序服务器创建 Windows 服务

可以将 wasservicehelper.bat 用作 WASService.exe 的前端来添加、更新或移除 Windows 操作系统上的 WebSphere® Application Server 服务。

开始之前

WASService.exewasservicehelper.bat 必须位于其缺省目录中,才能使用 WASServiceHelper 实用程序在 Windows 操作系统上添加、更新或移除 WebSphere Application Server 服务:
app_server_root\bin

关于此任务

Using the WASService command to add or remove a WebSphere Application Server service on a Windows operating system can be confusing and error prone. The WASServiceHelper utility greatly reduces the time it takes to add, update, or remove a Windows service for WebSphere Application Server and reduces the opportunity for errors.

Supported management functions of the WASServiceHelper utility include the ability to:
  • Add a new or update an existing Windows service using the minimum required parameters
  • Add a new or update an existing Windows service using all available parameters
  • Remove a service
  • Display the status of a service
  • Enable WASService traces for problem determination
注: Hints and warnings display as you go to help you prevent common problems.
The following procedure is an example of using the WASServiceHelper utility to create a service using the minimum number of parameters.

过程

  1. Change to the following directory:
    app_server_root\bin
  2. Launch the WASServiceHelper utility.
    wasservicehelper.bat
  3. In response to Select number next to the options on the main menu, select 1 to create a service using the minimum number of parameters.
  4. In response to Select number next to the profile, select the number associated with the profile for which you want to create the service.
  5. In response to Select number next to server, select the number associated with the server.
  6. Enter the service name for your service.
  7. In the next steps, accept the default values by pressing Enter or make changes as needed.
    1. Enter any additional start arguments.
      -startArgs and –stopArgs are not required options. Use these options to specify additional parameters used for starting and stopping the JVM process. For example, you can add a user name and password:
      -stopArgs “-username myname –password passw0rd”
      这些其他参数会自动传递到 Windows 服务用来停止 JVM 进程的脚本中。

      缺省值为不提供任何其他自变量,并且您可以按 Enter 键以跳过此选项。

    2. 输入日志根目录路径。

      可以按 Enter 键以接受缺省位置,也可以输入日志根目录的完整路径。

    3. 输入日志文件名。

      可以按 Enter 键以接受缺省位置,也可以输入日志文件目录的完整路径。

    4. 输入配置根目录位置。

      可以按 Enter 键以接受缺省位置,也可以输入配置根目录的完整路径。

    5. 指定重新启动策略。

      输入 1 以在此服务失败的情况下自动重新启动此服务。输入 2 以在此服务失败的情况下手动重新启动此服务。

      如果按 Enter 键,那么采用缺省值 1。

    6. 指定启动类型。

      如果想要在操作系统启动时或首次调用此服务时自动启动此服务,请输入 1。如果必须使用“Windows 服务”面板来手动启动此服务,请输入 2。

      如果按 Enter 键,那么采用缺省值 1。

  8. 在显示最终命令的面板上复审所有参数,然后输入 Y(是)或 N(否)来响应要立即执行命令吗?

    如果输入 Y,那么 WASServiceHelper 实用程序会运行 WASService 命令并调用所有选定的参数。

    注: 这也会在包含用来添加、更新或移除服务的实际 WASService 命令的当前目录中,在 WASServiceHelper.log 文件内创建一个条目。例如:
    WASService.exe -add "Deployment Mgr01" -serverName "dmgr"
    -profilePath "C:\Program Files\IBM\WebSphere\AppServer\profiles\Dmgr01"
    -logRoot "C:\Program Files\IBM\WebSphere\AppServer\profiles\Dmgr01\logs\dmgr"
    -logFile "C:\Program Files\IBM\WebSphere\AppServer\profiles\Dmgr01\logs\dmgr\WS_startdmgr.log" 
    -encodeParams -stopArgs "-username vanno -password ****** "
    -startType manual
    -restart false

指示主题类型的图标 任务主题



时间戳记图标 最近一次更新时间: last_date
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=tins_wasservicecmd
文件名:tins_wasservicecmd.html