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


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章