1:创建iso存放目录和挂载目录
# mkdir /tmp/server_mirror/
2:将iso镜像文件上传到/mnt/文件夹下,并且对目录授权
chmod -R 777 /mnt
3:将/mnt/下的iso文件挂载到/tmp/server_mirror目录
mount /mnt/CentOS-6.5-x86_64-minimal.iso /tmp/server_mirror/
4.编辑/etc/yum.repos.d/local.repo
[zzq]
name=local_mirror
baseurl=file:///tmp/server_mirror/
gpgcheck=0
enabled=1
5.清缓存
yum clean all
6.生成
yum makecache