| 网管联盟 | 网管论坛 | 网管u家 | 网管博客 | 网管软件 | 网管求职 | 小游戏 | 网管搜索 | 网管原创 | 网管聚合 | 网管读摘 | 网管焦点 | 世界素材 | 会员投稿 | 会员中心 |
![]() |
| Windows Linux Cisco 网络技术 数据库 黑客攻防 DotNet Java PHP 认证 新闻资讯 服务器 存储资讯 网络设备 网管学堂 技术专题 焦点 网吧频道 |
写在前面:小F浏览了很多国内外的网站,看了很多关于软件源(Software Sources)设置的文章,发现有很多文章中对软件源的设置存在误解,为了让新人能顺利进入Ubuntu的大家庭,小F特地作此文,详细地介绍下软件源的设置。
中国网管联盟bitsCN.com
1、软件源(Software Sources)是什么?
在Ubuntu中,软件源是指一个由可以获得软件的地址组成的集合,这个地址可以是网站、光盘,或者是硬盘上的一个目录。软件源上有“软件仓库”,软件 仓库中存储着各种各样的软件。当你需要用到一个软件的时候,就可以通过工具(新立得synaptic 、 apt-get 或者 aptitude 等),自动地下载并自动地安装。 网管u家bitscn.net
2、软件源(Software Sources)设置好了,我可以获得哪些便利? 网管u家u.bitsCN.com
日常的软件安装或者更新都是采用从软件源获取软件包的方式。设置好软件源可以让你及时获取重要的安全更新,解决安全隐患;或者修复已知的问题,让使用更顺手。设置好软件源同样可以加快以上操作的速度,节约你宝贵的时间。 网管有家www.bitscn.net
3、我是新手,我不会设置,有简单的图形化界面的设置方法吗? 网管网www.bitscn.com
Ubuntu的系统(System)-系统管理(Administration)菜单里提供了图形化界面的软件源设置(Software Sources)程序,不过小F提醒一下大家,只使用这个是不够的!(具体设置方法请继续往下看)
网管u家www.bitscn.net
4、正确的设置方法!
在开始修改设置之前,先备份一下原来的设置。这一步看似多余,其实是一种很好的习惯,有利于配置错误时的恢复。备份方法是:按Alt+F2,然后输入 gksu cp /etc/apt/sources.list /etc/apt/sources.list-backup。回车后输入你的密码。 网管u家www.bitscn.net
然后打开设置程序:系统(System)-系统管理(Administration)-软件源设置(Software Sources)。在第一个标签页上,单击“下载自(Download From)”右边的菜单,选择“其他…(Others…)”。然后在弹出的窗口中单击“选择最佳服务器(Select Best Server)”。下面系统会自动ping官方服务器列表中的服务器,并选择最快的!
网管有家bitscn.net
再按Alt+F2打开“运行程序(Run Application)”,输入 gksu gedit /etc/apt/sources.list。回车后如果有提示输入密码,输入你的密码。把光标调到文件的最后。 网管网www_bitscn_com
(1)电信用户加入下面的内容: 网管有家www.bitscn.net
deb http://ubuntu.cn99.com/ubuntu/ hardy main restricted universe multiverse deb http://ubuntu.cn99.com/ubuntu/ hardy-security main restricted universe multiverse deb http://ubuntu.cn99.com/ubuntu/ hardy-updates main restricted universe multiverse deb http://ubuntu.cn99.com/ubuntu/ hardy-proposed main restricted universe multiverse deb http://ubuntu.cn99.com/ubuntu/ hardy-backports main restricted universe multiverse deb-src http://ubuntu.cn99.com/ubuntu/ hardy main restricted universe multiverse deb-src http://ubuntu.cn99.com/ubuntu/ hardy-security main restricted universe multiverse deb-src http://ubuntu.cn99.com/ubuntu/ hardy-updates main restricted universe multiverse deb-src http://ubuntu.cn99.com/ubuntu/ hardy-proposed main restricted universe multiverse deb-src http://ubuntu.cn99.com/ubuntu/ hardy-backports main restricted universe multiverse deb http://ubuntu.cn99.com/ubuntu-cn hardy main restricted universe multiverse deb http://us.archive.ubuntu.com/ubuntu/ hardy main restricted deb-src http://us.archive.ubuntu.com/ubuntu/ hardy restricted main universe deb http://us.archive.ubuntu.com/ubuntu/ hardy universe deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates universe deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-updates universe deb http://archive.ubuntu.com/ubuntu/ hardy main restricted deb-src http://archive.ubuntu.com/ubuntu/ hardy restricted main universe deb http://archive.ubuntu.com/ubuntu/ hardy universe deb http://archive.ubuntu.com/ubuntu/ hardy-updates universe deb-src http://archive.ubuntu.com/ubuntu/ hardy-updates universe #Added by software-properties deb http://security.ubuntu.com/ubuntu hardy-security main restricted deb-src http://security.ubuntu.com/ubuntu hardy-security restricted main universe deb http://security.ubuntu.com/ubuntu hardy-security universe网管网www_bitscn_com
(2)网通/教育网用户加入下面的内容: 网管u家www.bitscn.net
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-updates main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-updates main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-backports main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-backports main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-security main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-security main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-proposed main multiverse restricted universe
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-proposed main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu-cn hardy main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ hardy main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy restricted main universe
deb http://us.archive.ubuntu.com/ubuntu/ hardy universe
deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-updates universe
deb http://archive.ubuntu.com/ubuntu/ hardy main restricted
deb-src http://archive.ubuntu.com/ubuntu/ hardy restricted main universe
deb http://archive.ubuntu.com/ubuntu/ hardy universe
deb http://archive.ubuntu.com/ubuntu/ hardy-updates universe
deb-src http://archive.ubuntu.com/ubuntu/ hardy-updates universe #Added by software-properties
deb http://security.ubuntu.com/ubuntu hardy-security main restricted
deb-src http://security.ubuntu.com/ubuntu hardy-security restricted main universe
deb http://security.ubuntu.com/ubuntu hardy-security universe 网管u家www.bitscn.net
然后按Ctrl+S保存文档,关掉这个窗口。
网管u家u.bitsCN.com
5、为什么我要设置这么多国外源? 网管有家www.bitscn.net
Ubuntu的项目是由世界各地的爱好者共同维护的,因此服务器端文件的更新很难做到同步。由于Ubuntu的主服务器在欧洲,项目小组在挪威国,而英 语是Ubuntu用户中使用最广的语言,因此最新的更新版本很快被发布到Ubuntu的欧洲主源和美国源。同时国内的Ubuntu更新源经常存在软件包缺 失的问题,因此小F推荐大家设置欧洲和美国的官方源。 网管有家www.bitscn.net
6、源越多速度越快吗?
网管u家u.bitsCN.com
很不幸,Ubuntu的软件管理程序没 有自动判断最快源的功能。因此无论你设置了多少源,Ubuntu只按照源列表的顺序,找到第一个提供相应软件包下载的源并连接下载。因此我们在设置的时候 让Ubuntu先自动找最快的源,然后把可能作为补充的源加在后面。相反地,设置的源过多,反而会降低更新 (apt-get update)的速度。 网管有家bitscn.net
附录:官方源列表中没有的常用软件源列表(可以自己试试哪个更快,但是不要去掉国外源)
网管下载dl.bitscn.com
|
1
|
评论加载中…