yumコマンドでdisable中のリポリトリを対象にする方法 †追加したリポジトリファイルをenabled=0しdisable中になっているリポジトリをyumコマンドのオプションで対象にする方法を以下に記します。 関連記事 †
enabled=0のリポジトリをyumコマンドの対象にする †以下のcatコマンドによる出力はEPELリポジトリの設定ファイルになります。 [root@centos ~]# cat /etc/yum.repos.d/epel.repo [epel] name=Extra Packages for Enterprise Linux 5 - $basearch #baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch failovermethod=priority enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL <snip> enablerepo実行例 †enabled=0で.repoファイルのenabledを修正せずyumコマンドの対象にするには以下のようにyumコマンドを使用します。 yum オプション --enablerepo=リポジトリ名 以下の実行例では、アップデート対象があるかを調べるcheck-updateオプションに--enablerepoオプションを使いepelを指定してます。 [root@centos ~]# yum check-update --enablerepo=epel Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile * base: ftp.iij.ad.jp * epel: ftp.iij.ad.jp * extras: ftp.iij.ad.jp * updates: ftp.iij.ad.jp epel | 3.7 kB 00:00 epel/primary_db | 3.8 MB 00:05 Skipping security plugin, no data [root@centos ~]# |