CentOSで利用可能なYUMリポジトリについて

Software Collections(SCLs)

SCLsセットアップ

リポジトリ名

デフォルト

GPGパス

所属パッケージ

centos-sclo-rh

有効

/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo

centos-release-scl-rh

centos-sclo-rh-testing

無効

署名無し

centos-release-scl-rh

centos-sclo-rh-source

無効

/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo

centos-release-scl-rh

centos-sclo-rh-debuginfo

無効

/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo

centos-release-scl-rh

centos-sclo-sclo

有効

/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo

centos-release-scl

centos-sclo-sclo-testing

無効

署名無し

centos-release-scl

centos-sclo-sclo-source

無効

/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo

centos-release-scl

centos-sclo-sclo-debuginfo

無効

/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo

centos-release-scl

CentOS7環境

yum -y install centos-release-scl

※centos-release-scl パッケージは centos-release-scl-rh パッケージを含んで(依存)います。

CentOS6環境

yum -y install centos-release-scl

※centos-release-scl パッケージは centos-release-scl-rh パッケージを含んで(依存)います。

CentOS5環境

未サポート。提供予定無し。

CentOS4環境

未サポート。提供はありえない。

SCLsインストール例

Perl 5.20

yum -y install rh-perl520

SCLs運用メモ

scl enable <パッケージ集名> [<パッケージ集名>...] "コマンド"

$ scl enable rh-perl520 "perl -v"

This is perl 5, version 20, subversion 1 (v5.20.1) built for x86_64-linux-thread-multi
(with 16 registered patches, see perl -V for more detail)

Copyright 1987-2014, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

$ scl enable rh-perl520 bash
※perl 5.20 への PATH が通った bash(子プロセス)が立ち上がる。

  :
source /opt/rh/パッケージ集名/enable
export X_SCLS="$(scl enable パッケージ集名 'echo $X_SCLS')" 
  :

SCLs参考文献

Extra Packages for Enterprise Linux(EPEL)

EPELセットアップ

リポジトリ名

デフォルト

GPGパス

所属パッケージ

epel

有効

/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL

epel-release

epel-debuginfo

無効

/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL

epel-release

epel-source

無効

/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL

epel-release

epel-testing

無効

/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL

epel-release

epel-testing-debuginfo

無効

/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL

epel-release

epel-testing-source

無効

/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL

epel-release

CentOS7環境

yum -y install epel-release

CentOS6環境

yum -y install epel-release

CentOS5環境

yum -y install epel-release

なお古いCentOS5ではRPMでインストールする手段について解説されていることもありますが、その場合下記の通り指定します。

rpm -Uvh http://dl.fedoraproject.org/pub/epel/epel-release-latest-5.noarch.rpm

dl.fedoraproject.org ではなく、EPELのFAQにあるような download.fedoraproject.org を指定した場合、いつの頃からか、下記のようなメッセージとともにエラーがでて、インストールに失敗するようになりました。

# rpm -Uvh http://download.fedoraproject.org/pub/epel/epel-release-latest-5.noarch.rpm
Retrieving http://download.fedoraproject.org/pub/epel/epel-release-latest-5.noarch.rpm
error: skipping http://download.fedoraproject.org/pub/epel/epel-release-latest-5.noarch.rpm - transfer failed - Unknown or unexpected error
warning: u 0x6930b90 ctrl 0x6931f20 nrefs != 0 (download.fedoraproject.org http)

これは、download.fedoraproject.org からの応答が、RPM自体を返すのではなく、ミラーサイトにリダイレクトしていることが原因となります。 この当時の rpm コマンドは、リダイレクト処理(ハンドリング)が行えなかったため、事前にダウンロードしておくなど、なんらかの手段で回避する必要がありました。 今時は yum install で入るので気にする必要はありません。

CentOS4環境

rpm -Uvh http://dl.fedoraproject.org/pub/epel/4/i386/epel-release-4-10.noarch.rpm
  ないしは
rpm -Uvh http://dl.fedoraproject.org/pub/epel/4/x86_64/epel-release-4-10.noarch.rpm

EPELインストール例

通常のCentOS標準パッケージと同じ扱いとなりますので、明示的にこれを入れるというパターンはありません。

EPEL参考文献