个人工具

Mirror

来自Ubuntu中文

跳转至: 导航, 搜索
如何从我们这里建立你自己的镜像站点?

假设你的镜像web或者ftp的主目录在 /share ,请至少准备60G的空间来完成镜像 * 建立一个每天计划项目:

$sudo gedit /etc/cron.daily/ubuntu

输入以下内容:

#! /bin/bash
rsync -vzrtopg --progress --delete ubuntu.org.cn::ubuntu /share/ubuntu/
rsync -vzrtopg --progress --delete ubuntu.org.cn::ubuntu-cn /share/ubuntu-cn/

保存退出.

      • 将计划文件类型改成可以执行:
$sudo chmod +x /etc/cron.daily/ubuntu
  • 重启计划服务,生效:
$sudo /etc/init.d/cron restart

如果需要手工完成则执行:

$sudo /etc/cron.daily/ubuntu