Walker News

How To Use Yum To Install Or Upgrade RPM Package From DVD Media?

It’s not easy and intuitive for most people who use rpm to install or upgrade a RHEL package that has a hell of a lot of dependencies to resolve. The yum, another RPM package manager, is definitely a lifesaver for RHEL sysadmin!

As mentioned in previous post, the Red Hat Enterprise Linux default installation doesn’t create a Yum repository for DVD installation media. Anyway, it’s not that hard to create one in few seconds.

1. Use vi editor to create a yum repository file (let’s call it rhdvd.repo) in /etc/yum.repos.d directory:
vi /etc/yum.repos.d/rhdvd.repo

2. Paste these lines into the rhdvd.repo file:

3. Mount the RHEL DVD media (be it a DVD-ROM or ISO image file) to /media directory (because the repo file in step-2 expects the DVD mounted to this directory).

To mount DVD-ROM:
mount -t iso9660 /dev/cdrom /media

To mount the ISO image file named rh63.iso:
mount -o loop -t iso9660 /root/rh63.iso /media

Now, let’s say we want to install VNC server on Red Hat Enterprise Linux 6.3. First, find out the name of packages related to VNC server:
yum --enablerepo=rhdvd list *vnc*

Using yum to install RPM package in RHEL without worrying of package dependencies.

So, the VNC server in RHEL6.3 is called Tiger VNC. To install it:
yum --enablerepo=rhdvd install tigervnc-server.x86_64 -y

The yum is pretty simple and easy as pie, isn’t it?

Custom Search

2017  •  Privacy Policy