步骤1:加载ISO
创建ISO挂载目录 mkdir /mnt/cdrom
挂载ISO至/mnt/cdrom mount -t iso9660 /dev/cdrom /mnt/cdrom

步骤2:配置本地yum源
创建配置文件 touch CentOS-ISO.repo
写入配置内容如下

[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
baseurl=file:///mnt/cdrom
enabled=1
gpgcheck=0
gpgkey=file:///mnt/cdrom/rpm-gpg/RPM-GPG-KEY-CentOS-7

最后执行以下命令:
yum clean all

yum update