How to Setup and Install Oracle Weblogic in CentOS 7
In this tutorial, I'll guide you on how to setup and install Oracle Weblogic on CentOS 7 operation system. Oracle Weblogic is a middleware tool that is widely used by large companies to serve applications that use Java EE as programming language. With its cool UI, proven features like coherence module (for caching purpose), database clustering (for handling multiple database connections), Oracle Weblogic shows quite impressive advantages compared to other similar tools such as Apache Tomcat, JBoss, and WebSphere. As stated by Oracle itself, WebLogic provides a complete set of services for those modules and handles many details of application behavior automatically, without requiring programming. Below is an example of where Oracle Weblogic is located in a high-level design:

1. Preliminary Note
For this tutorial, I'll be using CentOS 7.4 in 64bit version. Please note that even though the configuration is made under CentOS 7, yet the steps and modification are mainly the same when using RedHat or Oracle Linux flavor. The reason I've mentioned this is most production installations for Oracle Weblogic will use Oracle Linux itself as the operating system.
By the end of this tutorial, we will have managed to bring up 2 server nodes that will act as Weblogic Managed Servers which were created by a Weblogic Admin Server. Apart from that, we will be using the Admin Server dashboard to combine both Managed Servers into a cluster group.
2. Installation Phase
As Oracle Weblogic's purpose is to serve high-performance application code in JAVA programming language, it's quite obvious that the installation for the middleware server itself would require java runtime to be built in. Therefore, for the installation prerequisite, we will need to install JAVA package into our admin server and the two managed nodes. The steps are like below:
[root@weblogic_mgr opt]# wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm"
--2018-06-09 12:57:05-- http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm
Resolving download.oracle.com (download.oracle.com)... 23.49.16.62
Connecting to download.oracle.com (download.oracle.com)|23.49.16.62|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm [following]
--2018-06-09 12:57:10-- https://edelivery.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm
Resolving edelivery.oracle.com (edelivery.oracle.com)... 104.103.48.174, 2600:1417:58:181::2d3e, 2600:1417:58:188::2d3e
Connecting to edelivery.oracle.com (edelivery.oracle.com)|104.103.48.174|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm?AuthParam=1528549151_b1fd01d854bc0423600a83c36240028e [following]
--2018-06-09 12:57:11-- http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm?AuthParam=1528549151_b1fd01d854bc0423600a83c36240028e
Connecting to download.oracle.com (download.oracle.com)|23.49.16.62|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 169983496 (162M) [application/x-redhat-package-manager]
Saving to: ‘jdk-8u131-linux-x64.rpm’
100%[==============================================================================>] 169,983,496 2.56MB/s in 64s
2018-06-09 12:58:15 (2.54 MB/s) - ‘jdk-8u131-linux-x64.rpm’ saved [169983496/169983496]
[root@weblogic_mgr opt]# yum localinstall -y jdk-8u131-linux-x64.rpm
Once done, we continue to make amendment on the environment path to create JAVA_HOME variable inside each server node. Below are the steps:
[root@weblogic_mgr opt]# vi /root/.bash_profile
export JAVA_HOME=/usr/java/jdk1.8.0_131
PATH=$JAVA_HOME/bin:$PATH:$HOME/bin
export PATH
[root@weblogic_mgr opt]# source /root/.bash_profile
[root@weblogic_mgr opt]# java -version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
For Oracle database installation, it's a requirement that the installation must be done using non-root user. That's also applies on Oracle Weblogic installation. As for that policy, to proceed let's create additional user to be owner for Oracle Weblogic. Below are the steps:
[root@weblogic_mgr opt]# useradd -s /bin/bash shahril
[root@weblogic_mgr opt]# passwd shahril
Changing password for user shahril.
New password:
BAD PASSWORD: The password fails the dictionary check - it is too simplistic/systematic
Retype new password:
passwd: all authentication tokens updated successfully.
[root@weblogic_mgr opt]# su - shahril
[shahril@weblogic_mgr ~]$ pwd
/home/shahril
Before we proceed further, let's configure the environment variables for weblogic owner user for required variables. Below are the best practice variables need to be assign:
- ORACLE_BASE :: Default Oracle installer directory location
- ORACLE_HOME :: Default Oracle database directory location / optional if have Oracle client inside
- MW_HOME :: Default Middleware installer directory location
- WLS_HOME :: Default Oracle Weblogic managed server directory location
- WL_HOME :: Default Oracle Weblogic admin server directory location
- DOMAIN_BASE :: Default Oracle Weblogic global domain
- DOMAIN_HOME :: Default Oracle Weblogic specific domain
[shahril@weblogic_mgr wls]$ vi /home/shahril/.bash_profile
export ORACLE_BASE=/home/shahril/wls/oracle
export ORACLE_HOME=$ORACLE_BASE/product/fmw12
export MW_HOME=$ORACLE_HOME
export WLS_HOME=$MW_HOME/wlserver
export WL_HOME=$WLS_HOME
export DOMAIN_BASE=$ORACLE_BASE/config/domains
export DOMAIN_HOME=$DOMAIN_BASE/TEST
export JAVA_HOME=/usr/java/jdk1.8.0_131
PATH=$JAVA_HOME/bin:$PATH:$HOME/bin
export PATH
[shahril@weblogic_mgr wls]$ source /home/shahril/.bash_profile
[shahril@weblogic_mgr wls]$ mkdir -p $ORACLE_BASE
[shahril@weblogic_mgr wls]$ mkdir -p $DOMAIN_BASE
[shahril@weblogic_mgr wls]$ mkdir -p $ORACLE_HOME
[shahril@weblogic_mgr wls]$ mkdir -p $ORACLE_BASE/config/applications
[shahril@weblogic_mgr wls]$ mkdir -p /home/shahril/wls/oraInventory
Once done, let's create a file called oraInst.loc and wls.rsp . For filename oraInst.loc: this file is needed to define an inventory location during the Oracle Weblogic installation. For filename wls.rsp, it is optional as it acts as a response file that will be used during the installation. Yet, as moving along we will make the installation from command line interface (CLI), the wls.rsp would be a compulsory for us to have. Now, let's proceed with the steps as per below:
[shahril@weblogic_mgr wls]$ pwd
/home/shahril/wls
[shahril@weblogic_mgr wls]$ vi oraInst.loc
inventory_loc=/home/shahril/wls/oraInventory
inst_group=shahril
[shahril@weblogic_mgr wls]$ vi wls.rsp
[ENGINE]
Response File Version=1.0.0.0.0
[GENERIC]
ORACLE_HOME=/home/shahril/wls/oracle/product/fmw12
INSTALL_TYPE=WebLogic Server
DECLINE_SECURITY_UPDATES=true
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
As exerything is in place, let's proceed with downloading the Oracle Weblogic installer. You can go to website URL here and choose your favorite version of Oracle Weblogic.
In our case, we will proceed with downloading Oracle Weblogic version 12.1.3 as by far now it's the most up-to-date and stable version (base on my current facing experience). Below are the steps:
[shahril@weblogic_mgr ~]$ cd $ORACLE_BASE
[shahril@weblogic_mgr oracle]$ wget http://download.oracle.com/otn/nt/middleware/12c/wls/1213/fmw_12.1.3.0.0_wls.jar?AuthParam=1530174357_1de6ededa212d8bc86524a0fb78ac0df
--2018-06-28 16:24:15-- http://download.oracle.com/otn/nt/middleware/12c/wls/1213/fmw_12.1.3.0.0_wls.jar?AuthParam=1530174357_1de6ededa212d8bc86524a0fb78ac0df
Resolving download.oracle.com (download.oracle.com)... 23.74.208.198
Connecting to download.oracle.com (download.oracle.com)|23.74.208.198|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 923179081 (880M) [application/x-jar]
Saving to: ‘fmw_12.1.3.0.0_wls.jar?AuthParam=1530174357_1de6ededa212d8bc86524a0fb78ac0df’
100%[=================================================================>] 923,179,081 1.05MB/s in 16m 4s
2018-06-28 16:40:24 (935 KB/s) - ‘fmw_12.1.3.0.0_wls.jar?AuthParam=1530174357_1de6ededa212d8bc86524a0fb78ac0df’ saved [923179081/923179081]
[shahril@weblogic_mgr oracle]$ mv fmw_12.1.3.0.0_wls.jar?AuthParam=1530174357_1de6ededa212d8bc86524a0fb78ac0df fmw_12.1.3.0.0_wls.jar
Next, proceed with the installation. Steps are as per shown below:
[shahril@weblogic_mgr wls]$ java -jar /home/shahril/wls/oracle/fmw_12.1.3.0.0_wls.jar -silent -responseFile /home/shahril/wls/wls.rsp -invPtrLoc /home/shahril/wls/oraInst.loc
Launcher log file is /tmp/OraInstall2018-06-10_12-44-24PM/launcher2018-06-10_12-44-24PM.log.
Extracting files.......
Starting Oracle Universal Installer
Checking if CPU speed is above 300 MHz. Actual 3199.968 MHz Passed
Checking swap space: must be greater than 512 MB. Actual 7815164 MB Passed
Checking if this platform requires a 64-bit JVM. Actual 64 Passed (64-bit not required)
Checking temp space: must be greater than 300 MB. Actual 393285 MB Passed
Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2018-06-10_12-44-24PM
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
Log: /tmp/OraInstall2018-06-10_12-44-24PM/install2018-06-10_12-44-24PM.log
Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
Reading response file..
Starting check : CertifiedVersions
/bin/cat: /proc/sys/net/core/wmem_default: No such file or directory
Starting check : CheckJDKVersion
Expected result: 1.7.0_15
Actual Result: 1.8.0_131
Check complete. The overall result of this check is: Passed
CheckJDKVersion Check: Success.
Validations are enabled for this session.
Verifying data......
Copying Files...
You can find the log of this install session at:
/tmp/OraInstall2018-06-10_12-44-24PM/install2018-06-10_12-44-24PM.log
-----------20%----------40%----------60%----------80%--------100%
The installation of Oracle Fusion Middleware 12c WebLogic Server and Coherence 12.1.3.0.0 completed successfully.
Logs successfully copied to /home/shahril/wls/oraInventory/logs.
Excellent! Now we've successfully installed Oracle Weblogic onour CentOS 7 server. Next, we will proceed with the configuration phase.
3. Configuration Phase
Now we are in the configuration part, there will be 2 level of configuration that needs to be made which are:
- Weblogic Configuration
- Domain Configuration
For a Weblogic Administration server, we need to make both of the configuration as the main command of weblogic are under weblogic configuration. But for every Weblogic managed server that will act act the instance node, it just need to setup for Weblogic Configuration only as during the initialization of domain, administrator can decide which instance node will be use for which project domain. Below are the simple example of how weblogic domain works:

