首页 > 其他 > 详细

repo搭建

时间:2018-01-02 16:07:12      阅读:240      评论:0      收藏:0      [点我收藏+]
[root@op-yum01]# cat /home/work/yumdata/rsync-reposync.sh
#!/bin/bash
#Purpose: Sync centos7 repos via rsync behind proxy


#Makesure rsync port 873 is allowed outbound on the squid proxy
#export RSYNC_PROXY=172.18.6.5:80
export RSYNC_PROXY=proxy.intra.yiducloud.cn:80

#create directory structure
mkdir -p /home/work/yumdata/www/centos/7/{os,updates,extras}
mkdir -p /home/work/yumdata/www/saltstack/rhel

#Update Base Repo
rsync -avP rsync://rsync.mirrors.ustc.edu.cn/centos/7/os/ /home/work/yumdata/www/centos/7/os/

#Update Updates Repo
rsync -avP rsync://rsync.mirrors.ustc.edu.cn/centos/7/updates/ /home/work/yumdata/www/centos/7/updates/

#Update Extras Repo
rsync -avP rsync://rsync.mirrors.ustc.edu.cn/centos/7/extras/ /home/work/yumdata/www/centos/7/extras/

#Update epel Repo
rsync -avP rsync://rsync.mirrors.ustc.edu.cn/epel/7/x86_64/ /home/work/yumdata/www/centos/7/epel/x86_64/

#Update Saltstack Repo
rsync -vaH --exclude "*5/*" --exclude "*6/*" --numeric-ids --delete --delete-after --delay-updates rsync://repo.saltstack.com/saltstack_pkgrepo_rhel/redhat/ /home/work/yumdata/www/saltstack/rhel/redhat/

 

repo搭建

原文:https://www.cnblogs.com/tengfei520/p/8177487.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!