首頁 > Linux&FreeBSD > CentOS yum設定檔

CentOS yum設定檔

最近Lab網頁主機替換,我為它裝上了CentOS 5.2,發現鳥哥網站寫的直接在mirrorlist加入&cc=tw 的方法對於學術網路的安裝與更新來說,實在太慢了。

研究了一下,終於將它換成對應到義守大學檔案伺服器的mirror。如此,連線速度就可以快很多倍囉!

以下是我的設定檔(位於/etc/yum.repos.d/CentOS-Base.repo):

[base]
name=CentOS-$releasever – Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&cc=tw
baseurl=http://ftp.isu.edu.tw/pub/Linux/CentOS/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://ftp.isu.edu.tw/pub/Linux/CentOS/RPM-GPG-KEY-CentOS-5

#released updates
[updates]
name=CentOS-$releasever – Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&cc=tw
baseurl=http://ftp.isu.edu.tw/pub/Linux/CentOS/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://ftp.isu.edu.tw/pub/Linux/CentOS/RPM-GPG-KEY-CentOS-5

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever – Addons
baseurl=http://ftp.isu.edu.tw/pub/Linux/CentOS/$releasever/addons/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons&cc=tw
gpgcheck=1
gpgkey=http://ftp.isu.edu.tw/pub/Linux/CentOS/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful
[extras]
name=CentOS-$releasever – Extras
baseurl=http://ftp.isu.edu.tw/pub/Linux/CentOS/$releasever/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&cc=tw
gpgcheck=1
gpgkey=http://ftp.isu.edu.tw/pub/Linux/CentOS/RPM-GPG-KEY-CentOS-5

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever – Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&cc=tw
baseurl=http://ftp.isu.edu.tw/pub/Linux/CentOS/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://ftp.isu.edu.tw/pub/Linux/CentOS/RPM-GPG-KEY-CentOS-5

Note: 由於沒有設定mirrorlist,萬一義守的檔案伺服器掛掉,可能就不能更新了。Orz…

分類:Linux&FreeBSD 標籤:
  1. 十二月 23, 2010 at 4:56 下午

    http://ftp.cse.yzu.edu.tw/pub/CentOS
    元智大學也不錯用

    • allen501pc
      十二月 29, 2010 at 3:09 下午

      感謝分享!不過前一陣子似乎有掛點或是mirror移除的情況發生,所以後來我都使用isu的mirror。

  2. 高藥師
    三月 16, 2012 at 6:54 下午

    請問一下,現在路徑是否有更改呢?
    我用cnetos 5.7 也可以用嗎?

  3. 九月 4, 2014 at 1:16 下午

    Hi, i feel that i saw you visited my site thus i
    came to return the desire?.I am trying to in finding issues
    to improve my website!I suppose its good enough to make use of some
    of your ideas!!

  1. No trackbacks yet.

發表迴響

在下方填入你的資料或按右方圖示以社群網站登入:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 變更 )

Twitter picture

You are commenting using your Twitter account. Log Out / 變更 )

Facebook照片

You are commenting using your Facebook account. Log Out / 變更 )

Google+ photo

You are commenting using your Google+ account. Log Out / 變更 )

連結到 %s

%d 位部落客按了讚: