CentOS系统
1、挂载镜像光盘
[root@localhost ~]# mount /dev/sr0 /media/cdrom/
2、创建本地yum源仓库
[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# vim yum.repo
[local_server]
name=CentOS repo
baseurl=file:///media/cdrom
enabled=1
gpgcheck=0
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
3、更新和查看yum源
[root@localhost yum.repos.d]# yum clean all
[root@localhost yum.repos.d]# yum list all