WebLogic as a Windows Service

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.

—————————————————

 

SETLOCAL

set DOMAIN_NAME=Wonders_Domain

set USERDOMAIN_HOME=C:\BEA103\user_projects\domains\Wonders_Domain

set SERVER_NAME=AdminServer

set WL_HOME=C:\BEA103\wlserver_10.3

set WLS_USER=weblogic

set WLS_PW=weblogic

set PRODUCTION_MODE=true

set MEM_ARGS=-Xms512m –Xmx512m

call "%WL_HOME%\server\bin\installSvc.cmd"

ENDLOCAL

 

—————————————————

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.

—————————————————

 

echo off
SETLOCAL

set DOMAIN_NAME= Wonders_Domain
set USERDOMAIN_HOME= C:\BEA103\user_projects\domains\Wonders_Domain
set SERVER_NAME=ManagedServer1
set PRODUCTION_MODE=true

set WL_HOME=C:\BEA103\wlserver_10.3

set ADMIN_URL=http://<adminserver-host>:7501

set MEM_ARGS=-Xms40m -Xmx250m

call "%WL_HOME%\server\bin\installSvc.cmd"

 

—————————————————

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%\server\bin\beasvc" -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_HOME\server\bin;%PATH%

Navigate to the WLS_SERVER_HOME/server/bin

Enter:   beasvc -debug “yourServiceName

For Example:

C:\BEA103\wlserver_10.3\server\bin>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 under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services. The registry entry contains such information as the name of the server and other startup arguments.

Uninstall the WebLogic server as a windows service.

 

1. Create an Uninstall script as below.

 

******************************************************

 

echo off

SETLOCAL

set DOMAIN_NAME= Wonders_Domain
set SERVER_NAME=AdminServer
set WL_HOME=G:\BEA103\wlserver_10.3

call "%WL_HOME%\server\bin\uninstallSvc.cmd"

ENDLOCAL

 

******************************************************

2. Execute the script from the command prompt and you will see the below massage.

beasvc <service-name> removed.

 

References:

http://download.oracle.com/docs/cd/E12840_01/wls/docs103/server_start/winservice.html.

Cheers,

Wonders Team. 🙂

Latest Comments

  1. Shankar February 1, 2011
  2. Balu February 2, 2011
    • anandraj February 2, 2011
  3. Balu February 6, 2011
  4. Josh February 9, 2011
    • anandraj February 10, 2011
  5. sobhan March 14, 2011
    • anandraj March 14, 2011
  6. Chowdary April 22, 2011
    • anandraj April 25, 2011
  7. suresh April 29, 2011
    • Administrator April 30, 2011
  8. sid May 6, 2011
    • anandraj May 9, 2011
  9. sid May 6, 2011
    • anandraj May 9, 2011
  10. sid May 6, 2011
    • anandraj May 9, 2011
  11. sid May 6, 2011
  12. sid May 7, 2011
  13. sid May 9, 2011
    • divya May 11, 2011
  14. Bikash May 11, 2011
    • divya May 11, 2011
  15. Mary June 21, 2011
    • anandraj June 23, 2011
  16. cd July 6, 2011
    • anandraj July 7, 2011
  17. cd July 7, 2011
  18. SJ August 28, 2011
  19. sathish January 4, 2012
    • anandraj January 6, 2012
  20. poornima February 17, 2012
    • anandraj February 18, 2012
  21. Jason Silvers March 1, 2012
    • anandraj March 5, 2012
  22. Jason Silvers March 5, 2012
    • anandraj March 5, 2012
  23. Raja November 2, 2012
    • Administrator November 4, 2012
  24. Afzal November 23, 2012
  25. Jitu December 14, 2012
    • anandraj December 18, 2012
  26. Arulraj January 7, 2013
    • Administrator January 16, 2014
  27. Janardhan Reddy February 1, 2013
  28. Trikster March 13, 2013
    • Administrator March 28, 2013
    • Ranit Chattopadhyay December 31, 2014
  29. Kunal Parsewar August 2, 2013
    • Administrator October 7, 2013
  30. sahil April 3, 2015
    • Administrator April 8, 2015
  31. Binh Thanh Nguyen July 16, 2015
  32. Sandy September 18, 2015

Leave a Reply