搭建yum服务器

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/

扫描二维码关注公众号,回复: 9153443 查看本文章

4.关闭防火墙

1) 关闭selinux

 2)systemctl stop firewalld;systemctl disable firewalld或者service iptables stop;chkconfig iptables off

猜你喜欢

转载自www.cnblogs.com/franc/p/12308075.html