linux  >  CentOS  >  RPMforge導入

RPMforge導入

CentOSのyumでRPMforgeリポジトリを使用できるように設定する

  1. 作業ディレクトリを変更する(今回「 /usr/local/src/ 」で作業。一次作業ディレクトリの為「 /tmp 」でも何でも良い)
    # cd /usr/local/src/
    
  2. RPMforgeのrpmパッケージをダウンロード・インストール

    ※CentOS 5.x 32bit版の場合

    # wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
    # rpm -ivh rpmforge-release-0.5.2-2.el5.rf.i386.rpm
    ※CentOS 5.x 64bit版の場合
    # wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
    # rpm -ivh rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
    ※CentOS 6.x 32bit版の場合
    # wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
    # rpm -ivh rpmforge-release-0.5.2-2.el6.rf.i686.rpm
    ※CentOS 6.x 64bit版の場合
    # wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
    # rpm -ivh rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
    ※ここ以下はCentOS5.xの記述ですが、CentOS6.xも適宜に置き換えればいけるはずです。
  3. yumで普段RPMforgeを使わないように無効化する
    ※使いたいときは有効にする場合は --enablerepo=rpmforge というオプションを付ける

    # vi /etc/yum.repos.d/rpmforge.repo
    ### Name: RPMforge RPM Repository for Red Hat Enterprise 5 - dag
    ### URL: http://rpmforge.net/
    [rpmforge]
    name = Red Hat Enterprise $releasever - RPMforge.net - dag
    baseurl = http://apt.sw.be/redhat/el5/en/$basearch/rpmforge
    mirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge
    #mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge
    #enabled = 1
    enabled = 0
    protect = 0
    gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
    gpgcheck = 1
  4. yumのpriorityプラグインをインストールする
    # yum -y install yum-priorities
    
  5. yumのpriorityプラグインの設定を確認する
    # cat /etc/yum/pluginconf.d/priorities.conf
    [main]
    enabled = 1    ←enabledの値が1でない場合は1(有効)に設定する
  6. CentOS-Baseリポジトリの優先度を最優先にする

    優先度は1~99の間で設定(リンク先は原文説明)。数値が低いほうが優先度が高い。
    Baseは最優先(1)に設定し、3rd Partyは優先度を低くする。

    # vi /etc/yum.repos.d/CentOS-Base.repo
    # CentOS-Base.repo
    #
    # The mirror system uses the connecting IP address of the client and the
    # update status of each mirror to pick mirrors that are updated to and
    # geographically close to the client.  You should use this for CentOS updates
    # unless you are manually picking other mirrors.
    #
    # If the mirrorlist= does not work for you, as a fall back you can try the 
    # remarked out baseurl= line instead.
    #
    #
    
    [base]
    name=CentOS-$releasever - Base
    mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
    #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]
    name=CentOS-$releasever - Updates
    mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
    #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]
    name=CentOS-$releasever - Addons
    mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
    #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]
    name=CentOS-$releasever - Extras
    mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
    #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]
    name=CentOS-$releasever - Plus
    mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
    #baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
    gpgcheck=1
    enabled=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
    priority=1
    
    #contrib - packages by Centos Users
    [contrib]
    name=CentOS-$releasever - Contrib
    mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
    #baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
    gpgcheck=1
    enabled=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
    priority=1

以上の設定で、CentOSでRPMforgeが使えるようになります。

前
tcpdumpによるパケットキャプチャ
カテゴリートップ
CentOS
次
aliasのススメ