CentOS use CD-ROM as a local Yum source
In fact, every thing has a lot of solutions, do not hang a tree dead
Modify the default source and back up the file before you modify it.
Saw the Netizen use
CentOS uses CD-ROM as a local Yum source reference network http://linux.chinaunix.net/techdoc/desktop/2008/12/04/1050329.shtml
This is too strenuous, the advantage of course is not to modify the default source, this may be the benefit of the CD source.
Looping to create a file directory (this command is for everyone, perhaps know that a one-time nested create a directory of people have, but very practical, particularly recommended)
Mkdir/a/{1,2,3,4,a,b,c,d,cdrom}-P
Mount the optical drive ISO file or partition (the ISO file has been copied to the c6564 folder)
Choose a mount mode according to your situation
[Root@localhost ~]# mount/dev/cdrom/a/cdrom/
[Root@localhost ~]# mount/dev/sdb1/a/cdrom/
Modify the default source and back up the file before you modify it.
[Root@localhost ~]# Cp/etc/yum.repos.d/centos-base.repo/etc/yum.repos.d/centos-base.repo.bak
Or
[Root@localhost ~]# Cat/etc/yum.repos.d/centos-base.repo >/etc/yum.repos.d/centos-base.repo.bak
Edit Yum File
Enabled=1 1 Boot 0 does not start
Gpgcheck=1 1 Detection 0 does not detect
[Root@localhost ~]# Vi/etc/yum.repos.d/centos-base.repo
[Base]
Name=base
baseurl=file:///a/cdrom/c6564
Gpgcheck=1
Enabled=1
Gpgkey=file:///a/cdrom/c6564/rpm-gpg-key-centos-6
Clear cache to create a new cache
[Root@localhost ~]# Yum Clean all (clear cache)
[Root@localhost ~]# Yum Makecache (Create new cache)
2014.02.01< Six >
23:42