LoginSignup
13
13

More than 5 years have passed since last update.

外部yumリポジトリの利用

Last updated at Posted at 2014-07-07

外部yumリポジトリの利用

CentOSであらかじめ登録されているyumリポジトリ(base,update)は、

  • 提供パッケージのバージョンが古い
  • 欲しいパッケージが未登録

であることがが多い.
おそらく安定性を重視しているからでしょう.

でもとにかく最新のパッケージを使いたい場合もある.

そのような場合のために、外部yumリポジトリを予め追加しておくとよい.
個人的には以下リポジトリ追加している.

  • epel
  • remi
  • rpmforge

但し、rpmforgeはパッケージ間の依存関係でバージョン不整合がちょいちょい発生するので、通常は無効にして、rpmforgeにだけ登録されたパッケージのインストールにだけ利用している.

epel,remi,rpmforgeリポジトリの導入

CentOS6.xの場合の以下の実行でepel,remi,rpmforgeリポジトリを導入できる.

64bitsの場合

$> rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
$> rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
$> rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm

32bits場合

$> rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
$> rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
$> rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.i686.rpm

updateのデフォルト設定

各リポジトリに対してyum update時にデフォルト有効にするか否かの指定が可能である.

設定を行う前にyum-utilsのインストールが必要.

$> yum install yum-utils

epel,remiをデフォルト有効,rpmforgeを無効とする例.

$> yum-config-manager --enable epel
$> yum-config-manager --enable remi
$> yum-config-manager --disable rpmforge

--enableを指定したリポジトリはyum update コマンドでデフォルト有効となる.
--disableを指定したリポジトリはyum update コマンドでデフォルト無効となるが、--enablerepo=rpmforgeのように--enablerepoオプションをつければ有効にできる.

yum-config-managerを利用しなくても、/etc/yum.repos.d/*.repoのenabledを0 or 1に直接書き換えで設定も可能.

13
13
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
13