eMarcel.com

Oracle Database, Fusion Middleware, Linux

Installing Oracle WebLogic Server 12c and Oracle HTTP Server Part I

WebLogic12cOracle WebLogic Server 12c is one of the industry’s best application server for building and deploying enterprise Java EE applications. It’s a core component of Oracle Fusion Middleware portfolio and an engine powering Oracle products. Oracle WebLogic Server 12c Release 2 (12.1.2) has been released in July, 2013.

 In This demo/tutorial we will cover installation of Oracle Weblogic Server 12c and Oracle HTTP Server 12c (OHS) on Oracle Linux Server 6. This is one node cluster simulation.

This tutorial is for educational purposes only.

Deployment plan:

  1. Configuring Linux servers for  WLS and OHS
  2. Installing the JDK and setting JAVA_HOME environment variable.
  3. Installing WebLogic Server 12c software
  4. Patching WebLogic with OPatch
  5. Creating a WebLogic domain
  6. Starting WebLogic domain
  7. Installing and configuring Oracle HTTP Server (OHS) in Part II

Prerequisites:

  1. Two virtual Oracle Linux 6 servers have been cloned from a seed “OL6U4_SEED”. New virtual machine names: WLS12c-node1, OHS12c-node1:
  2. Download Oracle software from Oracle technology Network:

1. Configuring Linux servers for WebTier and MidTier – Part I, MidTier

WLS12c_OHS_infra

  • Power up virtual machine and connect to the server (using putty)

TIP: To power up virtual machine you may use VirtualBox GUI or the following command;

[email protected]:~$ VBoxManage startvm <VM_NAME> --type headless

[email protected]:~$ VBoxManage startvm WLS12c-node1 --type headless

[email protected]:~$ VBoxManage startvm OHS12c-node1 --type headless

NOTE: Do not boot up both servers at the same time – Our servers have seed’s IP (192.168.2.130) and hostname (demo) settings. We have to alter settings one after another to avoid IP conflicts within the same network.

Alter network configuration on both Linux servers

Altering network configuration and hostname in Oracle Linux 6 describes steps to alter network settings on Oracle Linux 6 server after clone to new virtualbox machine..

  •  MidTier – WebLogic server example config
#/etc/sysconfig/network
HOSTNAME=wls12c-node1

#/etc/sysconfig/network-scripts/ifcfg-eth0	
IPADDR=192.168.2.115

#/etc/hosts
127.0.0.1     localhost.localdomain   localhost
192.168.2.115 	wls12c-node1.zion.local 		wls12c-node1
192.168.2.116	 ohs12c-node1.zion.local		 ohs12c-node1
  •  WebTier – OHS server example config
#/etc/sysconfig/network
HOSTNAME=ohs12c-node1

#/etc/sysconfig/network-scripts/ifcfg-eth0	
IPADDR=192.168.2.116	

#/etc/hosts
127.0.0.1     localhost.localdomain   localhost
192.168.2.115 	wls12c-node1.zion.local		 wls12c-node1
192.168.2.116	 ohs12c-node1.zion.local		 ohs12c-node1

Reboot both servers to apply changes.

2. Installing the JDK and setting environment’s variables.

  • Login to Linux server wls12c-node1 and switch to “root” account. Upload jdk-7uXX-linux-x64.rpm on the server to /tmp directory and run the installer.
[[email protected] tmp]# rpm -Uvh jdk-7u51-linux-x64.rpm
Preparing...                ########################################### [100%]
   1:jdk                    warning: /etc/init.d/jexec saved as /etc/init.d/jexec.rpmsave
########################################### [100%]
Unpacking JAR files...
        rt.jar...
        jsse.jar...
        charsets.jar...
        tools.jar...
        localedata.jar...
        jfxrt.jar...
[[email protected] tmp]#
  •  java has been installed in the following directory:
[[email protected] tmp]# ls -la /usr/java/
total 12
drwxr-xr-x.  3 root root 4096 Mar 15 17:14 .
drwxr-xr-x. 14 root root 4096 Dec 19 04:27 ..
lrwxrwxrwx.  1 root root   16 Mar 15 15:59 default -> /usr/java/latest
drwxr-xr-x.  8 root root 4096 Mar 15 17:14 jdk1.7.0_51
lrwxrwxrwx.  1 root root   21 Mar 15 17:14 latest -> /usr/java/jdk1.7.0_51

#JAVA_HOME=/usr/java/default
  •  We are running WebLogic on a Linux virtual machine. We have to tweak JAVA in order to avoid very long Admin Console load and starting JVMs. More info about this bug here.
Edit the file /usr/java/jdk1.7.0_51/lib/security/java.security and replace:

securerandom.source=file:/dev/urandom
with:
securerandom.source=file:/dev/./urandom
  • You might repeat above steps and install Java on a OHS host  ohs12c-node1.

Oracle WebLogic Server Directory Structure

  • We assume ORACLE_BASE=/u01/app/oracle
  • ORACLE_HOME=/u01/app/oracle/product/12.1.2/fmw

