码迷,mamicode.com
首页 > 其他好文 > 详细

repo搭建

时间:2018-01-02 16:42:43      阅读:243      评论:0      收藏:0      [点我收藏+]

标签:mkdir   extra   nbsp   str   ror   blog   red   after   centos7   

[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搭建

标签:mkdir   extra   nbsp   str   ror   blog   red   after   centos7   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!