Installing missing RPMs for Oracle Database 11gR2

Using Oracle VM VirtualBox Manager v4.1.8
Operating System: RHEL 5.5 OS and Oracle Database 11gR2 software.

How to install the missing packages during the database or software install?

I configured a yum local repository to be able to access a DVD ISO via HTTP on Red Hat Enterprise Linux. Open a new session as root user and do the following:

root@mpoojari ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.5 (Tikanga)

Create Repository

As pre-requites, you need yum and createrepo packages on the server on which the repository will be configured.

  1. Copy Red Hat Enterprise Linux 5/6 DVD ISO on to the server (or put the CD/DVD)
  2. Create the following directories under /media (not mandatory, you can create your own desired directory structure) and mount it.
[root@mpoojari ~]# ls -ltr /u03
total 3558632
drwx------ 2 root   root      16384 Feb 14 12:28 lost+found
-rw-r--r-- 1 root   root 3640459264 Feb 14 15:26 Enterprise-R5-U5-Server-x86_64-dvd.iso
[root@mpoojari ~]# mkdir -p /media/RHEL5/cdrom/iso
[root@mpoojari ~]# mount -o loop /u03/Enterprise-R5-U5-Server-x86_64-dvd.iso /media/RHEL5/cdrom/iso
[root@mpoojari ~]# df -kh
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda5             6.8G  2.0G  4.5G  31% /
/dev/sda7              11G  4.8G  5.4G  48% /u03
/dev/sda3             9.7G  151M  9.1G   2% /u02
/dev/sda2              20G  173M   19G   1% /u02
/dev/sda1              99M   12M   83M  13% /boot
shmfs                 1.5G     0  1.5G   0% /dev/shm
/u03/Enterprise-R5-U5-Server-x86_64-dvd.iso 3.4G  3.4G     0 100% /media/RHEL5/cdrom/iso

[root@mpoojari ~]# cd /media/RHEL5/cdrom/
[root@mpoojari cdrom]# createrepo .
3060/3187 - iso/Server/xorg-x11-server-Xvnc-source-1.1.1-48.76.0.1.el5.x86_64.rpm...
Saving Primary metadata
Saving file lists metadata
Saving other metadata

Create a file /etc/yum.repos.d/file.repo which should have the contents as mentioned below :

[root@mpoojari ~]# cat /etc/yum.repos.d/file.repo
[RHEL-Repository]
name=RHEL repository
baseurl=file:/media/RHEL5/cdrom
enabled=1
gpgcheck=0

Installing and Verifying Packages

  1. Query the operating system to determine if the packages are already
    [root@mpoojari cdrom]# rpm -qa | grep compat-libstdc++-33-3.2.3

    You can also search without the grep argument to see an explicit message about the file:

    [root@mpoojari cdrom]# rpm -q compat-libstdc++-33-3.2.3

    The operating system returns the following message:

    package compat-libstdc++-33-3.2.3 is not installed
  2. Find all related packages on the operating system media to get the fully qualified locations.Earlier we the operating system media has been mounted at /media/RHEL5/cdrom.
    [root@mpoojari cdrom]# find /media/RHEL5/cdrom/ -name compat-libstdc++-33-3.2.3*
    /media/RHEL5/cdrom/iso/Server/compat-libstdc++-33-3.2.3-61.i386.rpm
    /media/RHEL5/cdrom/iso/Server/compat-libstdc++-33-3.2.3-61.x86_64.rpm
  3. Install the missing package:
     [root@mpoojari cdrom]# rpm -ivh rpm -ivh /media/RHEL5/cdrom/iso/Server/compat-libstdc++-33-3.2.3-61.i386.rpm \
    /media/RHEL5/cdrom/iso/Server/compat-libstdc++-33-3.2.3-61.x86_64.rpm
  4. Optional: Alternative method to find and install packages in one command: Use the following command to find packages and to install all packages that are found.Find the packages as described in the earlier step to verify that the following command installs only the packages that you intend to install.
    find /media/RHEL5/cdrom -name compat-libstdc++-33-3.2.3-* | xargs rpm -ivh

    This single command installs both packages.

  5. Alternative command to update existing packages: Use the following command to find and install missing packages or to find and update existing packages:
    find /media/RHEL5/cdrom -name compat-libstdc++-33-3.2.3-* | xargs rpm -Uvh

    This single command installs a package when the package is not installed. This command updates a package to a newer version when the package is installed.

If you see “error: Failed dependencies:” see for the dependencies and install them (this could be a recursive operation).

The demonstration above is based on rpm command while you can use yum command to achieve the same.

Test this on non-production before trying it on Production systems.

Advertisements

About mpoojari
Oracle Database/Applications Administrator

2 Responses to Installing missing RPMs for Oracle Database 11gR2

  1. Nagendra Chillale says:

    Hi Mohan,

    I think you should have actually used YUM command to install the missing rpm’s. The reason you setup YUM repository is to install the binaries from any location. And yum can also resolve dependencies on it own unlike rpm.

    Regards,
    Nagendra Chillale

    • mpoojari says:

      Nagendra

      I agree with your comments.

      The demonstration above is based on rpm command while you can use yum command to achieve the same.

      Thanks once again for your comments.

      Mohan Poojari

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: