Wednesday, July 18, 2012

CentOS 6 : Using DVD/CD as your local repo #2

Put the dvd in to the cdrom, and we need to mount the dvd.
#mkdir /media/CentOS_6.2_Final

after that mount the dvd with this command:

#mount /dev/cdrom /media/CentOS_6.2_Final
and then Edit CentOS-Media.repo
vi /etc/yum.repos.d/CentOS-Media.repo

You will see something like this

baseurl=file:///media/CenOS/
       and blah blah

Change the "file=:///media/CentOS" to "file=:///media/CentOS_6.2_Final"


Save the file


and install package

yum --disablerepo=\* --enablerepo=c6-media

for example to install perl

yum --disablerepo=\* --enablerepo=c6-media install perl

No comments: