對這文章發表回應
發表限制: 非會員 可以發表
發表者: 冷日 發表時間: 2011/11/21 6:28:40
基於某些因素,冷日整理了一下目前手邊CentOS的yum。
除了前面提到的remi和rpmforge以外,還順便增加了一個RubyWorks。
因為yum的設定檔(/etc/yum.conf)最後就有寫到:
所以呢,為了以後方便,乾脆就把rpmforge、remi、RubyWorks、epel都放在/etc/yum.repos.d資料夾裡。
然後,進去修改這些repo檔,把他們的『enabled』改成有效。
這樣以後若要更新任何rpm套件就不需要在那邊麻煩的下「–enablerepo=xxx」了!
所以冷日現在的/etc/yum.repos.d夾有:
使用yum時(不管search、install、update皆可)時,就會自動去這些地方找最新的版本囉。
除了前面提到的remi和rpmforge以外,還順便增加了一個RubyWorks。
因為yum的設定檔(/etc/yum.conf)最後就有寫到:
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
所以呢,為了以後方便,乾脆就把rpmforge、remi、RubyWorks、epel都放在/etc/yum.repos.d資料夾裡。
然後,進去修改這些repo檔,把他們的『enabled』改成有效。
enabled = 1
這樣以後若要更新任何rpm套件就不需要在那邊麻煩的下「–enablerepo=xxx」了!
所以冷日現在的/etc/yum.repos.d夾有:
# ls -lasp /etc/yum.repos.d/
8 drwxr-xr-x 2 root root 4096 11月 21 20:06 ./
16 drwxr-xr-x 109 root root 12288 11月 21 20:07 ../
4 -rw-r--r-- 1 root root 2245 4月 26 2010 CentOS-Base.repo
4 -rw-r--r-- 1 root root 626 4月 26 2010 CentOS-Media.repo
4 -rw-r--r-- 1 root root 954 8月 12 2010 epel.repo
4 -rw-r--r-- 1 root root 1054 8月 12 2010 epel-testing.repo
4 -rw-r--r-- 1 root root 739 11月 13 2010 mirrors-rpmforge
4 -rw-r--r-- 1 root root 717 11月 13 2010 mirrors-rpmforge-extras
4 -rw-r--r-- 1 root root 728 11月 13 2010 mirrors-rpmforge-testing
4 -rw-r--r-- 1 root root 633 11月 21 20:05 remi.repo
4 -rw-r--r-- 1 root root 1113 11月 13 2010 rpmforge.repo
4 -rw-r--r-- 1 root root 269 3月 14 2008 RubyWorks.repo
使用yum時(不管search、install、update皆可)時,就會自動去這些地方找最新的版本囉。
# yum search rubygems
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror01.idc.hinet.net
* epel: mirror01.idc.hinet.net
* extras: mirror01.idc.hinet.net
* remi: remi-mirror.dedipower.com
* rpmforge: apt.sw.be
* updates: mirror01.idc.hinet.net