1.搭建http服务
yum install httpd -y
开启http服务
systemctl start httpd
设置服务开机启动的
systemctl enable httpd
2.设置仓库路径 #模拟阿里源路径http://mirrors.aliyun.com/centos/7/os/x86_64
#httpd网站根目录/var/www/html/
mkdir /var/www/html/centos/{6,7}/os/x86_64/ -pv
3.将Packages包或者直接将光盘挂在到对应文件夹
mount /dev/sr0 /var/www/html/centos/7/os/x86_64/
4.关闭防火墙
1) 关闭selinux
2)systemctl stop firewalld;systemctl disable firewalld或者service iptables stop;chkconfig iptables off