Tuesday, 4 February 2014

Configuring and Starting Oracle Weblogic Admin Sever as Service

We can configure the Admin server and Managed Server's as a service follow the below steps:

Create a text file and save it as Admin.cmd file. We need to set the below variables in the file and some of them are optional.

DOMAIN_NAME: Your domain name

USERDOMAIN_HOME": Obsolute path of the domain in the system

SERVER_NAME: Name of the Admin Server

PRODUCTION_MODE: If the server is in production mode set the value to 'true'

WLS_USER: Weblogic server user name ( if the authentication is set)

WLS_PW: password

ADMIN_URL: Admin server url

JAVA_VENDOR: Sun

JAVA_HOME: Set the JAVA home value

MEM_ARGS: Memory setting's for the server

call "C:\Oracle\Middleware\Oracle_Home\wlserver\server\bin\installSvc.cmd"

(you need to run the install service command, which will be located in the 'wlserver\server\bin' path

The file should look like below:

----------
echo off
SETLOCAL
set DOMAIN_NAME=NodeDomain
set USERDOMAIN_HOME=C:\Oracle\Middleware\Oracle_Home\user_projects\domains\NodeDomain
set SERVER_NAME=AdminServer
set PRODUCTION_MODE=true
set WLS_USER=weblogic
set WLS_PW=Venkat1984
set JAVA_VENDOR=Sun
set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_45
set ADMIN_URL=http://localhost:7001
set MEM_ARGS=-Xms256m -Xmx256m
call "C:\Oracle\Middleware\Oracle_Home\wlserver\server\bin\installSvc.cmd"
ENDLOCAL
--------

Save the file.

Run the 'Admin.cmd' as an Administrator, if not you may get the error.

OpenSCManager failed - Access is denied. (0x5)

Now run the 'Services.msc'. you can see the weblogic admin server created as a service.


Start the service with the command:

In the path (generic) execute the command:

C:\Oracle\Middleware\Oracle_Home\wlserver\server\bin>wlsvc -debug "service name"

 "service name" should be name of your service created

Access admin server with the console url





No comments:

Post a Comment