← All posts

How To: Configure a Managed Server as a Windows Service in 5 Simple Steps

Same trick as Admin Server, but with dependency and startup delay

Unni Pillai
Unni Pillai

1. Create a copy of ‘installSvc.cmd’ and name it ‘installSvcMS.cmd’

2. Replace the line in the file which calls the ‘beasvc’ command with the below given line:

“%WL_HOME%\server\bin\beasvc” -install -svcname:“%DOMAIN_NAME%_%SERVER_NAME%” -depend:“domain92_AdminServer” -delay:“120000” -javahome:“%JAVA_HOME%” -execdir:“%USERDOMAIN_HOME%” -extrapath:“%WL_HOME%\server\bin” -password:“%WLS_PW%” -cmdline:%CMDLINE%

3. Here,

i. ‘-depend:“domain92_AdminServer”’ is the name of the Administration Server Windows service. To verify the service name, look on the Windows Services Control Panel.(‘services.msc’)

ii. ‘-delay:“120000”’ is the time delay you want between the starting of admin server and managed server.

4. Open a text editor and Copy – Paste the text given below into the editor:

SETLOCAL

set WL_HOME=C:\bea\weblogic92

set DOMAIN_NAME=domain92

set USERDOMAIN_HOME=C:\bea\user_projects\domains\domain92_JDK5

set SERVER_NAME= ManagedServer

set WLS_USER=weblogic

set WLS_PW=weblogic

set PRODUCTION_MODE=false

set ADMIN_URL=http://10.10.10.71:7001

call “C:\bea\weblogic92\server\bin\installSvcMS.cmd”

ENDLOCAL

Here, 

i. WL_HOME is the directory in which you have installed Weblogic

ii. DOMAIN_NAME is the name for your WLS domain

iii. SERVER_NAME is the name of an existing Managed Server that you want set up as a Windows service.

iv. WLS_USER and WLS_PASS are the credentials you pass for staring the server

v. PRODUCTION_MODE is the mode in which want to start the server (if true server starts in production ; if false it would start in development)

vi. ADMIN_URL is the path to admin server

5. Save the file as ‘myScriptMS.cmd’ in’C:\bea\weblogic92\server\bin’ and Run the ‘myScriptMS.cmd’.

Open ‘services.msc’ and select the service named something like ‘beasvc domain92_ManagedServer’ and start it, if it starts fine it means that the Weblogic Server as started fine.

Official documentation : http://e-docs.bea.com/wls/docs100/server_start/winservice.html

I hope it helps :)

Unni

unni@unnikrishnanpillai.tk