Oracle Database 11gR2 (11.2.0.4) installation on Oracle Linux 6.4

In this post, I’m installing the Oracle Database 11g Release 2 (11.2.0.4) software on Oracle Linux 6.4, along with optional instructions on how to apply the latest Patch Set Update (PSU) to your new Oracle home.

First and foremost, before you start, make sure your Linux server meets the minimum hardware requirements:

  • 1GB of RAM (plus appropriately sized swap space)
  • 4.5GB of disk space for the software installation
  • 1GB of disk space for your /tmp directory

More details around the requirements can be found here.

Once you’ve installed and configured Linux appropriately (see my Linux installation post here), make sure that the ‘oracle’ user has correct ownership of the /u01 mount point:

chown -R oracle:oinstall /u01
chmod -R 775 /u01

…and that the ‘oracle’ account has a password set.

Package and OS requirements

In this example, I’m meeting the package and Operating System requirements by running the following yum command (as root):

yum install oracle-rdbms-server-11gR2-preinstall

This pre-install package will meet the necessary configuration tasks for you, and whilst the name implies it’s for installing Oracle Database Server 11gR2 software, it’s also a useful starting point to prepare your system for installing other Oracle software 😉

If you don’t install the package bundle above, then you’ll have to meet all of the required prerequisites manually, by working through the Oracle documentation here… which involves a lot more effort…

Also, make sure that the ‘/etc/hosts’ file contains a Fully Qualified Domain Name (FQDN) for your server, for example:

127.0.0.1       localhost.localdomain  localhost
192.168.28.13   linux03.vbox           linux03

Once that’s done, you’re ready to download the software…

Download the ‘patch’ software

Currently, the Oracle Database 11.2.0.4 files are not available to download from the usual Oracle Technology Network (OTN) area, instead you have to log into My Oracle Support (MOS) and search for patch number ‘13390677’.  It’s probably worth mentioning at this point, that the ‘patch’ is a full install, despite the reference – so you don’t need to download Oracle Database 11.2.0.2 files in addition here 😉

Once you’ve searched for the ‘patch’, select the link appropriate to your platform, in this case ‘Linux x86-64’.  When you click download, there will be a total of 7 zip files available.  For a standard installation, you only need zip parts 1 and 2…

  • p13390677_112040_platform_1of7.zip (Oracle Database, including Oracle RAC components)
  • p13390677_112040_platform_2of7.zip (Oracle Database, including Oracle RAC components)
  • p13390677_112040_platform_3of7.zip (Oracle Grid Infrastructure, includes: Oracle ASM, Oracle Clusterware, Oracle Restart)
  • p13390677_112040_platform_4of7.zip (Oracle Database Client)
  • p13390677_112040_platform_5of7.zip (Oracle Gateways)
  • p13390677_112040_platform_6of7.zip (Oracle Examples)
  • p13390677_112040_platform_7of7.zip (Deinstall)

Once you’ve downloaded the software, unzip both files to a staging area:

unzip /tmp/p13390677_112040_Linux-x86-64_1of7.zip -d /u01/app/oracle/software
unzip /tmp/p13390677_112040_Linux-x86-64_2of7.zip -d /u01/app/oracle/software

All of the contents from the above will be extracted to a “database” directory.

Start the installer

Open an X-Windows session to the server as the ‘oracle’ user.

Once you’ve met the requirements, and have unzipped the software, you can start the install:

/u01/app/oracle/software/database/runInstaller

Once the GUI starts, respond as follows:

  • Configure Security Updates
    • Uncheck ‘I wish to receive security updates via My Oracle Support’
    • Next
    • Confirm with ‘Yes’

  • Download Software Updates
    • Skip software updates
    • Next

  • Installation Option
    • Install database software only (you can opt to create a database instance at the same time, but I’m keeping the two separate here)
    • Next

  • Grid Installation Options
    • Single instance database installation
    • Next

  • Product Languages
    • Select any additional required languages and move across, otherwise leave just the default ‘English’ selected
    • Next

  • Database Edition
    • Enterprise Edition (4.5GB) (…or as appropriate depending on which edition you’re licensed for!)
    • Next

  • Installation Location
    • Oracle Base: /u01/app/oracle
    • Software Location: /u01/app/oracle/product/11.2.0.4
    • Next

  • Create Inventory (first Oracle installation only)
    • Inventory Directory: /u01/app/oraInventory
    • oraInventory Group Name: oinstall

  • Operating System Groups
    • Database Administrator (OSDBA) Group: dba
    • Database Operator (OSOPER) Group (Optional): dba
    • Next

  • Prerequisites checks
    • All prerequisite checks should complete successfully here, if not, then obviously they will need addressing before proceeding

  • Summary
    • Check everything is correct!
    • Click Install

Run the root.sh script(s)

