Ubuntu软件源在线更新设计
创始人
2024-06-22 21:01:13
0次

Ubuntu软件源还是比较常用的,于是我研究了一下Ubuntu软件源 ,在这里拿出来和大家分享一下,希望对大家有用.对于Ubuntu软件源的在线更新设计,相信您一定觉得十分方便,因为这可以提高系统安装的速度,并节省下载安装CD/DVD的大量时间(目前的Linux 发行版安装都需要多张CD或DVD,对于上网带宽不足的用户,这常会造成下载的困难)。

不知您是否想过,这些软件到底存放在哪里?是否可以指定下载的位置?解决此类问题,就必须提及Ubuntu软件源使用的“软件源”(Software Repositories)。

在Ubuntu中所谓的“Ubuntu软件源”,是指在世界上许多服务器上放置的软件数据库。就目前而言,软件源中大概有17 000个不同的软件包。由于Ubuntu软件源是开放给所有的Ubuntu软件源用户进行更新,所以只要在软件源中定期上传最新版本的软件,便可确保所有用户都用到最新发布的软件包。

Ubuntu默认软件源

Ubuntu软件源安装时,系统会根据选择的时区来指定默认的软件源,以加快用户下载更新时的速度。例如,在安装时,如果选择的时区为上海,则系统就会指定使用中国的Ubuntu软件源。

如果希望了解目前系统所用的Ubuntu软件源列表,首先需要打开/etc/apt/sources.list文件。下面的范例是笔者目前的计算机设置,其中会列出不同用途的软件源网址:

  1. ## Major bug fix updates produced after the final release of the  
  2. ## distribution.  
  3. deb http://cn.archive.ubuntu.com/ubuntu/ edgy-updates main restricted multiverse universe  
  4. deb-src http://cn.archive.ubuntu.com/ubuntu/ edgy-updates main restricted multiverse universe #Added by software-properties  
  5. ## Uncomment the following two lines to add software from the 'universe'  
  6. ## repository.  
  7. ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu  
  8. ## team, and may not be under a free licence. Please satisfy yourself as to  
  9. ## your rights to use the software. Also, please note that software in  
  10. ## universe WILL NOT receive any review or updates from the Ubuntu security  
  11. ## team.  
  12. # deb http://cn.archive.ubuntu.com/ubuntu/ edgy universe  
  13. # deb-src http://cn.archive.ubuntu.com/ubuntu/ edgy universe  
  14. ## Uncomment the following two lines to add software from the 'backports'  
  15. ## repository.  
  16. ## N.B. software from this repository may not have been tested as  
  17. ## extensively as that contained in the main release, although it includes  
  18. ## newer versions of some applications which may provide useful features.  
  19. ## Also, please note that software in backports WILL NOT receive any review  
  20. ## or updates from the Ubuntu security team.  
  21. # deb http://cn.archive.ubuntu.com/ubuntu/ edgy-backports main restricted universe multiverse  
  22. # deb-src http://cn.archive.ubuntu.com/ubuntu/ edgy-backports main restricted universe multiverse  
  23. deb http://security.ubuntu.com/ubuntu edgy-security main restricted multiverse universe  
  24. deb-src http://security.ubuntu.com/ubuntu edgy-security main restricted multiverse universe #Added by software-properties  
  25. # deb http://security.ubuntu.com/ubuntu edgy-security universe  
  26. # deb-src http://security.ubuntu.com/ubuntu edgy-security universe  
  27. deb http://archive.canonical.com/ubuntu dapper-commercial main  
  28. deb http://archive.ubuntu.org.cn/ubuntu-cn dapper main universe multiverse restricted  
  29. deb http://ubuntu.cn99.com/ubuntu-cn/ dapper main restricted universe multiverse  
  30. deb http://archive.ubuntu.com/ubuntu/ edgy-proposed universe main multiverse restricted  
  31. deb-src http://archive.ubuntu.com/ubuntu/ edgy-proposed universe main multiverse restricted  
  32. deb http://archive.ubuntu.com/ubuntu/ edgy-backports universe main multiverse restricted  
  33. deb-src http://archive.ubuntu.com/ubuntu/ edgy-backports universe main multiverse restricted  
  34. deb http://static.audacious-media-player.org/ubuntu dapper main  
  35. deb-src http://static.audacious-media-player.org/ubuntu dapper main 

