歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux服務器 >> Ubuntu 8.04 Hardy LTS 軟件源設置

Ubuntu 8.04 Hardy LTS 軟件源設置

日期:2017/3/2 16:44:49   编辑:Linux服務器

寫在前面:小F浏覽了很多國內外的網站,看了很多關於軟件源(Software Sources)設置的文章,發現有很多文章中對軟件源的設置存在誤解,為了讓新人能順利進入Ubuntu的大家庭,小F特地作此文,詳細地介紹下軟件源的設置。

1、軟件源(Software Sources)是什麼?

在Ubuntu中,軟件源是指一個由可以獲得軟件的地址組成的集合,這個地址可以是網站、光盤,或者是硬盤上的一個目錄。軟件源上有“軟件倉庫”,軟件 倉庫中存儲著各種各樣的軟件。當你需要用到一個軟件的時候,就可以通過工具(新立得synaptic 、 apt-get 或者 aptitude 等),自動地下載並自動地安裝。

2、軟件源(Software Sources)設置好了,我可以獲得哪些便利?

日常的軟件安裝或者更新都是采用從軟件源獲取軟件包的方式。設置好軟件源可以讓你及時獲取重要的安全更新,解決安全隱患;或者修復已知的問題,讓使用更順手。設置好軟件源同樣可以加快以上操作的速度,節約你寶貴的時間。

3、我是新手,我不會設置,有簡單的圖形化界面的設置方法嗎?

Ubuntu的系統(System)-系統管理(Administration)菜單裡提供了圖形化界面的軟件源設置(Software Sources)程序,不過小F提醒一下大家,只使用這個是不夠的!(具體設置方法請繼續往下看)

4、正確的設置方法!

在開始修改設置之前,先備份一下原來的設置。這一步看似多余,其實是一種很好的習慣,有利於配置錯誤時的恢復。備份方法是:按Alt+F2,然後輸入 gksu cp /etc/apt/sources.list /etc/apt/sources.list-backup。回車後輸入你的密碼。

然後打開設置程序:系統(System)-系統管理(Administration)-軟件源設置(Software Sources)。在第一個標簽頁上,單擊“下載自(Download From)”右邊的菜單,選擇“其他…(Others…)”。然後在彈出的窗口中單擊“選擇最佳服務器(Select Best Server)”。下面系統會自動ping官方服務器列表中的服務器,並選擇最快的!

再按Alt+F2打開“運行程序(Run Application)”,輸入 gksu gedit /etc/apt/sources.list。回車後如果有提示輸入密碼,輸入你的密碼。把光標調到文件的最後。

(1)電信用戶加入下面的內容:

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
(2)網通/教育網用戶加入下面的內容:

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
然後按Ctrl+S保存文檔,關掉這個窗口。

5、為什麼我要設置這麼多國外源?

Ubuntu的項目是由世界各地的愛好者共同維護的,因此服務器端文件的更新很難做到同步。由於Ubuntu的主服務器在歐洲,項目小組在挪威國,而英 語是Ubuntu用戶中使用最廣的語言,因此最新的更新版本很快被發布到Ubuntu的歐洲主源和美國源。同時國內的Ubuntu更新源經常存在軟件包缺 失的問題,因此小F推薦大家設置歐洲和美國的官方源。

6、源越多速度越快嗎?

很不幸,Ubuntu的軟件管理程序沒 有自動判斷最快源的功能。因此無論你設置了多少源,Ubuntu只按照源列表的順序,找到第一個提供相應軟件包下載的源並連接下載。因此我們在設置的時候 讓Ubuntu先自動找最快的源,然後把可能作為補充的源加在後面。相反地,設置的源過多,反而會降低更新 (apt-get update)的速度

Copyright © Linux教程網 All Rights Reserved