Saturday, May 26, 2018

Starting and Stopping Weblogic Server

After you have created a weblogic domain for Fusion Middleware, or a weblogic domain for Weblogc Server, next step is to start the weblogic components that include node manager, administration server and managed server.

Starting Node Manager

First we start the node manager. Use following method to start the node manager. For this example, $DOMAIN_HOME is pointing to /home/oracle/config/domains



$ cd $DOMAIN_HOME/bin
$ nohup ./startNodeManager.sh &

-- To monitor the logs
$ tail –f nohup.out


Starting and StoppingAdmin Server

 Execute following script to start the Administration Server.  It will prompt for the Admin user and password that we specified during domain configuration. Alternative we can use WLS_USER and WLS_PW environment variable to specify admin user name and password, and then start script will not prompt for the admin user and password. For this example, we are starting and stopping admin servers for the domain “test_domain”
$ cd /home/oracle/config/domains/test_domain/bin
$ export WLS_USER=weblogic
$ export WLS_PW=salman77
$ ./startWeblogic.sh

-- OR use nohup to start the weblogic server in the background.

$ nohup ./startWeblogic.sh &

-- Use tail command to read nohup.out file to monitor Weblogic server status
$ tail –f nohup.out

-- To Stop the Administration Server, use following script. It will ask for the admin user and password

$ cd /home/oracle/config/domains/test_domain/bin
$ ./stopWeblogic.sh

-- Alternatively you can specify admin user, password and URL of administration server while executing the script
$ ./stopWeblogic.sh weblogic salman77


Starting and Stopping Managed Server

Last step is to start Managed Server. We will use $DOMAIN_HOME/bin/startManagedWebLogic.sh script for this purpose. Provide Managed server name and Admin server URL as argument to this script. This script will also ask for the username and password for admin user (weblogic).


$ cd $DOMAIN_HOME/bin
$ ./startManagedWebLogic.sh ManagedServer_1 http://salman11.salman.com:7001

-- To stop a managed server, use the script stopManagedWebLogic.sh and provide managed server name, admin user name (weblogic) and password (salman77) as argument to this script

$ cd $DOMAIN_HOME/bin
$ ./stopManagedWebLogic.sh ManagedServer_1 weblogic salman77

Starting Admin server and Managed server without password

1)
Create a directory “security” under $DOMAIN_HOME/servers/AdminServer. For me, $DOMAIN_HOME points to "/home/oracle/config/domains/test_domain”

$ cd /home/oracle/config/domains/test_domain/servers/AdminServer
$ mkdir security

2)
Go into the “security” directory and create a file “boot.properties”, and add admin user and password in it. Contents of boot.properties for this example are as follows
username=weblogic
password=salman77

After this, you can use startWelogic.sh and stopWeblogic.sh scripts for starting and stopping the admin server without any username or password prompt.
For managed servers startup and stop, create a directory “$DOMAIN_HOME/servers/<managed_server_name>/security”, and copy this boot.properties file into this directory for a passwordless start and stop of managed server(s)


No comments:

Post a Comment

Popular Posts - All Times