使用http服务提供yum源

时间:2023-03-10 03:13:52
使用http服务提供yum源

1、安装httpd

  yum -y install httpd 

  systemctl start httpd

  systemctl enable httpd

2、镜像资源目录拷贝至http的网站根目录 /var/www/html/

  /var/www/html/centos7.2

  /var/www/html/centos7.4

3、使用该yum仓库

  /etc/yum.repo.d/centos.repo

    [http]
    name=http_centos7.2
    baseurl=http://172.16.22.110/centos7.2
    gpgcheck=0
    enabled=1