1. 程式人生 > >為 YUM 源配置優先順序

為 YUM 源配置優先順序

Ceph 的安裝包在 epel 中也有,但是比較舊,已經把 Ceph 的源加入 /etc/yum.repos.d, 但是 yum 安裝的時候,會選擇 epel 裡的 Ceph 軟體包,而有是選擇 Ceph 源裡的。

解決方法:使用 YUM 的 yum-plugin-priorities 外掛。

$ yum install yum-plugin-priorities

確認配置檔案內容

cat /etc/yum/pluginconf.d/priorities.conf

[main]

enabled = 1

在 /etc/yum.repos.d/ceph.repo 中的每個節點加入

priority=1

priority 越小表示優先順序越高