1. The document describes how to install WebLogic server as a Windows service, including installing the Admin Server and Managed Servers as services. It provides steps to create batch scripts to install each server as a service, verify the installation, start and stop the services.
2. To install a Managed Server as a service, the script must specify the location of the Administration Server, which must be started first to provide configuration data.
3. The services are configured in the Windows registry and can be uninstalled by running an uninstall script.
1. PREPARED BY RAVI KUMAR LANKE Page 1
WEBLOGIC AS A WINDOWS SERVICE
2. PREPARED BY RAVI KUMAR LANKE Page 2
The below post describes the installation of WebLogic server as a windows service, we will look at how
we can install the Admin Server as well as Managed server as a service.
Steps:
1. Create an install batch script that contains the domain, server details.
Installing Admin Server as a service.
Create an install script as below.
—————————————————
1 SETLOCAL
2
3 set DOMAIN_NAME=Wonders_Domain
4
5 set USERDOMAIN_HOME=C:BEA103user_projectsdomainsWonders_Domain
6
7 set SERVER_NAME=AdminServer
8
9 set WL_HOME=C:BEA103wlserver_10.3
10
11 set WLS_USER=weblogic
12
13 set WLS_PW=weblogic
14
15 set PRODUCTION_MODE=true
16
17 set MEM_ARGS=-Xms512m –Xmx512m
18
19 call "%WL_HOME%serverbininstallSvc.cmd"
20
21 ENDLOCAL
—————————————————
3. PREPARED BY RAVI KUMAR LANKE Page 3
Installing Managed Server as Windows Service:
If you want to install a Managed Server as a Windows service, you must include a variable that specifies the
location of the domain’s Administration Server. The Managed Server must contact the Administration Server
to retrieve its configuration data.
The Administration Server (which is not a service) must be started before installing and starting Managed
Server as a Windows service.
Create an install script as below.
—————————————————
1 echo off
2 SETLOCAL
3
4 set DOMAIN_NAME= Wonders_Domain
5 set USERDOMAIN_HOME= C:BEA103user_projectsdomainsWonders_Domain
6 set SERVER_NAME=ManagedServer1
7 set PRODUCTION_MODE=true
8
9 set WL_HOME=C:BEA103wlserver_10.3
10
11 set ADMIN_URL=http://<adminserver-host>:7501
12
13 set MEM_ARGS=-Xms40m -Xmx250m
14
15 call "%WL_HOME%serverbininstallSvc.cmd"
4. PREPARED BY RAVI KUMAR LANKE Page 4
NOTE: If you set up both an Administration Server and a Managed Server to run as Windows services on the
same computer, you can specify that the Managed Server starts only after the Administration Server. In that
scenario we need to pass the below argument while running the script.
-delay:delay_milliseconds
For example:
"%WL_HOME%serverbinbeasvc" -install
-svcname:"%DOMAIN_NAME%_%SERVER_NAME%" -delay:120000
2. After running this script in the command prompt you will observe a log statement such as
“beasvc <Server> installed”
You can check the same from the services list as well using the services.msc utility.
3. Verify whether the WebLogic Server is successfully installed as a service as below.
Open a command window and enter the following command:
set PATH=WL_HOMEserverbin;%PATH%
Navigate to the WLS_SERVER_HOME/server/bin
Enter: beasvc -debug “yourServiceName“
For Example:
C:BEA103wlserver_10.3serverbin>beasvc -debug “beasvc Wonders_Domain_AdminServer”
4. You can start / stop the server from the services.msc window or you can also use the below commands.
Starting the service:
net start “beasvc Wonders_Domain_AdminServer”
Stopping the service:
net stop “beasvc Wonders_Domain_AdminServer”
Note: For each server instance that you set up as a Windows service, WebLogic Server creates a key in the
Windows Registry underHKEY_LOCAL_MACHINESYSTEMCurrentControlSetServices. The registry
entry contains such information as the name of the server and other startup arguments.
Uninstall the WebLogic server as a windows service.
5. PREPARED BY RAVI KUMAR LANKE Page 5
1. Create an Uninstall script as below.
******************************************************
1 echo off
2
3 SETLOCAL
4
5 set DOMAIN_NAME= Wonders_Domain
6 set SERVER_NAME=AdminServer
7 set WL_HOME=G:BEA103wlserver_10.3
8
9 call "%WL_HOME%serverbinuninstallSvc.cmd"
10
11 ENDLOCAL
******************************************************
2. Execute the script from the command prompt and you will see the below massage.
beasvc <service-name> removed.