Friday, 5 January 2018

Oracle WebLogic Server (WLS) 12cR1 (12.1.2) Installation on Oracle Linux 5 and 6

This article presents a brief overview of installing Oracle WebLogic Server (WLS) 12cR1 (12.1.2) on Oracle Linux 5 and 6.

◈ Assumptions


This article assumes you have an existing server (real or virtual) with either Oracle Linux 5.x or 6.x installed on it. For instruction on how to do this check out the following articles.

1. Oracle Linux 5 (OL5) Installation : I did the basic installation with no extra package groups for this installation.
2. Oracle Linux 6 (OL6) Installation : I picked the "Desktop" option for this installation, so I would have a graphical interface without having to select separate package groups.

Everything in the installation will be 64-bit.

◈ Download Software


Download the Weblogic Server 12c software from Oracle Technology Network.

1. Java Development Kit (I used 7u25 jdk-7u25-linux-x64.tar.gz)
2. WebLogic Server 12c Release 2 - Generic WebLogic Server and Coherence Installer (880M)

◈ Setup


The following actions should be performed by the "root" user.

Make sure the "/etc/hosts" file contains correct entries for both the "localhost" and real host names.

127.0.0.1      localhost localhost.localdomain localhost4 localhost4.localdomain4
192.168.0.173  wls12cr2-1.localdomain wls12cr2-1

Create a new group and user.

groupadd -g 54321 oinstall
useradd -u 54321 -g oinstall oracle
passwd oracle

Create the directories in which the Oracle software will be installed.

mkdir -p /u01/app/oracle/product/ofm12.1.2
mkdir -p /u01/app/oracle/config/domains
mkdir -p /u01/app/oracle/config/applications
chown -R oracle:oinstall /u01
chmod -R 775 /u01/

Append the following entries into the "/home/oracle/.bash_profile" file.

# Adjust paths as required.
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/ofm12.1.2
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/mydomain
export JAVA_HOME=/u01/app/oracle/jdk1.7.0_25
export PATH=$JAVA_HOME/bin:$PATH

Install the JDK.

# su - oracle
$ cd $ORACLE_BASE
$ tar -xvzf /tmp/jdk-7u25-linux-x64.tar.gz

As specified in MOS Note [ID 1487773.1], amend the "/etc/security/limits.d/90-nproc.conf" file, making the following change.

# From
*          soft    nproc     1024

#To
* - nproc 16384

◈ Installation


Run the installer as the "oracle" user.

$ unzip ofm_wls_generic_12.1.2.0.0_disk1_1of1.zip
$ $JAVA_HOME/bin/java -jar wls_121200.jar

If this is the first installation on the server, enter the inventory installation location and click "OK" button.

Oracle WebLogic Server, 12cR1, Oracle Database Tutorials and Materials, Oracle Database Guides

Click the "Next" button on the welcome screen.

Oracle WebLogic Server, 12cR1, Oracle Database Tutorials and Materials, Oracle Database Guides

Enter the middleware home ("/u01/app/oracle/product/ofm12.1.2") and click the "Next" button.

Oracle WebLogic Server, 12cR1, Oracle Database Tutorials and Materials, Oracle Database Guides

Accept the "WebLogic Server Installation" option by clicking the "Next" button.

Oracle WebLogic Server, 12cR1, Oracle Database Tutorials and Materials, Oracle Database Guides

Wait for the prerequisite checks to complete. If there are failures, correct them and rerun the checks. If there are no failures, click the "Next" button.

Oracle WebLogic Server, 12cR1, Oracle Database Tutorials and Materials, Oracle Database Guides

Either enter your support details, or uncheck the security updates checkbox. Click the "Next" button. If you chose not to receive security updates, click the "Yes" button on the warning dialog.

Oracle WebLogic Server, 12cR1, Oracle Database Tutorials and Materials, Oracle Database Guides

If you are happy with the summary information, click the "Install" button.

Oracle WebLogic Server, 12cR1, Oracle Database Tutorials and Materials, Oracle Database Guides

