感谢支持
我们一直在努力

关于Ubuntu源知识

  设置好网络为Ubuntu的软件更新与安装铺设好道路,但要想安装和更新,还必须要找到软件和安全更新的来源的位置,在Ubuntu(Deb)中这些来源全被集中到了一些服务器中,这些服务器地址被称之为“源”!Ubuntu作为全世界通用的操作系统,其安装源广泛的分布在全球各地,选择适合自己的源,对于更新您系统的速度影响是极大的。

  所以在应用更新和安装软件以前请设置好你的“源”配置文件,这个文件的位置是:[/etc/apt/sources.list]在打开它的时候,请确认你是用[sudo]打开的,如[sudo nano /etc/sources.list]一般用户没有写它的权力的,你可以用 [ls /etc/apt/sources.list]看看它的权限设置。

  耍构建“源”的方式很多,推荐用viki.ubuntu.org.cn中的源址,拷贝其中的适合你的源地址,放到[sources.list]并保存好,当然官网[http://www.ubuntu-nl.org/source-o-matic/]提供了在线生成源的办法,不过,我不觉得比viki.ubuntu.org.cn中的实用,并且网上也能搜索到适合你的“源”地址。我认为作为中国的居民,在设置源的时候请先确认你用的宽带类型,因为电信和网通就势如水火,如果你是电信的用上了网通的源,嘿嘿。当然,大家不像我这么笨了,当然不会用错的。我是电信的,所以我用了CN99并附加台湾的“源”,源文件设置如下:
[#Ubuntu.cn99.com更新服务器(江苏省常州市电信,推荐电信用户使用):
deb http://ubuntu.cn99.com/ubuntu/ gutsy main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ gutsy-security main restricted universe mu$
deb http://ubuntu.cn99.com/ubuntu/ gutsy-updates main restricted universe mul$
deb http://ubuntu.cn99.com/ubuntu/ gutsy-proposed main restricted universe mu$
deb http://ubuntu.cn99.com/ubuntu/ gutsy-backports main restricted universe m$
deb-src http://ubuntu.cn99.com/ubuntu/ gutsy main restricted universe multive$
deb-src http://ubuntu.cn99.com/ubuntu/ gutsy-security main restricted univers$
deb-src http://ubuntu.cn99.com/ubuntu/ gutsy-updates main restricted universe$
deb-src http://ubuntu.cn99.com/ubuntu/ gutsy-proposed main restricted univers$
deb-src http://ubuntu.cn99.com/ubuntu/ gutsy-backports main restricted univer$
deb http://ubuntu.cn99.com/ubuntu-cn/ gutsy main restricted universe multiver$

#台湾的官方源速度也相当不错,有时甚至快于内地的:
deb http://tw.archive.Ubuntu.com/ubuntu gutsy main restricted universe multiv$
deb http://tw.archive.ubuntu.com/ubuntu gutsy-security main restricted univer$
deb http://tw.archive.ubuntu.com/ubuntu gutsy-updates main restricted univers$
deb http://tw.archive.ubuntu.com/ubuntu gutsy-backports main restricted unive$
deb http://tw.archive.ubuntu.com/ubuntu gutsy-proposed main restricted univer$
deb-src http://tw.archive.ubuntu.com/ubuntu gutsy main restricted universe mu$
deb-src http://tw.archive.ubuntu.com/ubuntu gutsy-security main restricted un$
deb-src http://tw.archive.ubuntu.com/ubuntu gutsy-updates main restricted uni$
deb-src http://tw.archive.ubuntu.com/ubuntu gutsy-backports main restricted u$
deb-src http://tw.archive.ubuntu.com/ubuntu gutsy-proposed main restricted un$


#Ubuntu-cn,推荐各位中文用户添加:
deb http://archive.ubuntu.org.cn/ubuntu-cn/ gutsy main restricted universe mu$
]

  设置好“源”配置文件后必须使用命令[sudo apt-get update]更新设置好的源并等待其完成。
*********************************
xslu@xs:~$ sudo nano /etc/apt/sources.list
.
.
.
xslu@xs:~$ sudo apt-get update
[sudo] password for xslu:
忽略 http://archive.ubuntu.org.cn gutsy Release.gpg
.
.
.
命中 http://tw.archive.ubuntu.com gutsy-proposed/multiverse Sources
下载 101kB,耗时 1m44s (961B/s)
正在读取软件包列表… 完成
xslu@xs:~$
*********************************

出现这些内容时,你就可以用新立得,安全更新,或者sudo apt-get install等等之类的方式进行安全更新和软件安装了。不过,请注意所有的安装方式只能有一种当前运行,因为安装数据库是独占的。

赞(0) 打赏
转载请注明出处:服务器评测 » 关于Ubuntu源知识
分享到: 更多 (0)

听说打赏我的人,都进福布斯排行榜啦!

支付宝扫一扫打赏

微信扫一扫打赏