Ubuntu軟件源在線更新設(shè)計(jì)
Ubuntu軟件源還是比較常用的,于是我研究了一下Ubuntu軟件源 ,在這里拿出來和大家分享一下,希望對(duì)大家有用.對(duì)于Ubuntu軟件源的在線更新設(shè)計(jì),相信您一定覺得十分方便,因?yàn)檫@可以提高系統(tǒng)安裝的速度,并節(jié)省下載安裝CD/DVD的大量時(shí)間(目前的Linux 發(fā)行版安裝都需要多張CD或DVD,對(duì)于上網(wǎng)帶寬不足的用戶,這常會(huì)造成下載的困難)。
不知您是否想過,這些軟件到底存放在哪里?是否可以指定下載的位置?解決此類問題,就必須提及Ubuntu軟件源使用的“軟件源”(Software Repositories)。
在Ubuntu中所謂的“Ubuntu軟件源”,是指在世界上許多服務(wù)器上放置的軟件數(shù)據(jù)庫。就目前而言,軟件源中大概有17 000個(gè)不同的軟件包。由于Ubuntu軟件源是開放給所有的Ubuntu軟件源用戶進(jìn)行更新,所以只要在軟件源中定期上傳最新版本的軟件,便可確保所有用戶都用到最新發(fā)布的軟件包。
Ubuntu默認(rèn)軟件源
Ubuntu軟件源安裝時(shí),系統(tǒng)會(huì)根據(jù)選擇的時(shí)區(qū)來指定默認(rèn)的軟件源,以加快用戶下載更新時(shí)的速度。例如,在安裝時(shí),如果選擇的時(shí)區(qū)為上海,則系統(tǒng)就會(huì)指定使用中國(guó)的Ubuntu軟件源。
如果希望了解目前系統(tǒng)所用的Ubuntu軟件源列表,首先需要打開/etc/apt/sources.list文件。下面的范例是筆者目前的計(jì)算機(jī)設(shè)置,其中會(huì)列出不同用途的軟件源網(wǎng)址:
- ## Major bug fix updates produced after the final release of the
- ## distribution.
- deb http://cn.archive.ubuntu.com/ubuntu/ edgy-updates main restricted multiverse universe
- deb-src http://cn.archive.ubuntu.com/ubuntu/ edgy-updates main restricted multiverse universe #Added by software-properties
- ## Uncomment the following two lines to add software from the 'universe'
- ## repository.
- ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
- ## team, and may not be under a free licence. Please satisfy yourself as to
- ## your rights to use the software. Also, please note that software in
- ## universe WILL NOT receive any review or updates from the Ubuntu security
- ## team.
- # deb http://cn.archive.ubuntu.com/ubuntu/ edgy universe
- # deb-src http://cn.archive.ubuntu.com/ubuntu/ edgy universe
- ## Uncomment the following two lines to add software from the 'backports'
- ## repository.
- ## N.B. software from this repository may not have been tested as
- ## extensively as that contained in the main release, although it includes
- ## newer versions of some applications which may provide useful features.
- ## Also, please note that software in backports WILL NOT receive any review
- ## or updates from the Ubuntu security team.
- # deb http://cn.archive.ubuntu.com/ubuntu/ edgy-backports main restricted universe multiverse
- # deb-src http://cn.archive.ubuntu.com/ubuntu/ edgy-backports main restricted universe multiverse
- deb http://security.ubuntu.com/ubuntu edgy-security main restricted multiverse universe
- deb-src http://security.ubuntu.com/ubuntu edgy-security main restricted multiverse universe #Added by software-properties
- # deb http://security.ubuntu.com/ubuntu edgy-security universe
- # deb-src http://security.ubuntu.com/ubuntu edgy-security universe
- deb http://archive.canonical.com/ubuntu dapper-commercial main
- deb http://archive.ubuntu.org.cn/ubuntu-cn dapper main universe multiverse restricted
- deb http://ubuntu.cn99.com/ubuntu-cn/ dapper main restricted universe multiverse
- deb http://archive.ubuntu.com/ubuntu/ edgy-proposed universe main multiverse restricted
- deb-src http://archive.ubuntu.com/ubuntu/ edgy-proposed universe main multiverse restricted
- deb http://archive.ubuntu.com/ubuntu/ edgy-backports universe main multiverse restricted
- deb-src http://archive.ubuntu.com/ubuntu/ edgy-backports universe main multiverse restricted
- deb http://static.audacious-media-player.org/ubuntu dapper main
- deb-src http://static.audacious-media-player.org/ubuntu dapper main
更改Ubuntu軟件源
不過有時(shí)若遇到某些突發(fā)狀況,例如因?yàn)榈卣鸲鸬膰?guó)際電纜線斷裂,或到國(guó)外出差或旅行,此時(shí)如果仍嘗試連接默認(rèn)的軟件源,可能會(huì)引起軟件更新的失敗。
因此需視實(shí)際情況來更改Ubuntu軟件源的位置,當(dāng)然,可以直接編輯/etc/apt/sources.list文件的內(nèi)容,不過為了避免使用錯(cuò)誤的語法,以及不正確的軟件源地址,因此一般都建議使用圖形界面的軟件源設(shè)置程序——synaptic。
要打開synaptic程序,可以單擊“系統(tǒng)”/“系統(tǒng)管理”/“新立得軟件包管理器”選項(xiàng)。輸入密碼后,系統(tǒng)即會(huì)打開“新立得軟件包管理器”窗口。然后在出現(xiàn)的“新立得軟件包管理器”窗口上方,單擊“設(shè)置”/“軟件庫”選項(xiàng),系統(tǒng)會(huì)打開“軟件源”窗口。
除了可以從“下載自”下拉列表中選擇軟件源的位置外,也可以決定更新時(shí)包含的軟件包類型。此處可供選擇的軟件包類型如下:
- Universe:沒有官方維護(hù)的開源軟件
- Main:官方維護(hù)的開源軟件
- Mulitverse:非官方維護(hù)的非開源軟件(具有版權(quán)或限制使用)
- Restricted:官方維護(hù)的非開源軟件
- Source Code:源代碼
更改Internet更新屬性
如果希望更改Internet更新的軟件包屬性和頻率,首先需要單擊上方的“Internet更新”標(biāo)簽,然后再按照實(shí)際需求勾選適當(dāng)?shù)倪x項(xiàng)。
單擊“Internet更新”標(biāo)簽自行添加軟件源
若要增加Ubuntu軟件源的個(gè)數(shù),也可以使用手動(dòng)添加的方式。首先需要單擊上方的“第三方”標(biāo)簽,然后單擊左下方的“添加”按鈕,系統(tǒng)將彈出一個(gè)信息窗口,并要求輸入軟件源的位置。
【編輯推薦】