debian6如何利用apt-mirror制作本地源

1、apt-get install apt-mirror

2、vim /etc/apt/mirror.list

添加下面的内容:

deb http://mirrors.163.com/debian/squeeze main non-free contrib

debhttp://mirrors.163.com/debian/ squeeze-proposed-updates main non-free contrib

debhttp://fai-project.org/download squeeze koeln

 

cleanhttp://mirrors.163.com/debian/

clean http://fai-project.org/download


set base_path "mount 的目录"

注释掉其他deb包和clean信息,保留其余设置

3、执行apt-mirror

4、安装HTTP服务    apt-get install apache2

5、ln -s mount目录/mirror/mirror.163.com/debian/ /var/www/debian

   ln -s mount目录/mirror/fai-project.org/download/ /var/www/download

6、修改本地/etc/apt/sources.list

deb file:/var/www/debian/ squeeze main non-free contrib

deb file:/var/www/debian/ squeeze-proposed-updates main non-free contrib

deb file:/var/www/download squeeze koeln

7、修改其他服务器/etc/apt/sources.list

deb http://本地源ip/debian/ squeeze main non-free contrib

deb http://本地源ip/debian/ squeeze-proposed-updates main non-free contrib

deb http://本地源ip/download squeeze koeln

8、apt-get update

注意:

使用完整本地源执行更新操作(apt-get update)时如出现“Release file expired”错误,执行如下命令进行更新操作

apt-get -oAcquire::Check-Valid-Until=false update


你可能感兴趣的:(Debian6,本地源)