手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

Ubuntu mirror 可用源

[日期:2008-09-18] 来源:Linux公社  作者:Linux编辑 [字体: ]

1:加下面的行到/etc/apt/sources.list
deb http://apt-mirror.sourceforge.net/ apt-mirror/

2:apt-get update

3:apt-get install apt-mirror

4:根据需要修改/etc/apt/mirror.list,添加离你最近的源

############# config ##################
#
# set base_path /var/spool/apt-mirror
#
# if you change the base path you must create the directories below with write privlages
#
# set mirror_path $base_path/mirror
# set skel_path $base_path/skel
# set var_path $base_path/var
# set cleanscript $var_path/clean.sh
# set defaultarch
set nthreads 20
set _tilde 0
#
############# end config ##############

deb http://debian.cn99.com/debian/ etch main contrib non-free
deb-src http://debian.cn99.com/debian/ etch main contrib non-free

deb http://security.debian.org/ etch/updates main contrib non-free
deb-src http://security.debian.org/ etch/updates main contrib non-free

#deb http://archive.Ubuntu.com/ubuntu hardy main restricted universe multiverse
#deb http://archive.ubuntu.com/ubuntu hardy-updates main restricted universe multiverse
##deb http://archive.ubuntu.com/ubuntu hardy-backports main restricted universe multiverse
#deb http://archive.ubuntu.com/ubuntu hardy-security main restricted universe multiverse
##deb http://archive.ubuntu.com/ubuntu hardy-proposed main restricted universe multiverse
#
#deb-src http://archive.ubuntu.com/ubuntu hardy main restricted universe multiverse
#deb-src http://archive.ubuntu.com/ubuntu hardy-updates main restricted universe multiverse
##deb-src http://archive.ubuntu.com/ubuntu hardy-backports main restricted universe multiverse
#deb-src http://archive.ubuntu.com/ubuntu hardy-security main restricted universe multiverse
##deb-src http://archive.ubuntu.com/ubuntu hardy-proposed main restricted universe multiverse

clean http://debian.cn99.com/debian/

#
# deb cdrom:[Debian GNU/Linux 4.0 r0 _Etch_ - Official i386 NETINST Binary-1 20070407-11:29]/ etch contrib main

5:获得源信息
su apt-mirror -c apt-mirror
可能会报错:

jumping:~# su apt-mirror -c apt-mirror
Downloading 30 index files using 20 threads...
Begin time: Fri Aug 29 11:38:38 2008
[20]... [19]... [18]... [17]... [16]... [15]... [14]... [13]... [12]... [11]... [10]... [9]... [8]... [7]... [6]... [5]... [4]... [3]... [2]... [1]... [0]...
End time: Fri Aug 29 11:40:49 2008

Proceed indexes: [Ssh: debian.cn99.com/debian///dists/etch/main/source/Sources.gz: No such file or directory
apt-mirror: can't open index in proceed_index_gz at /usr/bin/apt-mirror line 382.


到/var/spool/apt-mirror/skel/debian.cn99.com/debian/dists/etch/main/source/目录下去看看有没有Sources.gz。没有的话,再执行一遍
su apt-mirror -c apt-mirror
直到有为止。

正确的输出应该是:
jumping:# su apt-mirror -c apt-mirror
Downloading 30 index files using 20 threads...
Begin time: Fri Aug 29 11:53:32 2008
[20]... [19]... [18]... [17]... [16]... [15]... [14]... [13]... [12]... [11]... [10]... [9]... [8]... [7]... [6]... [5]... [4]... [3]... [2]... [1]... [0]...
End time: Fri Aug 29 11:54:27 2008

Proceed indexes: [SSPP]

30.1 GiB will be downloaded into archive.
Downloading 51528 archive files using 20 threads...
Begin time: Fri Aug 29 11:54:33 2008
[20]...

6:部署apache,提供给其他用户使用该源(参考网上的文章)

linux
相关资讯       Ubuntu 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款