Wait for the installation to complete, then click the "Next" button.

Oracle WebLogic Server, 12cR1, Oracle Database Tutorials and Materials, Oracle Database Guides

On the installation complete screen, click the "Finish" button to launch the Configuration Wizard.

Oracle WebLogic Server, 12cR1, Oracle Database Tutorials and Materials, Oracle Database Guides

◈ Create Domain


If you have not chosen to launch the Configuration Wizard as part of the installation, you can do it manually.

$ $WLS_HOME/common/bin/config.sh

Accept the "Create a new domain" option, enter the domain name at the end of the "Domain Location", then click the "Next" button. In this case my domain was called "mydomain", so the path I used was "/u01/app/oracle/config/domains/mydomain".

Oracle WebLogic Server, 12cR1, Oracle Database Tutorials and Materials, Oracle Database Guides

Select the required product template and click the "Next" button.

Oracle WebLogic Server, 12cR1, Oracle Database Tutorials and Materials, Oracle Database Guides

Enter the administrator credentials and click the "Next" button.

Oracle WebLogic Server, 12cR1, Oracle Database Tutorials and Materials, Oracle Database Guides

Enter the domain mode and JDK details, then click the "Next" button.

Oracle WebLogic Server, 12cR1, Oracle Database Tutorials and Materials, Oracle Database Guides

Select any required advanced configuration options. For this example I ignored the advanced configuration. Click the "Next" button.

Oracle WebLogic Server, 12cR1, Oracle Database Tutorials and Materials, Oracle Database Guides

If you are happy with the configuration summary screen, click the "Create" button.

Oracle WebLogic Server, 12cR1, Oracle Database Tutorials and Materials, Oracle Database Guides

Once the domain is created, click the "Next" button.

Oracle WebLogic Server, 12cR1, Oracle Database Tutorials and Materials, Oracle Database Guides

Make a note of the Admin Server URL and click the "Finish" button.

Oracle WebLogic Server, 12cR1, Oracle Database Tutorials and Materials, Oracle Database Guides

◈ Post-Installation


If you chose the "Production Mode" options for the domain, you will need to create a "boot.properties" file for the scripts referred to later to work without credentials. Adjust the DOMAIN_HOME and credentials appropriately.

$ export DOMAIN_HOME=$ORACLE_BASE/config/domains/mydomain
$ mkdir -p $DOMAIN_HOME/servers/AdminServer/security
$ echo "username=weblogic" > $DOMAIN_HOME/servers/AdminServer/security/boot.properties
$ echo "password=Password1" >> $DOMAIN_HOME/servers/AdminServer/security/boot.properties

The "$ORACLE_BASE/config/domains/mydomain" directory now contains a script that can be used to start the server. Remember to use the "&" if you want access to the commandline to be returned.

$ $DOMAIN_HOME/startWebLogic.sh &

Once the server is started you can access the administrator console using the "http://hostname:port/console" URL. Log in using the username and password provided in the previous step.

Oracle WebLogic Server, 12cR1, Oracle Database Tutorials and Materials, Oracle Database Guides

The following scripts are useful.

$ # Start NodeManager (if you configured one-per-domain)
$ nohup $DOMAIN_NAME/bin/startNodeManager.sh > /dev/null 2>&1 &


$ # Start WebLogic
$ nohup $DOMAIN_HOME/startWebLogic.sh > /dev/null 2>&1 &
$ # or
$ nohup $DOMAIN_HOME/bin/startWebLogic.sh > /dev/null 2>&1 &

$ # Stop WebLogic
$ $DOMAIN_HOME/bin/stopWebLogic.sh


$ # Start Managed Server
$ nohup $DOMAIN_HOME/bin/startManagedWebLogic.sh AdminServer > /dev/null 2>&1 &

$ # Stop Managed Server
$ $DOMAIN_HOME/bin/stopManagedWebLogic.sh AdminServer


$ # Start the configuration wizard
$ $WLS_HOME/common/bin/config.sh