更改Ubuntu软件源

不过有时若遇到某些突发状况,例如因为地震而引起的国际电缆线断裂,或到国外出差或旅行,此时如果仍尝试连接默认的软件源,可能会引起软件更新的失败。

因此需视实际情况来更改Ubuntu软件源的位置,当然,可以直接编辑/etc/apt/sources.list文件的内容,不过为了避免使用错误的语法,以及不正确的软件源地址,因此一般都建议使用图形界面的软件源设置程序——synaptic。

要打开synaptic程序,可以单击“系统”/“系统管理”/“新立得软件包管理器”选项。输入密码后,系统即会打开“新立得软件包管理器”窗口。然后在出现的“新立得软件包管理器”窗口上方,单击“设置”/“软件库”选项,系统会打开“软件源”窗口。

除了可以从“下载自”下拉列表中选择软件源的位置外,也可以决定更新时包含的软件包类型。此处可供选择的软件包类型如下:

  1. Universe:没有官方维护的开源软件  
  2. Main:官方维护的开源软件  
  3. Mulitverse:非官方维护的非开源软件(具有版权或限制使用)  
  4. Restricted:官方维护的非开源软件  
  5. Source Code:源代码 

更改Internet更新属性

如果希望更改Internet更新的软件包属性和频率,首先需要单击上方的“Internet更新”标签,然后再按照实际需求勾选适当的选项。

单击“Internet更新”标签自行添加软件源

若要增加Ubuntu软件源的个数,也可以使用手动添加的方式。首先需要单击上方的“第三方”标签,然后单击左下方的“添加”按钮,系统将弹出一个信息窗口,并要求输入软件源的位置。

【编辑推荐】

  1. Ubuntu软件源更新设计
  2. Ubuntu Linux里面娱乐安装非常简单
  3. Ubuntu GRUB密码设置可分为全局密码和菜单密码
  4. Ubuntu安装配置Tomcat的端口及解压tomcat
  5. Ubuntu apache2重启命令与主机配置文件

相关内容

热门资讯

PHP新手之PHP入门 PHP是一种易于学习和使用的服务器端脚本语言。只需要很少的编程知识你就能使用PHP建立一个真正交互的...
网络中立的未来 网络中立性是什... 《牛津词典》中对“网络中立”的解释是“电信运营商应秉持的一种原则,即不考虑来源地提供所有内容和应用的...
各种千兆交换机的数据接口类型详... 千兆交换机有很多值得学习的地方,这里我们主要介绍各种千兆交换机的数据接口类型,作为局域网的主要连接设...
粉嫩如何诠释霸道 东芝M805... “霸道粉”是个什么玩意东芝M805拿过来的时候,笔者扑哧笑了,不是笑这款笔记本,而是笑这款产品的颜色...
如何利用交换机和端口设置来管理... 在网络管理中,总是有些人让管理员头疼。下面我们就将介绍一下一个网管员利用交换机以及端口设置等来进行D...
什么是大数据安全 什么是大数据... 在《为什么需要大数据安全分析》一文中,我们已经阐述了一个重要观点,即:安全要素信息呈现出大数据的特征...
只需三步,让你掌握阿尔法路由器... 请参照以下阿尔法路由器设置方法,通过浏览器进入及设置宽带路由器。经过这三个步骤的设置,基本上能够熟悉...
如何更省钱? 近期特价热门硒鼓... 如今激光打印设备已经成为商务或企业的绝对主力办公设备,但采购者往往忽视了激光打印设备所用的耗材,相对...
全面诠释网络负载均衡 负载均衡的出现大大缓解了服务器的压力,更是有效的利用了资源,提高了效率。那么我们现在来说一下网络负载...
如何允许远程连接到MySQL数... [[277004]]【51CTO.com快译】默认情况下,MySQL服务器仅侦听来自localhos...