Managing Yum @ Redhat / Oracle Enterprise 4

Most of the times while we are installing prerequisites for the oracle installation, its some what painful to get the updated rpms and dependencies, especially in Redhat Enterprise and Oracle Enterpirse version 4.  The following document explains us to overcome this issue.

Yum is the easiest way to keep all programs up to date. It downloads and installs the latest version of a program. A single command can update all software installed, including third-party software, security updates and operating system. In this howto, we install yum (on Redhat&Oracle Enterpirse OS ) and make it do all the above.

First remove the installed yum rpms.

 # rpm -e `rpm -qa|grep yum`

Go to the folder where you want to download yum. Most likely cd /tmp/.

# wget -c http://dag.wieers.com/rpm/packages/yum/yum-2.4.2-0.4.el4.rf.noarch.rpm
# rpm -ivh yum-2.4.2-0.4.el4.rf.noarch.rpm

If you can see the file with ls, you are on the right place.

Delete all the repository file in the /etc/yum.repos.d/

# cd /etc/yum.repos.d/
# rm -rf *

Create a  new Base file in /etc/yum.repos.d and add the contents

# vi /etc/yum.repos.d/CentOS-Base.repo

[base]

 name=CentOS-$releasever – Base

mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os

 gpgcheck=1

 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4

 priority=1

protect=1

[update]

name=CentOS-$releasever – Updates

 mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates

 gpgcheck=1

 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4

priority=1

protect=1

[addons]

 name=CentOS-$releasever – Addons

 mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons

 gpgcheck=1

 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4

 priority=1

 protect=1

 [extras]

 name=CentOS-$releasever – Extras

 mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras

 gpgcheck=1

 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4

 priority=1

 protect=1

 [centosplus]

 name=CentOS-$releasever – Plus

 mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus

 gpgcheck=1

enabled=1

 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4

 priority=2

 protect=1

 [contrib]

name=CentOS-$releasever – Contrib

mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib

gpgcheck=1

enabled=0

 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4

 priority=2

 protect=1

<!–[endif]–>

Restart the yum service and now you are ready to update or install any packages.

Add trusted packagers to your keys

In yum, it really does not matter if enemy takes over the internet and fakes to be some website offering software. All software is cryptographically checked before installation (if you have set gpgcheck=1 in yum.conf). To install some software, we must tell yum who we trust.

For the first update or install of any package, it asks to import Trusted Key’s.  Now you need to just press “Y”.

Is this ok [y/N]: y

If you are  unable to find the updates from the Vendor repository, use dag.wieer repository rpm where you can find all rpms and dependencies details.

# rpm -Uhv http://apt.sw.be/redhat/el4/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el4.rf.i386.rpm
# service yum restart

Now you can install any package for this architecture.



    

About the Author Masroof Ahmad

Leave a Comment:

8 comments
geeta.dba says November 25, 2008

Thanks shanker for such a informative article.
I used to struggle for installing rpms from internet. but this article made very easy for installing rpms in Oracle Enterprise Linux.

Appreciate for good article

Geeta DBA

Reply
Atul Kumar says November 25, 2008

Good One Shanker,

How is “up2date” different from Yum ?

Reply
Shanker says November 26, 2008

Thanks Atul

I had found that the up2date is the same as yum with regards to using the same repositories. I think the only main difference that I could tell is that Up2date has a visual tool for the Linux desktop and yum is more of a Command line program.

In Fedora Versions, it seems that by simply adding a new .repo file to the /etc/yum.repos.d directory, the repository becomes available as a new channel in up2date. This is a good thing, I would assume.
we can add dag.repo file to /etc/yum.repos.d/, it automatically appeared as a ‘repomd’ channel in up2date. we can prioritize the channel search like first go to redhat, then dag Wieer repository.

Yum is much more easier to use when compared to up2date! Yum uses less CPU.

Reply
» LDAP Installation and Migration Online Apps DBA: One Stop Shop for Apps DBA’s says December 4, 2008

[…] fedora-ds using yum  or rpm.  If you want to use rpm to install, download the fedora-ds […]

Reply
Step by Step: Yum + Samba « PSST0101 says December 10, 2008

[…] several things to work, and configuring yum would make it much, much easier.  So, I found this article and figured it was time to give it a […]

Reply
Neil100 says January 6, 2009

Thanks Shanker

does this mean that ALL rpm’s from the Centos repository or Dag Wiers repository are
compatible with Redhat and Oracle Enterprise Linux.

Would Redhat or Oracle support you if you they
noticed we used a non redhat or no oracle provided rpm ?

Many thanks

Neil

Reply
Shanker says March 11, 2009

Neil,

Centos repository are compatible with OEL and RHEL, as they are using same source code for their packages.

Reference: http://linuxmafia.com/faq/RedHat/rhel-forks.html

If you’ve paid for support, such as with a subscription to Red Hat Enterprise Linux (RHEL), use it. Otherwise, make use of the documentation.

– Shanker

Reply
» Step by Step: Yum + Samba PSST0101 says July 20, 2011

[…] several things to work, and configuring yum would make it much, much easier.  So, I found this article and figured it was time to give it a […]

Reply
Add Your Reply