一个快速的CentOs回购问题

我们有一大堆的centos服务器,我厌倦了更新和连接到一个慢镜子,等待很长时间的更新。 所以我决定只是创build一个本地存储库服务器。

这是我的脚本来同步

#!/bin/bash /usr/bin/rsync -rtLv --progress rsync://pubmirrors.reflected.net/centos/5/ --exclude=debug/ --exclude=isos/ /var/www/html/centos/5/ /usr/bin/rsync -rtLv --progress rsync://pubmirrors.reflected.net/centos/5.5/ --exclude=debug/ --exclude=isos/ /var/www/html/centos/5.5/ /usr/bin/rsync -rtLv --progress rsync://pubmirrors.reflected.net/centos/5.4/ --exclude=debug/ --exclude=isos/ /var/www/html/centos/5.4/ 

我的问题是:不是/ 5 / dir应该是一个sym连接到5.5或最新的版本是什么? 我的rsync脚本只是对待它的文件夹,并下载所有的5.5文件两次或有一些/ 5 /和/5.5/之间的合法区别

5通常是最新的版本,通常是符号链接,但依赖于镜像。

我们把这个用于我们的本地镜像:

 export MIRROR="centos.mbni.med.umich.edu::mirror" rsync -v -azH --exclude=HEADER.html --exclude=HEADER.images --exclude=SRPMS --de lete-excluded ${MIRROR}/5/updates/ /export/centos/5/updates/ rsync -v -azH --exclude=HEADER.html --exclude=HEADER.images --exclude=SRPMS --de lete-excluded ${MIRROR}/5/centosplus/ /export/centos/5/centosplus/ rsync -v -azH --exclude=HEADER.html --exclude=HEADER.images --exclude=SRPMS --de lete-excluded ${MIRROR}/5/os/ /export/centos/5/os/ rsync -v -azH --exclude=HEADER.html --exclude=HEADER.images --exclude=SRPMS --de lete-excluded ${MIRROR}/5/extras/ /export/centos/5/extras/ find /export/centos/5/ \( -not -type l -and -not -type d \) -and \( -not -perm 6 60 -or \( -not -group apache -or -not -user apache \) \) -exec chown apache:apac he {} \; -exec chmod 660 {} \; find /export/centos/5/ -type d -not -type l -exec chown apache:apache {} \; -exe c chmod 770 {} \;