For every weblogic managed server, you can create as many instance nodes as you need, this depends on you server resource allocation because each instance node will be point to its dedicated project domain. To point which domain to which instance node can easily done by administration server dashboard.
As per brief, now let's setup the configuration for weblogic and domain configuration for admin server part. Just to simplified the tutorial process, we will only create 1 domain called TEST. Below are the steps :-
[shahril@weblogic_mgr wls]$ cd $WL_HOME
[shahril@weblogic_mgr wlserver]$ cd common/bin/
[shahril@weblogic_mgr bin]$ ./commEnv.sh
[shahril@weblogic_mgr bin]$ ./wlst.sh
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Initializing WebLogic Scripting Tool (WLST) ...
Jython scans all the jar files it can find at first startup. Depending on the system, this process may take a few minutes to complete, and WLST may not return a prompt right away.
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
wls:/offline> readTemplate('/home/shahril/wls/oracle/product/fmw12/wlserver/common/templates/wls/wls.jar')
wls:/offline/base_domain>cd('Servers/AdminServer')
wls:/offline/base_domain/Server/AdminServer>set('ListenAddress','172.17.0.6')
wls:/offline/base_domain/Server/AdminServer>set('ListenPort',7001) ## Port that will be assign to each domain
wls:/offline/base_domain/Server/AdminServer>create('AdminServer','SSL')
Proxy for AdminServer: Name=AdminServer, Type=SSL
wls:/offline/base_domain/Server/AdminServer>cd('SSL/AdminServer')
wls:/offline/base_domain/Server/AdminServer/SSL/AdminServer>set('Enabled','True')
wls:/offline/base_domain/Server/AdminServer/SSL/AdminServer>set('ListenPort',7002)
wls:/offline/base_domain/Server/AdminServer/SSL/AdminServer>cd('/')
wls:/offline/base_domain>cd('Security/base_domain/User/weblogic')
wls:/offline/base_domain/Security/base_domain/User/weblogic>cmo.setPassword('Test1234')
wls:/offline/base_domain/Security/base_domain/User/weblogic>setOption('OverwriteDomain','true')
wls:/offline/base_domain/Security/base_domain/User/weblogic>writeDomain('/home/shahril/wls/oracle/config/domains/TEST')
wls:/offline/TEST/Security/TEST/User/weblogic>closeTemplate()
wls:/offline>exit()
Exiting WebLogic Scripting Tool.
Great, now we've done the configuration for both, now let's start the weblogic and TEST services on admin server. Below are the steps:
[shahril@weblogic_mgr bin]$ cd $DOMAIN_HOME
[shahril@weblogic_mgr TEST]$ cd bin/
[shahril@weblogic_mgr bin]$ pwd
/home/shahril/wls/oracle/config/domains/TEST/bin
[shahril@weblogic_mgr bin]$ ./startWebLogic.sh &
[1] 19303
[shahril@weblogic_mgr bin]$ .
.
JAVA Memory arguments: -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=128m -XX:MaxPermSize=256m
.
CLASSPATH=/usr/java/jdk1.8.0_131/lib/tools.jar:/home/shahril/wls/oracle/product/fmw12/wlserver/server/lib/weblogic_sp.jar:/home/shahril/wls/oracle/product/fmw12/wlserver/server/lib/weblogic.jar:/home/shahril/wls/oracle/product/fmw12/oracle_common/modules/net.sf.antcontrib_1.1.0.0_1-0b3/lib/ant-contrib.jar:/home/shahril/wls/oracle/product/fmw12/wlserver/modules/features/oracle.wls.common.nodemanager_2.0.0.0.jar:/home/shahril/wls/oracle/product/fmw12/oracle_common/modules/com.oracle.cie.config-wls-online_8.1.0.0.jar:/home/shahril/wls/oracle/product/fmw12/wlserver/common/derby/lib/derbyclient.jar:/home/shahril/wls/oracle/product/fmw12/wlserver/common/derby/lib/derby.jar:/home/shahril/wls/oracle/product/fmw12/wlserver/server/lib/xqrl.jar .
PATH=/home/shahril/wls/oracle/product/fmw12/wlserver/server/bin:/home/shahril/wls/oracle/product/fmw12/oracle_common/modules/org.apache.ant_1.9.2/bin:/usr/java/jdk1.8.0_131/jre/bin:/usr/java/jdk1.8.0_131/bin:/usr/java/jdk1.8.0_131/bin:/usr/java/jdk1.8.0_131/bin:/usr/java/jdk1.8.0_131/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/shahril/bin:/home/shahril/bin:/home/shahril/bin .
***************************************************
* To start WebLogic Server, use a username and *
* password assigned to an admin-level user. For *
* server administration, use the WebLogic Server *
* console at http://hostname:port/console *
***************************************************
starting weblogic with Java version:
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
Starting WLS with line:
/usr/java/jdk1.8.0_131/bin/java -server -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=128m -XX:MaxPermSize=256m -Dweblogic.Name=AdminServer -Djava.security.policy=/home/shahril/wls/oracle/product/fmw12/wlserver/server/lib/weblogic.policy -Xverify:none -Djava.endorsed.dirs=/usr/java/jdk1.8.0_131/jre/lib/endorsed:/home/shahril/wls/oracle/product/fmw12/oracle_common/modules/endorsed -da -Dwls.home=/home/shahril/wls/oracle/product/fmw12/wlserver/server -Dweblogic.home=/home/shahril/wls/oracle/product/fmw12/wlserver/server -Dweblogic.utils.cmm.lowertier.ServiceDisabled=true weblogic.Server
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Jun 10, 2018 1:11:46 PM UTC Info Security BEA-090905 Disabling the CryptoJ JCE Provider self-integrity check for better startup performance. To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true.
Jun 10, 2018 1:11:46 PM UTC Info Security BEA-090906 Changing the default Random Number Generator in RSA CryptoJ from ECDRBG128 to FIPS186PRNG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true.
Jun 10, 2018 1:11:47 PM UTC Info WebLogicServer BEA-000377 Starting WebLogic Server with Java HotSpot(TM) 64-Bit Server VM Version 25.131-b11 from Oracle Corporation.
Jun 10, 2018 1:11:47 P