LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1028|回复: 3

如何制作一个Arch的同步镜像站点???

[复制链接]
发表于 2006-12-8 08:19:06 | 显示全部楼层 |阅读模式
如题:如何制作一个Arch的同步镜像站点???
发表于 2006-12-8 10:51:44 | 显示全部楼层
http://wiki.archlinux.org/index.php/Local_Mirror
上面有介绍如何制作

这是我在用的脚本,放到cron里面定时执行就可以。
  1. #!/bin/sh
  2. mirror=/opt/mirror
  3. SYNCLOGFILE="$mirror/sync.log"
  4. SYNCLOCKFILE="$mirror/sync_now.lock"
  5. options="-avz --delete --exclude=x86_64"
  6. do_sync() {
  7.     rsync $options rsync.archlinux.org::current /$mirror/current/
  8.     rsync $options rsync.archlinux.org::extra /$mirror/extra/
  9.     rsync $options rsync.archlinux.org::ftp/testing /$mirror/
  10.     rsync $options rsync.archlinux.org::ftp/unstable /$mirror/
  11.     rsync $options rsync.archlinux.org::ftp/community /$mirror/
  12. }
  13. if [[ -f $SYNCLOCKFILE ]]; then
  14.   exit 1
  15. fi
  16. echo -n ">>> Sync log for " > $SYNCLOGFILE
  17. date >> $SYNCLOGFILE
  18. cd $mirror
  19. touch $SYNCLOCKFILE
  20. do_sync >> $SYNCLOGFILE
  21. #do_sync
  22. rm -f $SYNCLOCKFILE
复制代码
回复 支持 反对

使用道具 举报

发表于 2006-12-11 10:02:12 | 显示全部楼层
Pinging buaa-skate.3322.org [211.153.1.200] with 32 bytes of data:
Request timed out.
Request timed out.
广东电信的用户。
回复 支持 反对

使用道具 举报

发表于 2006-12-11 11:42:28 | 显示全部楼层
Post by stchd
Pinging buaa-skate.3322.org [211.153.1.200] with 32 bytes of data:
Request timed out.
Request timed out.
广东电信的用户。


谁和你说能ping通了?

  1. # ping buaa-skate.3322.org
  2. PING buaa-skate.3322.org (211.153.1.200) 56(84) bytes of data.

  3. --- buaa-skate.3322.org ping statistics ---
  4. 5 packets transmitted, 0 received, 100% packet loss, time 3998ms

  5. # lftp buaa-skate.3322.org
  6. lftp buaa-skate.3322.org:~> ls                          
  7. drwxr-xr-x   3 ftp      ftp            72 May 24  2006 0.7.2
  8. drwxrwxr-x   3 ftp      ftp            72 Apr  8  2005 community
  9. drwxr-xr-x   4 ftp      ftp            96 Jan 24  2005 current
  10. drwxr-xr-x   3 ftp      ftp            72 Nov 30  2004 extra
  11. drwxr-xr-x   3 ftp      ftp         13040 Sep 20  2004 i586
  12. drwxr-xr-x   3 ftp      ftp           176 Jan  4  2006 images
  13. drwxr-xr-x   2 ftp      ftp           120 Nov 10 07:31 livecd
  14. drwxr-xr-x  20 ftp      ftp           520 Dec  4 02:36 other
  15. lrwxrwxrwx   1 ftp      ftp             5 Oct 29 03:06 release -> 0.7.2
  16. -rw-r--r--   1 ftp      ftp           944 Dec 11 02:00 sync.log
  17. -rw-r--r--   1 ftp      ftp           665 Nov  1 01:27 sync.sh
  18. drwxr-xr-x   3 ftp      ftp            72 Nov 30  2004 testing
  19. drwxr-xr-x   3 ftp      ftp            72 Nov 30  2004 unstable
复制代码
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表