What is ORACLE_HOME, MW_HOME, WL_HOME in Weblogic 12c ?

The Goal

In this post, we will learn about the various directories found in Weblogic and various ways to find your ORACLE_HOME, MW_HOME, and WL_HOME, with methods given mostly for Linux infrastructure. In WebLogic 12c, ORACLE_HOME, MW_HOME, and WL_HOME are directories used for installation and configuration of the WebLogic Server and related middleware components.

These are the default Home Directories according to ORACLE.

  • MW_HOME: MW_HOME (Middleware Home) is a directory that contains the Oracle middleware components, such as WebLogic Server, Coherence, and Oracle HTTP Server. It is created during the installation process and is located under the ORACLE_HOME directory. Here, the variable MW_HOME stands for the location where Oracle Fusion Middleware is installed, including a WL_HOME, an ORACLE_COMMON_HOME, and ORACLE_HOME.
  • WL_HOME: WL_HOME (WebLogic Home) is a subdirectory of MW_HOME that contains the WebLogic Server files, including the domain templates, start/stop scripts, and the server-specific libraries. It is also created during the installation process and is located under the MW_HOME directory. This variable and related directory path contain installed files necessary to host a WebLogic Server, for example.MW_HOME/wlserver_10.3
  • ORACLE_HOME: ORACLE_HOME is the top-level directory where the Oracle software is installed. It contains subdirectories for different Oracle products and components installed on the system. In the case of WebLogic Server, ORACLE_HOME is the parent directory for MW_HOME and WL_HOME. This variable refers to the location where Oracle Fusion Middleware products, such as Oracle HTTP Server, Oracle SOA Suite, or Oracle Internet Directory are installed and their binaries are being used by a current procedure.
  • ORACLE_COMMON_HOME: This variable and related directory path refer to the location where the Oracle Fusion Middleware Common Java Required Files (JRF) Libraries and Oracle Fusion Middleware Enterprise Manager Libraries are installed. For example: MW_HOME/oracle_common

Understanding it with Example.

Step1: Finding WL_HOME

If you have a running JVM , you can just do this ps -eaf|grep -i <AdminServer/Managed Server> in the resulting classpath of the JVM, you can easily find -Dweblogic.home this is denoted  as $WLS_HOME

 Be advised $WLS_HOME and $WL_HOME are the two different directories

One level out to the WLS_HOME is our WL_HOME

WL_HOME = $WLS_HOME/..

Using the weblogic.jar file location also you could find your oracle_home

find /<path> -name "weblogic.jar"

Step2: Finding MW_HOME

Having found that the WL_HOME directory, now let us derive other home directories

MW_HOME = $WLS_HOME/../..
MW_HOME = $WL_HOME/..

Step3: Finding ORACLE_COMMON_HOME

ORACLE_COMMON_HOME represents the location of oracle_common directory which resides in the MW_HOME therefore

ORACLE_COMMON_HOME = $MW_HOME/oracle_common

Step4: Finding ORACLE_HOME

Oracle states that there can be one or many oracle homes present under the same MW_HOME. in other words, ORACLE_HOME represents the installation location of the product in the era of Fusion Middleware Infrastructure (we install various oracle products like Http server, weblogic, Identity manager there together)

So the basic formula to find ORACLE_HOME is that

ORACLE_HOME = MW_HOME/<product home directory>

i.e
ORACLE_HOME = $MWHOME/iam
ORACLE_HOME = $MWHOME/weblogic12.2.1
ORACLE_HOME = $MWHOME/ohs

To find the list of Oracle home available in your server the best and easy way is to use the OraInventory (oracle inventory)

Finding ORACLE_HOME directories Through OraInventory

In general, the Orainventory or Oracle inventory will be created in the weblogic user’s home directory.  (unless you choose different path during the installation using oraInst.loc file)

If that’s the case. You can simply use the inventory.xml file to get the oracle_home

cat ~/oraInventory/ContentsXML/inventory.xml

Hope it helps. 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 *