Saturday, 10 February 2018

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

This article presents a brief overview of installing Oracle WebLogic Server (WLS) 12cR1 (12.1.1) 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 7u2 Linux64 RPM)
2. JRockit (Use this in place of SUN JDK for production servers)
3. WebLogic Server 12c Release 1 - Generic Installer (977MB)

◈ 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.163  ol6-wls12.localdomain ol6-wls12

Install the JDK.

# rpm -Uvh jdk-7u2-linux-x64.rpm

Create a new group and user.

groupadd -g 1000 oinstall
useradd -u 1100 -g oinstall oracle
passwd oracle

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

mkdir -p /u01/app/oracle/middleware
chown -R oracle:oinstall /u01
chmod -R 775 /u01/

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

MW_HOME=/u01/app/oracle/middleware; export MW_HOME
WLS_HOME=$MW_HOME/wlserver_12.1; export WLS_HOME
JAVA_HOME=/usr/java/jdk1.7.0_02; export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH; export PATH
# JDK 7 Requirement
USER_MEM_ARGS="-Xms32m -Xmx200m -XX:MaxPermSize=350m"

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.

$ $JAVA_HOME/bin/java -Xmx1024m -jar wls1211_generic.jar
Click the "Next" button on the welcome screen.

Oracle Linux 5 and 6, Oracle Database Tutorials and Materials, Oracle Database Guides, Oracle Database Learning

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

Oracle Linux 5 and 6, Oracle Database Tutorials and Materials, Oracle Database Guides, Oracle Database Learning

Either enter your support details, or attempt to uncheck the security updates checkbox. The box doesn't actually uncheck, but presents you with a warning dialog. If you click the "Yes" button, indicating you don't want updates, you are returned to the same screen with the box still checked. Click the "Next" button anyway.

Oracle Linux 5 and 6, Oracle Database Tutorials and Materials, Oracle Database Guides, Oracle Database Learning

Assuming you don't want security updates, click "Yes" and "Yes" on the subsequent warning dialogs and you are presented with the "Connection Failed" screen. Check the "I wish to remain uninformed..." checkbox and click the "Continue" button. This whole process is very confusing at first. Obviously the developers responsible didn't really expect people to say no to security updates!

Oracle Linux 5 and 6, Oracle Database Tutorials and Materials, Oracle Database Guides, Oracle Database Learning

Accept the typical setup by clicking the "Next" button.

Oracle Linux 5 and 6, Oracle Database Tutorials and Materials, Oracle Database Guides, Oracle Database Learning

Accept the default JDK selection by clicking the "Next" button.

Oracle Linux 5 and 6, Oracle Database Tutorials and Materials, Oracle Database Guides, Oracle Database Learning

Accept the default product installation directories by clicking the "Next" button.

Oracle Linux 5 and 6, Oracle Database Tutorials and Materials, Oracle Database Guides, Oracle Database Learning

If you are happy with the summary information, click the "Next" button and wait for the installation to take place.

Oracle Linux 5 and 6, Oracle Database Tutorials and Materials, Oracle Database Guides, Oracle Database Learning

On the installation complete screen, click the "Done" button to run Quickstart.

Oracle Linux 5 and 6, Oracle Database Tutorials and Materials, Oracle Database Guides, Oracle Database Learning

◈ Create Domain


If you have not chosen to start Quickstart as part of the installation, you can do it manually.

$ $MW_HOME/utils/quickstart/quickstart.sh

On the Quickstart screen, click the "Getting Started with WebLogic Server 12.1.1" link.

Oracle Linux 5 and 6, Oracle Database Tutorials and Materials, Oracle Database Guides, Oracle Database Learning

On the welcome screen, accept the "Create a new WebLogic domain" option by clicking the "Next" button.

Oracle Linux 5 and 6, Oracle Database Tutorials and Materials, Oracle Database Guides, Oracle Database Learning

Select the type of domain and click the "Next" button.

Oracle Linux 5 and 6, Oracle Database Tutorials and Materials, Oracle Database Guides, Oracle Database Learning

Enter the desired domain name and location, then click the "Next" button.

Oracle Linux 5 and 6, Oracle Database Tutorials and Materials, Oracle Database Guides, Oracle Database Learning

Enter the administrator username and password, then click the "Next" button.

Oracle Linux 5 and 6, Oracle Database Tutorials and Materials, Oracle Database Guides, Oracle Database Learning

Select the startup mode and JDK, then click the "Next" button.

Oracle Linux 5 and 6, Oracle Database Tutorials and Materials, Oracle Database Guides, Oracle Database Learning

Select any required optional configuration, then click the "Next" button.

Oracle Linux 5 and 6, Oracle Database Tutorials and Materials, Oracle Database Guides, Oracle Database Learning

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

Oracle Linux 5 and 6, Oracle Database Tutorials and Materials, Oracle Database Guides, Oracle Database Learning

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

Oracle Linux 5 and 6, Oracle Database Tutorials and Materials, Oracle Database Guides, Oracle Database Learning

Close the Quickstart screen, unless you have any other operations to do.

Once complete, we need to copy the following files as the "root" user. This is a requirement because we are using version 7 of the JDK.

# mkdir -p $JAVA_HOME/jre/lib/endorsed
# export MW_HOME=/u01/app/oracle/middleware
# cp $MW_HOME/modules/javax.annotation*.jar $JAVA_HOME/jre/lib/endorsed
# cp $MW_HOME/modules/javax.xml.bind*.jar $JAVA_HOME/jre/lib/endorsed
# cp $MW_HOME/modules/javax.xml.ws*.jar $JAVA_HOME/jre/lib/endorsed

The "$MW_HOME/user_projects/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.

$ cd $MW_HOME/user_projects/domains/mydomain
$ ./startWebLogic.sh &

◈ Post-Installation


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

Oracle Linux 5 and 6, Oracle Database Tutorials and Materials, Oracle Database Guides, Oracle Database Learning

The following scripts are useful.

$ # Start NodeManager
$ nohup $WLS_HOME/server/bin/startNodeManager.sh > /dev/null 2>&1 &

$ # Start WebLogic
$ nohup $MW_HOME/user_projects/domains/mydomain/startWebLogic.sh > /dev/null 2>&1 &
$ # or
$ nohup $MW_HOME/user_projects/domains/mydomain/bin/startWebLogic.sh > /dev/null 2>&1 &

$ # Stop WebLogic
$ $MW_HOME/user_projects/domains/mydomain/bin/stopWebLogic.sh

$ # Start Managed Server
$ nohup $MW_HOME/user_projects/domains/mydomain/bin/startManagedWebLogic.sh AdminServer > /dev/null 2>&1 &

$ # Stop Managed Server
$ $MW_HOME/user_projects/domains/mydomain/bin/stopManagedWebLogic.sh AdminServer

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