1./ mount 所有的光盘镜像(iso)
# mkdir /mnt/iso1
# mkdir /mnt/iso2
# mkdir /mnt/iso3
# mkdir /mnt/iso4
 
# mount -o loop /srv/iso/cd1.iso /mnt/iso1
# mount -o loop /srv/iso/cd2.iso /mnt/iso2
# mount -o loop /srv/iso/cd3.iso /mnt/iso3
# mount -o loop /srv/iso/cd4.iso /mnt/iso4
2./ 修改yum的更新源
# vi /etc/yum.repos.d/CentOS-Media.repo
 
baseurl=file:///media/cdrom/
            =file:///media/cdrecorder/
            =file:///mnt/iso1/
            =file:///mnt/iso2/
            =file:///mnt/iso3/
            =file:///mnt/iso4/
保存退出。
3./ 执行yum 安装软件包(以安装gcc为例)
# yum --disablerepo=\* --enablerepo=c4-media install gcc