http://yulimin.iteye.com/blog/361589
WASService 命令行工具允许您在 Linux 和 Windows 操作系统上为产品 Java 进程创建服务。
当安装向导创建服务时,卸载程序可以除去服务。如果使用 WASService 命令自已创建一个服务,那么当该服务不再有效时,您必须除去它。卸载程序不会除去您使用 WASService 命令创建的服务。
WASService 命令行工具位于 app_server_root\bin 目录中。
WASService 命令行工具创建服务或更新现有服务的详细命令如下:
- WASService.exe-addservice_name
- -serverNameserver_name
- -profilePathserver_profile_directory
- [-wasHomeapp_server_root]
- [-configRootconfiguration_repository_directory]
- [-startArgsadditional_start_arguments]
- [-stopArgsadditional_stop_arguments]
- [-useriduser_id-passwordpassword]
- [-logFileservice_log_file]
- [-logRootserver_log_directory]
-
[-restarttrue|false]
- [-startTypeautomatic|manual|disabled]
WASService.exe -add service_name
-serverName server_name
-profilePath server_profile_directory
[-wasHome app_server_root]
[-configRoot configuration_repository_directory]
[-startArgs additional_start_arguments]
[-stopArgs additional_stop_arguments]
[-userid user_id -password password]
[-logFile service_log_file]
[-logRoot server_log_directory]
[-restart true | false]
[-startType automatic | manual | disabled]
WASService 命令行工具启动现有服务的命令
WASService.exe -start service_name [optional startServer.bat parameters]
WASService 命令行工具停止正在运行的服务的命令
WASService.exe -stop service_name [optional stopServer.bat parameters]
WASService 命令行工具查看服务状态的命令
WASService.exe -status service_name
WASService 命令行工具删除服务的命令
WASService.exe -remove service_name
假设 WAS 安装在 D:\IBM\WebSphere\AppServer 目录下,要创建的 NodeAgent 概要文件在 D:\IBM\WebSphere\AppServer\profiles\AppSrv01\ 目录之下,则可以进行如下操作,将 NodeAgent 添加到 Windows 的服务当中
1、进入 WASService 命令行工具目录:
cd D:\IBM\WebSphere\AppServer\bin
2、运行 WASService 命令行工具:
WASService -add nodeagent
-servername nodeagent
-profilePath D:\IBM\WebSphere\AppServer\profiles\AppSrv01
-wasHome "D:\IBM\WebSphere\AppServer"
-logfile "D:\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\nodeagent\startNodeAgent.log"
-logRoot "D:\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\nodeagent"
-restart true
-startType automatic
- WASService-addnodeagent-servernamenodeagent-profilePathD:\IBM\WebSphere\AppServer\profiles\AppSrv01-wasHome"D:\IBM\WebSphere\AppServer"-logfile"D:\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\nodeagent\startNodeAgent.log"-logRoot"D:\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\nodeagent"-restarttrue-startTypeautomatic
WASService -add nodeagent -servername nodeagent -profilePath D:\IBM\WebSphere\AppServer\profiles\AppSrv01 -wasHome "D:\IBM\WebSphere\AppServer" -logfile "D:\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\nodeagent\startNodeAgent.log" -logRoot "D:\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\nodeagent" -restart true -startType automatic
查看系统服务,可以看到添加了“IBM WebSphere Application Server V6.1 - nodeagent”一个服务,启动它之后,可以在
D:\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\nodeagent\目录下看到如下文件的相关启动情况:
startNodeAgent.log
startServer.log
nodeagent.pid
相关的操作日志如下:
创建服务:
D:\IBM\WebSphere\AppServer\bin>WASService -add nodeagent -servername nodeagent -profilePath D:\IBM\WebSphere\AppServer\profiles\AppSrv01 -wasHome "D:\IBM\WebSphere\AppServer" -logfile "D:\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\nodeagent\startNodeAgent.log" -logRoot "D:\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\nodeagent" -restart true -startType automatic
Adding Service: nodeagent
Config Root: D:\IBM\WebSphere\AppServer\profiles\AppSrv01\config
Server Name: nodeagent
Profile Path: D:\IBM\WebSphere\AppServer\profiles\AppSrv01
Was Home: D:\IBM\WebSphere\AppServer\
Start Args:
Restart: 1
IBM WebSphere Application Server V6.1 - nodeagent service successfully added.
启动服务
D:\IBM\WebSphere\AppServer\bin>WASService.exe -start "nodeagent"
Starting Service: nodeagent
Successfully started service.
查看服务运行状态
D:\IBM\WebSphere\AppServer\bin>WASService.exe -status "nodeagent"
The service is running.
停止服务
D:\IBM\WebSphere\AppServer\bin>WASService.exe -stop "nodeagent"
Successfully stopped service.
查看服务运行状态
D:\IBM\WebSphere\AppServer\bin>WASService.exe -status "nodeagent"
The service is stopped.
删除服务
D:\IBM\WebSphere\AppServer\bin>WASService.exe -remove nodeagent
Remove Service: nodeagent
Successfully removed service
分享到:
相关推荐
详细描述了在AIX系统上安装WAS6.1及相关配置
给was6.1打补丁,包括下载,打补丁顺序
可以安装Linux下的was安装,首先对was6.1做了详细的介绍,
WAS是webshpere application server的缩写,基于Java的web应用服务器,类IIS
WAS6.1安装集群手册Linux,安装部署,环境搭建;
WAS高手资料-基于WAS 6.1的WebSphere Portal 6.1 Cluster配置详解
NULL 博文链接:https://ibmtech.iteye.com/blog/648988
参考自己实际安装步骤,介绍了AIX系统下WAS6.1及补丁包的安装及概要文件的创建
IBM WAS6.1 000-253模拟试题
WAS 6.1 快速入门,有需要的朋友可以下载
WAS6.1认证培训PPT文档1,WebSphere Application Server V6.1 Technical Overview
javaweb 系统从Tomcat移植到WAS6.1.doc
单机玩转WAS6.1ND集群 单机玩转WAS6.1ND集群
was6.1详细手册,很实用,已部署验证过,不妨下载来看看
myeclipse下如何配置was6.1集成调试环境
服务器安装文档_Linux_WAS6.1安装
AIX5.3安装配置WAS6.1,配置集群。详细说明步骤
本手册的目的是教您如何在一个分布式的平台上安装WebSphere Application Server V6.1。本手册将全程指导您安装WebSphere Application Server V6.1,包括怎样卸载以往版本,获得以及解压安装文件,安装 Application ...
自己收集的关于WAS ND6.1集群配置中文资料. 本人就靠这些资料成功配置了本地的多台机器的集群环境.
was6.1安装手册.pdf