When prompted, run the following as root:

/u01/app/oraInventory/orainstRoot.sh (first Oracle installations only)

[root@linux03 ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

/u01/app/oracle/product/11.2.0.4/root.sh

[root@linux03 ~]# /u01/app/oracle/product/11.2.0.4/root.sh
Performing root user operation for Oracle 11g

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME= /u01/app/oracle/product/11.2.0.4

Enter the full pathname of the local bin directory: [/usr/local/bin]: <enter>
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...

Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Finished product-specific root actions.

Finally, back to the GUI, click close to finish, and you’re all done 🙂

Update environment settings

Once the installation has finished, add the appropriate environment variables to your ‘oracle’ user profile.

For example, add this to your existing .bash_profile:

vi /home/oracle/.bash_profile

# Oracle variables
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME=linux03.vbox; export ORACLE_HOSTNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0.4; export ORACLE_HOME
#ORACLE_SID=SNAP11G; export ORACLE_SID
#PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

Reload your profile with the new variables:

. ~/.bash_profile

Now you’re ready to create your database 🙂

Apply the latest PSU (11.2.0.4.1) – optional

At the time of writing this post, the latest Patch Set Update (PSU) was released in January 2014, that being patch 17478514 for PSU level 11.2.0.4.1.

Download the appropriate PSU from MOS, along with the latest 11.2 OPatch release:

p17478514_112040_Linux-x86-64.zip
p6880880_112000_Linux-x86-64.zip

Unzip the OPatch utility to your new ORACLE_HOME, and verify the version number:

export PATH=$PATH:$ORACLE_HOME/OPatch
unzip -o /tmp/p6880880_112000_Linux-x86-64.zip -d $ORACLE_HOME
opatch version

Unzip the PSU contents to a staging area:

mkdir $ORACLE_HOME/Patches
unzip /tmp/p17478514_112040_Linux-x86-64.zip -d $ORACLE_HOME/Patches

Check for any potential patch conflicts (which for a new installation, there shouldn’t be!):

opatch prereq CheckConflictAgainstOHWithDetail -ph ./ -invPtrLoc $ORACLE_HOME/oraInst.loc

Apply the PSU patch:

cd $ORACLE_HOME/Patches/17478514
opatch apply -invPtrLoc $ORACLE_HOME/oraInst.loc

...
Email address/User Name:

You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  y

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0.4')

Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...

Patching component oracle.rdbms, 11.2.0.4.0...
...
OPatch found the word "warning" in the stderr of the make command.
Please look at this stderr. You can re-run this make command.
Stderr output:
ins_emagent.mk:113: warning: overriding commands for target `nmosudo'
ins_emagent.mk:52: warning: ignoring old commands for target `nmosudo'
/u01/app/oracle/product/11.2.0.4/sysman/lib/ins_emagent.mk:113: warning: overriding commands for target `nmosudo'
/u01/app/oracle/product/11.2.0.4/sysman/lib/ins_emagent.mk:52: warning: ignoring old commands for target `nmosudo'

As per MOS note 1448337.1, you can safely ignore OPatch warnings if they’re like the ones above.

Check the inventory to verify the patch has been registered correctly:

$ORACLE_HOME/OPatch/opatch lsinventory -bugs_fixed | grep -i -E 'DATABASE PSU|DATABASE PATCH SET UPDATE'

17478514   17478514  Wed Jan 29 15:39:36 GMT 2014   DATABASE PATCH SET UPDATE 11.2.0.4.1 (INCLUDES CPU...

Related posts:
Creating an Oracle 11g Database using DBCA (non-ASM)

References:
Oracle Database Installation Guide 11g Release 2 (11.2) for Linux

 

8 thoughts on “Oracle Database 11gR2 (11.2.0.4) installation on Oracle Linux 6.4

  1. Thank you for taking the time to post this. It is definitely very helpful to me. Quite detailed and well written. Thanks a million!

  2. You Guide is cool.
    This worked fine with OEL 6.7 up to date (with kernel of nov 2015)
    What i liked was about opatch.
    Did not new these thins.
    Helped a lot.
    Besides when u apply patch
    1. emctl stop dbconsole
    2. sqlplus and shutdown immediate
    3. stop listener
    4. apply patch
    5. start listerner, emctl, sqlplus and startup
    6 cd to $ORACLE_HOME/rdbms/admin
    7. sqlplus as / sysdba and @catbundle.sql psu apply

    now patch applied 🙂

  3. I AM NOT ABLE TO DOWNLOAD THE PATCH, p13390677_112040_platform_1of7.zip (Oracle Database, including Oracle RAC components)
    p13390677_112040_platform_2of7.zip (Oracle Database, including Oracle RAC components)

    CAN YU PLEASE SUGGEST

Leave a comment

Your email address will not be published. Required fields are marked *