CentOS makes the local CD as a Yum source for easy resolution of dependency packages:
1./ETC/YUM.REPOS.D directory has two files: Centos-base.repo (networked yum installation), Centos-media.repo (local Yum source)
VI Centos-media.repo
[C5-media]
name=centos-$releasever-media
baseurl=file:///media/here is the Mount directory (mount point)
Gpgcheck=1
#enabled =0 This I commented out, do not know that no comments can be used?
Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-centos-5 do not comment out, or the following Yum prompt no KEY
2. Perform yum--disablerepo=\*--enablerepo=c5-media install perl*
This direct yum install will execute the configuration inside the Centos-base.repo, using yum--disablerepo ... install mode, It will be installed from the local CD using the configuration inside the Centos-media.repo.
This article is from the "Chenli" blog, make sure to keep this source http://cl340266909.blog.51cto.com/2881514/1598562
CentOS make local CD yum source