Sunteți pe pagina 1din 4

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.

S-ar putea să vă placă și