How can the Weblogic Admin and Managed Server be started via the command line?

Overview:

This post will outline the steps to start the Weblogic Admin and managed server using the command line.

Most likely, the majority of Weblogic servers in the industry are operating on the Linux operating system. Therefore, this article is specifically tailored to Linux users.

Boot.Properties file

The boot.properties file in Oracle Weblogic Server is a configuration file that stores encrypted credentials for starting up WebLogic Server instances. The file contains username and password information for the Administration Server and managed servers in the domain. When starting up a server instance, the server reads the boot.properties file to obtain the necessary credentials for authentication with the Administration Server. This file is important for automating server startup and for ensuring secure storage of login credentials.

In order to start the instance using the command line, it is essential to have the boot.properties file copied from the Admin Server to the Managed Servers beforehand.

cp $DOMAIN_HOME/servers/AdminServer/security/boot.properties $DOMAIN_HOME/servers/[Managed Server Name]/security/

Occasionally, the security directory may not be located under the managed server, or the managed server directory may not exist. If this occurs, it is possible to create the necessary directories and copy the required file.

mkdir -p $DOMAIN_HOME/servers/[Managed Server Name]/security

cp $DOMAIN_HOME/servers/AdminServer/security/boot.properties $DOMAIN_HOME/servers/[Managed Server Name]/security/

If you are seeking clarification on the definitions of DOMAIN_HOME and ORACLE_HOME in Oracle terminology, please refer to my below article.

How to Start the Weblogic Admin Server through backend or Command Line

cd  $DOMAIN_HOME/bin

./startWebLogic.sh > $DOMAIN_HOME/servers/AdminServer/logs/AdminServer.out 2>&1 &

Once the admin server is started, you will see below snapshot in your terminal:

How to Start the Weblogic Managed Server through backend or Command Line

cd $DOMAIN_HOME/bin

./startManagedWebLogic.sh [InstanceName] [t3 Admin URL] > $DOMAIN_HOME/servers/[InstanceName]/[InstanceName].out 2>&1 &

Explanation of 2>&1: The 1 denotes standard output (stdout) and the 2 denotes standard error (stderr). So 2>&1 says to send standard error to where ever standard output is being redirected as well. Which since it’s being sent to /dev/null is akin to ignoring any output at all.

Usage of nohup command

In certain environments, the processes initiated under your username may stop as soon as you log out of the session or lose network connection.

When facing such situations, it is advisable to use nohup to ensure the longevity and continuous execution of your processes.

Starting WebLogic Admin Server using nohup command

cd  $DOMAIN_HOME/bin

nohup ./startWebLogic.sh > $DOMAIN_HOME/servers/AdminServer/logs/AdminServer.out 2>&1 &

Starting WebLogic Managed Server using nohup command

cd $DOMAIN_HOME/bin

nohup ./startManagedWebLogic.sh [InstanceName] [t3 Admin URL] > $DOMAIN_HOME/servers/[InstanceName]/[InstanceName].out 2>&1 &

Cheers!!!

About the author

Mohit Chaudhary

Hey there, I am IT enthusiast who is passionate about Middleware, DevOps, Cloud and much more.

View all posts

Leave a Reply

Your email address will not be published. Required fields are marked *