mikadonic-自动创建挂载本地YUM镜像
mkdir /mnt/cdrom
mount /dev/sr0 /mnt/cdrom
echo "[local]" >>/etc/yum.repos.d/local.repo
echo "name=local" >>/etc/yum.repos.d/local.repo
echo "baseurl=file:///mnt/cdrom" >>/etc/yum.repos.d/local.repo
echo "gpgcheck=0" >>/etc/yum.repos.d/local.repo
echo "enabled=1" >>/etc/yum.repos.d/local.repo
yum clean all&&yum makecache