Friday, August 31, 2012

How to add Oracle essential packages YUM repo

Normally you will need Oracle essential packages for Oracle 11gR2 Database and RAC installation & configuration.

#cd /etc/yum.repos.d


#yum list

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

For Other OS's:

Download and copy the appropriate yum configuration file in place, by running the following commands as root:
Oracle Linux 4, Update 6 or Newer

# cd /etc/yum.repos.d
# mv Oracle-Base.repo Oracle-Base.repo.disabled
# wget

Oracle Linux 5

# cd /etc/yum.repos.d
# wget

Oracle Linux 6

# cd /etc/yum.repos.d
# wget

Oracle VM 2

# cd /etc/yum.repos.d
# wget

Enable the appropriate repository by editing the yum configuration file

    Open the yum configuration file in a text editor
    Locate the section in the file for the repository you plan to update from, e.g. [el4_u6_base]
    Change enabled=0 to enabled=1

Begin using yum, for example:

#yum list

How to add remote FTP / HTTP repose to RHEL 6 server

To do it, first you need to collect below two details;

  • FTP / HTTP YUM server IP i.e. ""
  • Packages location on remote YUM server i.e. "/rhel6_64repo/Packages/"

Then create a repo file "rhel6_64_remote.repo" in "/etc/yum.repos.d/" folder with below content;

name=Remote Network Repository for RHEL6 $releasever – $basearch

If you want to add HTTP repo link, then replace "ftp" with "http".

To add Local repo, read this article.

How to create and add a Local YUM Repository for RHEL6 64Bit OS

Follow these simple steps to create Local yum repository for RHEL 6.0 64Bit OS;

  1. Copy your whole RHEL 6.0 DVD to a local folder, in my case i created "/rhel6_64repo/" folder to copy all these packages.
  2. Install "createrepo-<version>.rpm". It will ask for some of the dependency packages for installation, resolve it manually.
  3. Change working folder to "/rhel6_64repo/Packages/", where all the rpm packages are copied. #cd /rhel6_64repo/Packages .
  4. Run "#createrepo -v /rhel6_64repo/Packages/" command as root. It will take several minutes to build the repomd.xml file and you will find folder name “repodata” in "/rhel6_64repo/Packages/" folder.
  5. Now it's time to create repository file to "/etc/yum.repos.d/" folder. Make a file "# vi /etc/yum.repos.d/rhel6_64_local.repo" and add below content in it,
name=RHEL 6 64 Bit Local Repository

Run " #yum list " and now repo setup is ready to install/uninstall any rpm package without any dependency problem which is available in you RHEL DVD.