Wednesday, May 30, 2012

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

Open up the repo file and edit
vi /etc/yum.repos.d/CentOS-Media.repo
read the content carefully

set enabled to 1
enabled=1

Might want to add file:///media/CentOS_6.2_Final on the baseurl

so baseurl would look like this after it is added, the last line woth bold idicated that it is added.

baseurl=file:///media/CentOS/
file:///media/cdrom/
file:///media/cdrecorder/
file:///media/CentOS_6.2_Final/

Install a package with only the CDROM repo

# yum --disablerepo=\* --enablerepo=c6-media install pacakge-name

No comments: