亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 2748 | 回復: 0
打印 上一主題 下一主題

yum自動跟公網(wǎng)站點同步! [復制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2011-02-20 22:19 |只看該作者 |倒序瀏覽
在salogs搜索了yum rsync的腳本,拿來一試感覺不錯。就是共享出來,以下我根據(jù)實際情況修改并增加了其他同步的文件。存儲使用了mfs。
#!/bin/bash
Date=`date +%Y%m%d`
LogFile="/var/log/rsync_yum/$Date.log"
CentOSTrunkVer="5"
CentOSCurrentVer="5.5"
CentOSCurrentv="4.8"
ReceiveMail="nathanzhou@mysite.com"
Cpanpath="/data0/yum/mirrors.sohu.com/CPAN/"
RsyncBin="/usr/local/bin/rsync"
RsyncPerm="-avrt --delete --exclude=debug/  --exclude=isos/"
CentOS_Trunk_Ver_Path="/data0/yum/mirrors.sohu.com/centos/$CentOSTrunkVer"
CentOS_Current_Ver_Path="/data0/yum/mirrors.sohu.com/centos/$CentOSCurrentVer"
CentOS_Current_v_Path="/data0/yum/mirrors.sohu.com/centos/$CentOSCurrentv"
YumSiteList="rsync://mirrors.sohu.com/centos"
Cpansitelist="cpan.wenzk.com::CPAN"
#============ epel ==============
epelSite="rsync://mirrors.sohu.com/fedora-epel/"
epelLocalPath="/data0/yum/mirrors.sohu.com/epel"

# rpmforge
rpmforgeSite="rsync://mirrors.sohu.com/dag/redhat/"
rpmforgeLocalPath="/data0/yum/mirrors.dzwww.com/rpmforce"
# CPAN mirrors
cpansite="rsync://mirrors.sohu.com/nginx/"
cpanlocalpath="/data0/yum/mirrors.sohu.com/CPAN/"

echo "---- $Date `date +%T` Begin ----" >>$LogFile
#CPAN
$RsyncBin $RsyncPerm $Cpansitelist $cpanlocalpath >> $LogFile
# centos 5
$RsyncBin $RsyncPerm $YumSiteList/$CentOSTrunkVer/ \
$CentOS_Trunk_Ver_Path >> $LogFile

# centos 5.5
$RsyncBin $RsyncPerm $YumSiteList/$CentOSCurrentVer/ \
$CentOS_Current_Ver_Path  >> $LogFile
# centos 4.8
$RsyncBin $RsyncPerm $YumSiteList/$CentOSCurrentv/ \
$CentOS_Current_v_Path  >> $LogFile
# epel
$RsyncBin $RsyncPerm  --exclude=4/ --exclude=4AS/ --exclude=4AS/ \
--exclude=4WS/  --exclude=beta/ --exclude=testing/ $epelSite $epelLocalPath >> $LogFile

# rpmforge
$RsyncBin $RsyncPerm $rpmforgeSite $rpmforgeLocalPath >> $LogFile

# CPAN
#$RsyncBin $RsyncPerm $cpansite $cpanlocalpath >> $LogFile

echo  "---- $Date `date +%T` End ----" >> $LogFile


將其置于cron中,一天同步四次。
  1. * */6 * * * /usr/local/bin/yummirror 2>&1 >/dev/null &
復制代碼
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP