hnakamur’s blog

ものすごい勢いで忘れる私のために未整理でもいいからとりあえずメモ

2009-08-21

CentOSのyumレポジトリにrpmforgeを追加

yum-prioritiesを導入

AdditionalResources/Repositories/RPMForge - CentOS Wikiを参考にしました。

$ sudo yum install yum-priorities
$ sudo vi /etc/yum.repos.d/CentOS-Base.repo

変更内容

--- /etc/yum.repos.d/CentOS-Base.repo   2009/08/21 08:48:25     1.1
+++ /etc/yum.repos.d/CentOS-Base.repo   2009/08/21 08:56:14     1.3
@@ -17,6 +17,7 @@
 #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
 gpgcheck=1
 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
+priority=1

 #released updates
 [updates]
@@ -25,6 +26,7 @@
 #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
 gpgcheck=1
 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
+priority=1

 #packages used/produced in the build but not released
 [addons]
@@ -33,6 +35,7 @@
 #baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/
 gpgcheck=1
 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
+priority=1

 #additional packages that may be useful
 [extras]
@@ -41,6 +44,7 @@
 #baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
 gpgcheck=1
 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
+priority=1

 #additional packages that extend functionality of existing packages
 [centosplus]
@@ -50,6 +54,7 @@
 gpgcheck=1
 enabled=0
 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
+priority=2

 #contrib - packages by Centos Users
 [contrib]
@@ -59,3 +64,4 @@
 gpgcheck=1
 enabled=0
 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
+priority=2

rpmforgeのセットアップ

$ wget http://apt.sw.be/redhat/el5/en/i386/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
$ sudo rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
$ rpm -K rpmforge-release-0.3.6-1.el5.rf.i386.rpm 
$ sudo rpm -i rpmforge-release-0.3.6-1.el5.rf.i386.rpm
$ sudo vi /etc/yum.repos.d/rpmforge.repo

変更内容

--- /etc/yum.repos.d/rpmforge.repo      2009/08/21 09:08:58     1.1
+++ /etc/yum.repos.d/rpmforge.repo      2009/08/21 09:09:11
@@ -9,3 +9,4 @@
 protect = 0
 gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
 gpgcheck = 1
+priority = 11

設定の確認

$ sudo yum check-update

rpmforgeの行が出ればOK。

0 件のコメント:

ブログ アーカイブ