制作ubuntu mirror源的镜像服务器
Author:gaojinbo
Time:2009-11-23
以下脚本是同步ubuntu官方镜像到本地磁盘,也就是制作自己的ubuntu mirror
1.制作同步脚本
vi ubuntu-mirror.sh
#! /bin/bash
if [ $(/bin/ps aux |grep tw.archive.ubuntu.com |wc -l ) -le 1 ];
then
rsync -aPS –delete-after \
–exclude *ia64* –exclude *powerpc* –exclude *sparc* \
–exclude *hoary* –exclude *warty* –exclude *dapper* \
–exclude *breezy* \
–exclude *.iso \
–exclude *.orig.tar.gz –exclude *.diff.gz \
–exclude *.dsc \
rsync://tw.archive.ubuntu.com/ubuntu \
/data1/ubuntu
else
echo rsync runing
fi
2.增加执行权限
chmod +x ubuntu-mirror.sh
3.每隔5分钟自动同步一次
crontab -e
*/5 * * * * /home/ylmf/ubuntu-mirror.sh
说明:/data1/ubuntu是本地磁盘目录,以上脚本会同步最新的几个发行版,排除了iso等
完成!
五月 2nd, 2011 at 05:23
Recent Favourite Websites…
[...]while the sites I link to below are completely unrelated to mine, I think they are worth a read, so go and have a look http://www.panicattackstreatmentcure.net/links/…...
五月 3rd, 2011 at 04:06
Recent Websites I Like…
[...]here are some other links to sites that I link to because I think they are really worth visiting: http://www.panicattackstreatmentcure.net/links/…...
五月 12th, 2011 at 08:18
Related Websites…
[...]some other related resources on the web that are worth viewing on this subject include[...]…
六月 21st, 2011 at 04:16
The best website……
[...]here are some links to sites that we link to because we think they are worth visiting[...]……
十二月 7th, 2011 at 06:46
Cool sites……
[...]we came across a cool site that you might enjoy. Take a look if you want[...]………