Home > Command-Line, Open Source > CentOS: YUM from CDROM

CentOS: YUM from CDROM

This is just a small fix.

Currently I wish to install my packages from CDROM, but no luck. Seems there something wrong with it. I have to use it because Internet is something I can’t always have at home. And if i have it, the connection is too slow.

Therefore, I’ve investigate the problem, then I found the problem. A tiny fix will do.

The original configuration in /etc/yum.repos.d/CentOS-Media.repo is something like this

[c5-media]
name=CentOS-$releasever – Media
baseurl=file:///media/CentOS/
file:///media/cdrom/
file:///media/cdrecorder/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

This is wrong, as the cdrom is mounted at /media/CentOS_5.4_Final not /media/CentOS. Therefore correction should be made. Something like this

[c5-media]
name=CentOS-$releasever – Media
baseurl=file:///media/CentOS_5.4_Final/
file:///media/cdrom/
file:///media/cdrecorder/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

There you go. Installing packages using Yum from CDROM should be no problem.

[anakin@localhost ~ ]$ sudo yum –disablerepo=\* –enablerepo=c5-media install <package>

Categories: Command-Line, Open Source
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

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: