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環境

未検証。たぶんCentOS6と同じ。

CentOS6環境

yum -y install centos-release-scl

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.

  :
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

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

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

dl.fedoraproject.org ではなく、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)

これは、Webサーバーからの応答が、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参考文献