Saturday, March 21, 2015

How can I Add the RHEL DVD to the YUM repository - RHEL 7.0




After installing my brand new Redhat 7.0 with minimal features in my virtual box I found that I am unable to installing package by using yum. I don't have access to online repository, so I decided to install from my DVD. This is how add my DVD repo. I am posting this here for my future reference and people who faces same issue like me,


Insert the Red Hat Enterprise Linux Server DVD into your DVD-ROM drive and mount it under /media/.

In my case, the DVD was automounted under /run/media/redhat/RHEL-7.0\ Server.x86_64/

Then as root, create a new file in the yum repository directory:

# vim /etc/yum.repos.d/rhel-dvd.repo


This file contains the metadata of the repository. Add following line in the file [you can edit according to your preference]

[rhel-dvd]
name=Red Hat Enterprise Linux $releasever - $basearch - DVD
baseurl=file:///run/media/redhat/RHEL_7.0\ Server.x86_64
enabled=1
gpgcheck=1
gpgkey=file:///run/media/redhat/RHEL_7.0\ Server.x86_64/RPM-GPG-KEY-redhat-release

Save and close the file. Done!

Now you can use yum to install new packages and resolve dependencies.

If you want to remove the DVD from the yum sources, simply change enabled=1 to enabled=0.


Now you can check if it's work:

# yum repolist all



Saturday, May 1, 2010

Welcome Post : SysAdmin

Welcome to my System Administrator Blog.
Here I will share my personal experience as a System Administrator with all of you guys. 
This blog will contain challenges of system administrator faces in daily life, I will also include the solutions of the issues.

System Administration department is the heart of any organisation. System Administrator is a big name and big responsibility, big challenge and fun, because big power comes with big responsibility. Hope you guys will like my post and share yours as well.

Best Regards
Charles