[root@k0sec ~]# cd /etc/yum.repos.d
[root@k0sec yum.repos.d]# mkdir bak
[root@k0sec yum.repos.d]# cp *.repo bak
[root@k0sec yum.repos.d]# rm -f CentOS-Base.repo
[root@k0sec yum.repos.d]# rm -f CentOS-Debuginfo.repo
[root@k0sec yum.repos.d]# rm -f CentOS-Vault.repo
[root@k0sec yum.repos.d]# vim CentOS-Media.repo
[root@k0sec ~]# mkdir /media/cdrom
[root@k0sec ~]# mount /dev/cdrom /media/cdrom
[root@k0sec ~]# yum clean all //清除rpm头文件以及包缓存
[root@k0sec ~]# yum makecache //制作新的缓存
检验:[root@k0sec ~]# yum -y install php
卸载:[root@k0sec ~]# yum -y remove php