← All posts

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

One batch script, no manual steps — installSvc.cmd does the work

Unni Pillai
Unni Pillai

I have heard many people saying that installing Admin Server as a windows service is a very tedious task.

So I thought why not make a script which will make this task so simple that someone who doesn’t even knows ‘ABC’ of WLS should be able to configure Admin Server as a Windows Service.

I expect you to have:
1. Weblogic Server installed on WINDOWS machine
2. @least know the name of Admin Server to configure and the Weblogic Domain’s Name
3. User name and password for the server

How to configure:
1. 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_JDK5
set USERDOMAIN_HOME=C:\bea\user_projects\domains\domain92_JDK5
set SERVER_NAME=AdminServer
set WLS_USER=weblogic
set WLS_PW=weblogic
set PRODUCTION_MODE=false
call “C:\bea\weblogic92\server\bin\installSvc.cmd”
ENDLOCAL

2. 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 Admin 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)

3. Save the file as ‘myScript.cmd’ in ‘C:\bea\weblogic92\server\bin

4. Simply run the ‘myScript.cmd’.

5. Open ‘services.msc’ and select the service named something like ‘beasvc …’ and start it. If it starts fine, Congo! you have configured your AdminServer as a Windows Service :)

I hope this helps.

Unni

unni@unnikrishnanpillai.tk