repo搭建

[root@op-yum01]# cat /home/work/yumdata/rsync-reposync.sh
#!/bin/bash
#Purpose: Sync centos7 repos via rsync behind proxy #Makesure rsync port is allowed outbound on the squid proxy
#export RSYNC_PROXY=172.18.6.5:
export RSYNC_PROXY=proxy.intra.yiducloud.cn: #create directory structure
mkdir -p /home/work/yumdata/www/centos//{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/
上一篇:渐变显示渐变消失的BackgroundView


下一篇:Oracle游标-循环查询表中数据(表名),并执行