Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7112296
  • 博文数量: 3857
  • 博客积分: 6409
  • 博客等级: 准将
  • 技术积分: 15948
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-02 16:48
个人简介

迷彩 潜伏 隐蔽 伪装

文章分类

全部博文(3857)

文章存档

2017年(5)

2016年(63)

2015年(927)

2014年(677)

2013年(807)

2012年(1241)

2011年(67)

2010年(7)

2009年(36)

2008年(28)

分类:

2012-11-13 19:56:20

debian 6.0.0:(AMD64:大概33.8GB)
1.apt-get install apt-mirror
2.修改配置文件/etc/apt/mirror.list :
set nthreads     20
set _tilde 0
set base_path /svn/ossource/debian600
set mirror_path $base_path/mirror
set skel_path   $base_path/skel
set var_path    $base_path/var
deb-amd64 squeeze main contrib non-free
deb-amd64 squeeze-updates main contrib non-free
deb-amd64 squeeze-proposed-updates main contrib non-free
clean
3.手工创建相关目录
mkdir -p /opt/ossource/debian600/mirror
mkdir -p /opt/ossource/debian600/var
mkdir -p /opt/ossource/debian600/skel
chown -R apt-mirror /opt/ossource/debian600/
4.执行
su - apt-mirror
nohup apt-mirror &
检查nohup.out日志,出现“Post Mirror script has completed”表示完成
 
====================================
ubuntu 12.04:(AMD64:大概93.7 GB)
1.apt-get install apt-mirror
2.修改配置文件/etc/apt/mirror.list :
set nthreads     20
set _tilde 0
set defaultarch  amd64
set base_path /ossource/ubuntu1204
set mirror_path $base_path/mirror
set skel_path   $base_path/skel
set var_path    $base_path/var
 
deb precise main restricted universe multiverse
deb-src precise main restricted universe multiverse
deb precise-updates main restricted universe multiverse
deb-src precise-updates main restricted universe multiverse
deb precise-security main restricted universe multiverse
deb-src precise-security main restricted universe multiverse
deb precise-proposed main restricted universe multiverse
deb-src precise-proposed main restricted universe multiverse
deb precise-backports main restricted universe multiverse
deb-src precise-backports main restricted universe multiverse
 
clean
 
3.手工创建相关目录
mkdir -p /ossource/ubuntu1204/mirror
mkdir -p /ossource/ubuntu1204/var
mkdir -p /ossource/ubuntu1204/skel
chown -R apt-mirror /ossource/ubuntu1204/
 
4.执行
su - apt-mirror
nohup apt-mirror &
检查nohup.out日志,出现“Post Mirror script has completed”表示完成
 
===================
周期性自动同步:修改如下文件
/etc/cron.d/apt-mirror
===================
http发布:(/etc/apache2/sites-available/default)
Alias /debian  /opt/ossource/debian600/mirror/ftp.us.debian.org/debian/

        Options Indexes FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
 
Alias /ubuntu  /ossource/ubuntu1204/mirror/mirrors.163.com/ubuntu/

     Options Indexes FollowSymLinks
     AllowOverride All
     Order allow,deny
     Allow from all

===================
4、客户端的修改
现在修改/etc/apt/sources.list文件,加入或者只保留如下行,再用#apt-get update更新一次就可以了
debian:
deb squeeze main contrib non-free
deb squeeze-updates main contrib non-free
deb squeeze-proposed-updates main contrib non-free
ubuntu:
deb precise main multiverse restricted universe
deb-src precise main multiverse restricted universe
deb precise-updates main multiverse restricted universe
deb-src precise-updates main multiverse restricted universe
deb precise-backports main multiverse restricted universe
deb-src precise-backports main multiverse restricted universe
deb precise-security main multiverse restricted universe
deb-src precise-security main multiverse restricted universe
deb precise-proposed main multiverse restricted universe
deb-src precise-proposed main multiverse restricted universe
 
阅读(307) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~