Tuesday, August 18, 2009

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

SkyHi @ Tuesday, August 18, 2009
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


Reference: http://www.cyberciti.biz/faq/centos-linux-install-packages-from-dvd-using-yum/