Nginx私有yum源

同步线上YUM源仓库

rsync -avrt --delete rsync://mirrors.ustc.edu.cn/centos/7/cloud/x86_64/openstack-stein /home/yum/cloud/

本地创建私有源仓库

# 安装createrepo工具
yum install yum-utils createrepo -y
# 创建本地仓库
cd /home/yum && createrepo cloud

Nginx配置Http服务

# *.conf配置
server {
listen 8188;
server_name localhost;

  location / {
    root /home/yum/cloud;
    autoindex on;
  }
}

Centos-Base.repo修改配置

# cat /etc/yum.repos.d/CentOS-Base.repo

本文来自博客园,作者:MegaloBox,转载请注明原文链接:https://www.cnblogs.com/cpw6/p/15213991.html

原文地址:https://www.cnblogs.com/cpw6/p/15213991.html