If you install Lotus Sametime 8.5 on Windows you can create Windows services for the Websphere application servers as described in the Infocenter. I have created a script to make the creation process a little bit easier especially if you do have a number of servers. Maybe this would be helpful for others also.
At the beginning of the script you define some common parameters, like the drive and path where you have installed Websphere application server and the WAS admin user and password (needed to correctly stop the server). You then define the name of the WAS profile and the name of the WAS server.
Important: The service depedencies (to make sure the services are started in the correct order) are written via the Windows “SC” command. This makes sure that the registry keys are written in the correct way (the sample in the Infocenter shows “REG_SZ” values which is NOT correct, it MUST be “MULTI_REG_SZ” otherwise the dependencies are just ignored). Take care of the blank after “depend= “. If you omit that, it will not work!
The script also installs the services with the necessary parameters to make sure the log files are written in English regardless of the regional settings of the Wndows server.
Below you find a sample for the Sametime System Console and and a Sametime Meeting Server:
[codesyntax lang=”dos” title=”Create Services for Sametime System Console”]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
@ECHO OFF CLS ECHO Create Windows Service Entries for WAS servers ECHO. REM Change the following lines to reflect your environment set WAS_DRIVE=D: set WAS_ROOT=%WAS_DRIVE%\IBM\WebSphere\AppServer set PROFILE_PATH=%WAS_ROOT%\profiles set WAS_USER=wasadmin set WAS_PASSWORD=password %WAS_DRIVE% cd %WAS_ROOT%\bin set PROFILE_NAME=STSCDMgrProfile set WAS_SERVER="dmgr" wasservice.exe -add %WAS_SERVER% -serverName %WAS_SERVER% -profilePath "%PROFILE_PATH%\%PROFILE_NAME%" -logRoot "%PROFILE_PATH%\%PROFILE_NAME%\logs\%WAS_SERVER%" -startArgs "-Duser.language=en -Duser.region=GB" -stopArgs "-user %WAS_USER% -password %WAS_PASSWORD%" set PROFILE_NAME=STSCAppProfile set WAS_SERVER="nodeagent" wasservice.exe -add %WAS_SERVER% -serverName %WAS_SERVER% -profilePath "%PROFILE_PATH%\%PROFILE_NAME%" -logRoot "%PROFILE_PATH%\%PROFILE_NAME%\logs\%WAS_SERVER%" -startArgs "-Duser.language=en -Duser.region=GB" -stopArgs "-user %WAS_USER% -password %WAS_PASSWORD%" sc config "IBMWAS70Service - %WAS_SERVER%" depend= "IBMWAS70Service - dmgr" set WAS_SERVER="STConsoleServer" wasservice.exe -add %WAS_SERVER% -serverName %WAS_SERVER% -profilePath "%PROFILE_PATH%\%PROFILE_NAME%" -logRoot "%PROFILE_PATH%\%PROFILE_NAME%\logs\%WAS_SERVER%" -startArgs "-Duser.language=en -Duser.region=GB" -stopArgs "-user %WAS_USER% -password %WAS_PASSWORD%" sc config "IBMWAS70Service - %WAS_SERVER%" depend= "IBMWAS70Service - nodeagent" pause |
[/codesyntax]
[codesyntax lang=”dos” title=”Create Services for Meeting Server”]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
@ECHO OFF CLS ECHO Create Windows Service Entries for WAS servers ECHO. REM Change the following lines to reflect your environment set WAS_DRIVE=D: set WAS_ROOT=%WAS_DRIVE%\IBM\WebSphere\AppServer set PROFILE_PATH=%WAS_ROOT%\profiles set WAS_USER=wasadmin set WAS_PASSWORD=password set PROFILE_NAME=hostnameMeetingPNProfile1 %WAS_DRIVE% cd %WAS_ROOT%\bin set WAS_SERVER="nodeagent" wasservice.exe -add %WAS_SERVER% -serverName %WAS_SERVER% -profilePath "%PROFILE_PATH%\%PROFILE_NAME%" -logRoot "%PROFILE_PATH%\%PROFILE_NAME%\logs\%WAS_SERVER%" -startArgs "-Duser.language=en -Duser.region=GB" -stopArgs "-user %WAS_USER% -password %WAS_PASSWORD%" set WAS_SERVER="STMeetingServer" wasservice.exe -add %WAS_SERVER% -serverName %WAS_SERVER% -profilePath "%PROFILE_PATH%\%PROFILE_NAME%" -logRoot "%PROFILE_PATH%\%PROFILE_NAME%\logs\%WAS_SERVER%" -startArgs "-Duser.language=en -Duser.region=GB" -stopArgs "-user %WAS_USER% -password %WAS_PASSWORD%" sc config "IBMWAS70Service - %WAS_SERVER%" depend= "IBMWAS70Service - nodeagent" set WAS_SERVER="hostnameHttpProxy" wasservice.exe -add %WAS_SERVER% -serverName %WAS_SERVER% -profilePath "%PROFILE_PATH%\%PROFILE_NAME%" -logRoot "%PROFILE_PATH%\%PROFILE_NAME%\logs\%WAS_SERVER%" -startArgs "-Duser.language=en -Duser.region=GB" -stopArgs "-user %WAS_USER% -password %WAS_PASSWORD%" sc config "IBMWAS70Service - %WAS_SERVER%" depend= "IBMWAS70Service - STMeetingServer" pause |
[/codesyntax]
If you want to delete the services again you can use the following script. Example is for a Sametime Meeting server:
[codesyntax lang=”dos” title=”Remove Services”]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
@ECHO OFF CLS ECHO Delete Windows Service Entries for WAS servers ECHO. REM Change the following lines to reflect your environment set WAS_DRIVE=D: set WAS_ROOT=%WAS_DRIVE%\IBM\WebSphere\AppServer set PROFILE_PATH=%WAS_ROOT%\profiles %WAS_DRIVE% cd %WAS_ROOT%\bin set WAS_SERVER="nodeagent" wasservice.exe -remove %WAS_SERVER% set WAS_SERVER="STMeetingServer" wasservice.exe -remove %WAS_SERVER% set WAS_SERVER="hostnameHttpProxy" wasservice.exe -remove %WAS_SERVER% pause |
[/codesyntax]
Pingback:(Another) Startup script for Sametime 8.5 on Linux - By Ulrich Krause - eknori.de