Voyez le cloud autrement

Weblogic 12c Installation

by Vina Rakotondrainibe | Oracle Commerce Expert and Cloud Deployment Specialist
Paris area,

This is my installation notes for Weblogic 12c on Oracle Linux. Unix command basics are not covered in this note as we assume that the targeted audience already knows hot to administer Oracle Linux systems (very close to RHEL systems).


You need to get the following packages:

Oracle JDK Installation

You might want to add the RPM to you internal package repository for it to be available to all your servers without the need to transfer the package manually on each new server.

Just issue the following asroot command to install:

rpm -i "your RPM package"

Check that the installed version is correct:

[root@wls_admin]# java -version
java version "1.7.0_75"
Java(TM) SE Runtime Environment (build 1.7.0_75-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode)

Weblogic Installation

We will cover a silent installation process as we do not want to install a graphic server on headless production ready machines.

This is a silent response file example. You need to adapt the root folder of your weblogic installation with theORACLE_HOME parameter in the file:


#DO NOT CHANGE THIS. Response File Version=
# The oracle home location. This can be an existing Oracle Home or a new Oracle Home ORACLE_HOME=/opt/oracle/Middleware/12c
# Set this variable value to the Installation Type selected. e.g. WebLogic Server, # Coherence, Complete with Examples. INSTALL_TYPE=WebLogic Server
# Provide the My Oracle Support Username. If you wish to ignore Oracle Configuration # Manager configuration provide empty string for user name. MYORACLESUPPORT_USERNAME=
# Provide the My Oracle Support Password MYORACLESUPPORT_PASSWORD=
# Set this to true if you wish to decline the security updates. Setting this to # true and providing empty string for My Oracle Support username will ignore the # Oracle Configuration Manager configuration DECLINE_SECURITY_UPDATES=true
# Set this to true if My Oracle Support Password is specified SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
# Provide the Proxy Host PROXY_HOST=
# Provide the Proxy Port PROXY_PORT=
# Provide the Proxy Username PROXY_USER=
# Provide the Proxy Password PROXY_PWD=
# Type String (URL format) Indicates the OCM Repeater URL which should be of the format [scheme[Http/Https]]://[repeater host]:[repeater port] COLLECTOR_SUPPORTHUB_URL=

Now, you can create the oracle group

groupadd oracle

and the weblogic user:

useradd weblogic -g oracle -d /opt/oracle -s /bin/bash

Next you need to create the Oracle inventory. The official script provided by Oracle is:

# Create Central Inventory
UserID=`echo $output | cut -f1 -d ' ' | cut -f2 -d '=' | cut -f1 -d '('`
if [ "$UserID" != "0" ]; then
echo "This script must be executed as root"
exit 1
if [ $# -ne 2 ]
echo "Error in $0 - Invalid Argument Count"
echo "Syntax: $0 inventory_location group_name"
echo "Setting the inventory to $1"
echo "Setting the group name to $2"
PLATFORMID=`uname -a | awk '{{print $1}}'`

if [ "$PLATFORMID" = "Linux" ] then INVDIR=/etc fi
if [ "$PLATFORMID" = "SunOS" ] then INVDIR=/var/opt/oracle fi
if [ "$PLATFORMID" = "HP-UX" ]; then INVDIR=/var/opt/oracle fi
if [ "$PLATFORMID" = "AIX" ] then INVDIR=/etc fi
echo "Creating inventory pointer file in $INVDIR directory" if [ -d $INVDIR ]; then chmod 755 $INVDIR; else mkdir -p $INVDIR; fi INVPTR=${INVDIR}/oraInst.loc INVLOC=$1 GRP=$2 PTRDIR="`dirname $INVPTR`"; # Create the software inventory location pointer file if [ ! -d "$PTRDIR" ]; then mkdir -p $PTRDIR; fi echo "Creating the Oracle inventory pointer file ($INVPTR)"; echo inventory_loc=$INVLOC > $INVPTR echo inst_group=$GRP >> $INVPTR chmod 644 $INVPTR # Create the inventory directory if it doesn't exist if [ ! -d "$INVLOC" ];then echo "Creating the Oracle inventory directory ($INVLOC)"; mkdir -p $INVLOC; fi echo "Changing permissions of $1 to 770."; chmod -R g+rw,o-rwx $1; if [ $? != 0 ]; then echo "OUI-35086:WARNING: chmod of $1 to 770 failed!"; fi echo "Changing groupname of $1 to $2."; chgrp -R $2 $1; if [ $? != 0 ]; then echo "OUI-10057:WARNING: chgrp of $1 to $2 failed!"; fi echo "The execution of the script is complete"
exit 0

Save the file to /opt/scripts/ Then you need to run this script as root:

/opt/scripts/ /opt/oracle/oraInventory oracle

That will create an oraInventoryfolder under the /opt/oracle folder, owned by the oracle group, with the necessary files for the rest of this tutorial to work.

Next, we create the installation folders:

mkdir -p /opt/oracle/Middleware/12c && chown -R weblogic:oracle /opt/oracle/Middleware

and the domain folder:

mkdir -p /srv/oracle/wls_domains && chown -R weblogic:oracle /srv/oracle

You can now launch the installer by issuing:

su -u weblogic -c "java -jar /tmp/fmw_12. -silent -responseFile "

Your weblogic installation is ready to run.