wlsig_dt_003_dir_structu

  • Switch to an oracle account and set environment variables: edit /home/oracle/.bash_profile
# User specific environment and startup programs

PATH=$PATH:$HOME/bin
export PATH

ORACLE_BASE=/u01/app/oracle
export ORACLE_BASE

ORACLE_HOME=${ORACLE_BASE}/product/12.1.2/fmw
export ORACLE_HOME

WLS_HOME=${ORACLE_HOME}/wlserver
export WLS_HOME

CLASSPATH=${WLS_HOME}/server/lib/weblogic.jar
export CLASSPATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib
export LD_LIBRARY_PATH

DOMAIN_HOME=${ORACLE_BASE}/config/zion_t1_domain1
export DOMAIN_HOME

JAVA_HOME=/usr/java/default
export JAVA_HOME

PATH=$PATH:$HOME/bin:$JAVA_HOME/bin:$ORACLE_HOME/OPatch:
export PATH
  •  execute .bash_profile script to apply settings
[[email protected] ~]$ cd /home/oracle
[[email protected] ~]$ . .bash_profile

 

3. Installing WebLogic Server 12c software

  • Upload WebLogic installation package wls_121200.jar to /tmp directory on wls12c-node1 server
  • Set cookie session and run the installer (Xming is running on a client desktop, if Windows)
[[email protected] ~]$ xauth list
wls12c-node1.zion.local/unix:10  MIT-MAGIC-COOKIE-1  514eeafdf4151a2d25833456317ba04a

[[email protected] ~]$ sudo su - oracle
[sudo] password for neo:

[[email protected] ~]$ xauth add wls12c-node1.zion.local/unix:10  MIT-MAGIC-COOKIE-1  514eeafdf4151a2d25833456317ba04a

[[email protected] ~]$ export DISPLAY=localhost:10.0

#Run WebLogic Installer:
[[email protected] ~]$ java -jar /tmp/wls_121200.jar
Extracting files................................................
Starting Oracle Universal Installer

 4. Patching with OPatch

New Patching Features

For Oracle Fusion Middleware 12c (12.1.2), Smart Update is no longer supported. Instead, Oracle WebLogic Server users can use OPatch to apply patches for both Oracle WebLogic Server and for Oracle Fusion Middleware.

Smart Update is no longer included with WebLogic Server.

Patching with OPatch – OPatch is a Java-based utility that runs on all supported operating systems and requires installation of the Oracle Universal Installer. It is used to apply patches to Oracle software.

 At the time of creation of this tutorial there were the following patches available for WebLogic Server 12.1.2 at Oracle Support:

2014-03-16_000016

You would have to download all patches and apply them using the OPatch utility. More here: Applying Multiple Patches Using the OPatch napply Command.

  • Below example shows OPatch utility in action, applying multiple patches. OPatch will skip any patches from the given list, in case they have conflicts among themselves. Or you could exclude superseded patches in search filter.

  5. Creating a WebLogic domain

We create a WebLogic domain: zion_t1_domain1. Within a domain we create admin server (WLS0_ADM) and one managed server (WLS1_SERVER) which is part of one node cluster zion_t1_domain1-cluster1. “t1″ indicates test environment of OTAP model.

[[email protected] ~]$ cd /u01/app/oracle/product/12.1.2/fmw/wlserver/common/bin

[[email protected] bin]$ ./config.sh

WebLogic domain “zion_t1_domain1” has been created.

 6. Starting WebLogic domain

  • Login as regular user to wls12c-node1 server and switch oracle account.
  • start Node Manager running startNodeManager.sh script
  • start weblogic domain running startWeblogic.sh script
[[email protected] ~]$ sudo su - oracle
#Start NodeManager
[[email protected] ~] nohup $DOMAIN_HOME/bin/startNodeManager.sh > /dev/null 2>&1 &

#Start weblogic server
[[email protected] ~]$ nohup $DOMAIN_HOME/startWebLogic.sh > /dev/null 2>&1 &
  •  You might check WLS0_ADM log file for details
#Check admin log 
[[email protected] ~]$ tail -f $DOMAIN_HOME/servers/WLS0_ADM/logs/WLS0_ADM.log
  •  Login to WebLogic Server Administration Console 12c
    • http:/<IPaddress>:7001/console
    • https:/<IPaddress>:7002/console
  • Start managed server WLS1_SERVER  – in Admin Console
  • Deploying sample application code to WebLogic managed server.

In this example we will deploy and test  simple application (Hello.war), to a managed server WLS1_SERVER. Next, we will connect to a sample application over http and https URLs in order to test none SSL and SSL connectivity.

Download and UNZIP sample application: Hello.zip –> after unzipping you will get Hello.war file ready for deployment.

7. Installing and configuring Oracle HTTP Server (OHS)

In Part II of this article we cover Oracle HTTP Server 12c installation and configuration >>

References:

(Visited 4,840 times, 2 visits today)

, , , ,

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close