• [转发]centos7搭建自己的yum源


    centos7搭建自己的yum源

    https://www.cnblogs.com/juandx/p/6136621.html
    
    还是需要学习呢 自己之前记得 查过 但是忘记了.
     
     

     http://www.wenbin.cf/post/37/

    1. 安装nginx,createrepo

    1
    2
    yum install nginx -y
    yum install createrepo -y

      

    2. 修改nginx配置文件,/etc/nginx/nginx.conf

    1
    2
    3
    location / {
                autoindex on;
            }

      重启nginx, systemctl restart nginx

    3. 在nginx根目录建立文件夹

    1
    mkdir -p /usr/share/nginx/html/CentOS_72_1511_Yum/Aliyun/version_7.2/64bit

      

    4. 准备同步阿里云的源,base,updates,extras,epel, 确保/etc/yum.repos.d/ 下只有下面这两个repo

    1
    2
    3
    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
     
    wget -O /etc/yum.repos.d/CentOS-epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

      

    5. 开始同步下载包

    1
    reposync -p /usr/share/nginx/html/CentOS_72_1511_Yum/Aliyun/version_7.2/64bit/

      

    6. 建仓

    1
    2
    3
    4
    createrepo -p /usr/share/nginx/html/CentOS_72_1511_Yum/Aliyun/version_7.2/64bit/base/Packages
    createrepo -p /usr/share/nginx/html/CentOS_72_1511_Yum/Aliyun/version_7.2/64bit/extras/Packages
    createrepo -p /usr/share/nginx/html/CentOS_72_1511_Yum/Aliyun/version_7.2/64bit/updates/Packages
    createrepo -p /usr/share/nginx/html/CentOS_72_1511_Yum/Aliyun/version_7.2/64bit/epel

      

    7. crontab定时同步

    1
    2
    crontab -e
    1 2 * * * /usr/bin/reposync -np /usr/share/nginx/html/CentOS_72_1511_Yum/Aliyun/version_7.2/64bit/
  • 相关阅读:
    MySql 数据类型
    MySql 数据库的增删改
    MySql 联合查询
    Mysql 库的管理 --->>>>DDL
    MySql 子查询
    MySql 分页查询
    sql99语法的连接查询
    MySql 连接查询
    MySql 分组函数
    jQ处理页面中尺寸过大的图片
  • 原文地址:https://www.cnblogs.com/jinanxiaolaohu/p/11194908.html
Copyright © 2020-2023  润新知