如何更新ubuntu软件源

上一篇 / 下一篇  2012-05-23 15:05:41 / 个人分类:软件测试学习

什么是软件源

软件源指的是通过一定的方式组织,集中放置软件包的地方。很多的应用软件都可以在软件源当中找到。软件源可以是网络服务器,是光盘,甚至是硬盘上的一个目录。作为 debian 系的 ubuntu ,继承了debian 的 deb 和 apt 系统,只要设定好软件源,就能很方便的安装软件了。

世界各地都有 Ubuntu 的软件源服务器,系统中有一个源列表,用于存放这些服务器的位置。用户也可以自行修改源列表。

如何更新软件源

下面以ubuntu 8.04为例,说明来如何配置最快的软件源。(ubuntu 8.10的源附在最后)

1. 打开终端。单击主菜单中的“应用程序 - 附件 - 终端”。

2. 修改更新服务器列表。请在终端中执行下面的两条命令:
sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup #备份原来的软件列表,会要求输入密码
sudo gedit /etc/apt/sources.list #用gedit打开sources.list文件
      在接下来在打开的文本编辑器中,把看到的内容全部删掉,在下面ubuntu8.04源列表(列表地址见下面)里选择一组对于你来说速度最快的更新服务器列 表。粘贴到你所看到的窗口中。这里推荐最后一组台湾的软件源,我2M的电信带宽,更新软件的速度能达到242kB/s,这已经是我的带宽极限了。
台湾的源(8.04版本)
deb http://tw.archive.ubuntu.com/ubuntu hardy main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu hardy-security main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu hardy-updates main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu hardy-backports main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu hardy-proposed main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu hardy main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu hardy-security main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu hardy-updates main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu hardy-backports main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu hardy-proposed main restricted universe multiverse

(8.10版本)
deb http://tw.archive.ubuntu.com/ubuntu intrepid main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu intrepid-security main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu intrepid-updates main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu intrepid-backports main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu intrepid-proposed main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu intrepid main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu intrepid-security main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu intrepid-updates main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu intrepid-backports main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu intrepid-proposed main restricted universe multiverse



3. 对于电信/网通用户,可将欧洲官方源服务器粘贴到最后,但如果觉得忙,不加也可以。
deb http://archive.ubuntu.com/ubuntu/ hardy main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ hardy-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ hardy-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ hardy-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ hardy 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-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ hardy-proposed main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse


ubuntu-cn的源 ,感觉速度也不怎么样,但也可以加一下。
deb http://archive.ubuntu.org.cn/ubuntu-cn/ hardy main restricted universe multiverse

4. 关闭文本编辑器。

5. 更新软件包列表。执行下面的命令:
sudo apt-get update

6. 安装系统更新
    打开“系统->系统管理->更新管理器”,安装更新。完成后若系统提示重新启动,请重新启动系统。


ubuntu 8.04源地址
http://wiki.ubuntu.org.cn/index.php?title=Template:8.04source&variant=zh-cn
ubuntu 8.10源地址
http://wiki.ubuntu.org.cn/Template:8.10source
ubuntu 7.04源地址
http://wiki.ubuntu.org.cn/index.php?title=Template:7.10source&variant=zh-cn

更多信息请参阅ubuntu速配指南
http://wiki.ubuntu.org.cn/%E5%BF%AB%E9%80%9F%E8%AE%BE%E7%BD%AE%E6%8C%87%E5%8D%97

TAG:

 

评分:0

我来说两句

日历

« 2024-05-10  
   1234
567891011
12131415161718
19202122232425
262728293031 

数据统计

  • 访问量: 16347
  • 日志数: 18
  • 书签数: 4
  • 建立时间: 2011-10-17
  • 更新时间: 2012-10-22

RSS订阅

Open Toolbar