1. 程式人生 > >Linux7.4 yum更新源優先級設置

Linux7.4 yum更新源優先級設置

add rpm rep repos ins for oot pre nbsp

1.安裝 yum-priorities

  yum install yum-priorities

2.priorities的配置文件是/etc/yum/pluginconf.d/priorities.conf,確認其是否存在。內容為:

[root@chy002 yum.repos.d]# cat !$
cat /etc/yum/pluginconf.d/priorities.conf
[main]
enabled = 1

3.編輯 /etc/yum.repos.d/目錄下的*.repo 文件來設置優先級。參數為:

  priority=N # N的值為1-99,數字越大,優先級越低

  推薦的設置為:
  [base], [addons], [updates], [extras] … priority=1

  [centosplus],[contrib] … priority=2
  Third Party Repos such as rpmforge … priority=N (where N is > 10 and based on your preference)


Linux7.4 yum更新源優先級設置