CentOS: Install Packages Via yum Command Using DVD / CD as Repo

by Vivek Gite · 3 comments

How do I install packages via DVD / CD using yum command under CentOS Community Enterprise Linux version 5.x?

CentOS Linux comes with CentOS-Media.repo which is used to mount the default locations for a CDROM / DVD on CentOS-5. You can use this repo and yum to install items directly off the DVD ISO that we release. Open /etc/yum.repos.d/CentOS-Media.repo file, enter:
# vi /etc/yum.repos.d/CentOS-Media.repo
Make sure enabled is set to 1:
enabled=1
Save and close the file. To use repo put your DVD and along with the other repos, enter:
# yum --enablerepo=c5-media install pacakge-name
To only use the DVDmedia repo, do this:
# yum --disablerepo=\* --enablerepo=c5-media install pacakge-name
OR use groupinstall command
# yum --disablerepo=\* --enablerepo=c5-media groupinstall 'Virtualization'

See Also:

RHEL 5.x user can use the following tutorial to install files from DVD / CD using yum:

  1. Howto Setup yum repositories to update or install package from ISO CDROM Image

Featured Articles:

Want to read Linux tips and tricks, but don't have time to check our blog everyday? Subscribe to our daily email newsletter to make sure you don't miss a single tip/tricks. Subscribe to our weekly newsletter here!

{ 3 comments… read them below or add one }

1 Kimura 07.01.09 at 1:18 pm

Thanks, was the tip I needed at this time

2 aneesh 07.03.09 at 5:54 am

good reference

3 raman 10.21.09 at 7:40 am

centos all command use with exampal
pelije send my id

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous FAQ:

Next FAQ:

nixCraft FAQ PDF Collection Now Available To All