本地配置yum源
1、获得系统镜像,放在/iso目录下
2、临时挂载镜像
mkdir rhel7.2
mount /iso/镜像 rhel7.2/
3、设定系统安装指向(安装源指向)
vim /etc/yum.repos.d/xxx.repo 编辑此文件,来指向安装源,安装源就是你镜像挂载的位置,位置一定要写对,你写的地址必须在网页里面可以打开
[rhel7.2] 仓库名字
name=rhel7.2
baseurl=file:///rhel7.2
gpgcheck=0
yum clean all
yum repolist
yum inatall httpd -y