Thursday, 19 June 2014

Oracle WebLogic Server (WLS) 12c Release 1 (12.1.1) Installation on Oracle Linux 5 and 6

This article presents a brief overview of installing Oracle WebLogic Server (WLS) 12c Release 1 (12.1.1) on Oracle Linux 5 and 6.
Related articles.

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.
Everything in the installation will be 64-bit.

Software

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

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"

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.
Welcome
Enter the middleware home ("/u01/app/oracle/middleware") and click the "Next" button.
Choose Middleware Home Directory
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.
Register For Security Updates
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!
Connection Failed
Accept the typical setup by clicking the "Next" button.
Choose Install Type
Accept the default JDK selection by clicking the "Next" button.
JDK Selection
Accept the default product installation directories by clicking the "Next" button.
Choose Product Installation Directories
If you are happy with the summary information, click the "Next" button and wait for the installation to take place.
Installation Summary
On the installation complete screen, click the "Done" button to run Quickstart.
Installation Complete

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.
Quickstart
On the welcome screen, accept the "Create a new WebLogic domain" option by clicking the "Next" button.
Welcome
Select the type of domain and click the "Next" button.
SelectDomainSource
Enter the desired domain name and location, then click the "Next" button.
Specify Domain Name And Location
Enter the administrator username and password, then click the "Next" button.
Configure Administrator User Name And Password
Select the startup mode and JDK, then click the "Next" button.
Configure Server Start Mode And JDK
Select any required optional configuration, then click the "Next" button.
Select Optional Configuration
If you are happy with the information on the summary screen, click the "Create" button.
Configuration Summary
Once the domain is created, click the "Done" button.
Creating Domain
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.
Administration Console
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

2 comments:

  1. virtualnuggets offering oracle dba online training,corporate training services.

    Every Oracle db has a set of two or more online redo log files.

    The set of redo log files is collectively known as the redo log for the db. A redo log is made up of redo entries. which are also called redo records.

    1. what are the views of redo log file?
    >desc v$log;
    >desc v$logfile;

    2.How to create redo log group?
    >alter database add logfile group 5 ('/home/oracle/Demo/log/redoc1.log','/home/oracle/Demo/log/redoc2.log') size 10m;

    ReplyDelete
  2. virtualnuggets offering oracle dba online training,corporate training services.

    2.How to create redo log group?

    >alter database add logfile group 5 ('/home/oracle/Demo/log/redoc1.log','/home/oracle/Demo/log/redoc2.log') size 10m;
    We can drop the group when stage is inactive.

    To make it inactive we need to issue the following command.

    >alter system switch logfile;
    >archive log list;
    >ALTER DATABASE DROP LOGFILE GROUP 3;
    When we want to change a redo log file name we must stop the instance and that logfile should be in inactive mode
    >shut immediate
    $ mv oldname newname
    >startup mount
    >alter database rename file '/u01/app/oracle/product/10.2.0/db_1/dbs/log1DEMO.log' to '/u01/app/oracle/product/10.2.0/db_1/dbs/redo1.log';
    >alter database rename file '/u01/app/oracle/product/10.2.0/db_1/dbs/log2DEMO.log' to '/u01/app/oracle/product/10.2.0/db_1/dbs/redo2.log';

    ReplyDelete