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

目次

  1. CentOSで利用可能なYUMリポジトリについて
  2. Software Collections(SCLs)
    1. SCLsセットアップ
      1. CentOS7環境
      2. CentOS6環境
      3. CentOS5環境
      4. CentOS4環境
    2. SCLsインストール例
      1. Perl 5.20
    3. SCLs運用メモ
    4. SCLs参考文献
  3. Extra Packages for Enterprise Linux(EPEL)
    1. EPELセットアップ
      1. CentOS7環境
      2. CentOS6環境
      3. CentOS5環境
      4. CentOS4環境
    2. EPELインストール例
    3. EPEL参考文献
  4. PostgreSQL Global Development Group(PGDG) - PostgreSQL Yum Repository
    1. PGDGセットアップ
      1. CentOS7環境
      2. CentOS6環境
      3. CentOS5環境
      4. CentOS4環境
    2. PGDGインストール例
    3. PostgreSQLライブラリのインストール
    4. PostgreSQLクライアントのインストール
    5. PostgreSQLサーバーのインストール
    6. PGDG参考文献
  5. MySQL Yum Repository のインストール
    1. MySQLセットアップ
      1. CentOS7環境
      2. CentOS6環境
      3. CentOS5環境
      4. CentOS4環境
      5. mysql56-community リポジトリのアクティベイト
      6. mysql55-community・mysql57-community リポジトリのアクティベイト
      7. アップデート(ライブラリ依存性の解消)
    2. MySQLクライアントのインストール方法
    3. MySQLライブラリのインストール方法
    4. MySQLサーバーのインストール方法
    5. 参考文献

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参考文献

PostgreSQL Global Development Group(PGDG) - PostgreSQL Yum Repository

PGDGセットアップ

リポジトリ名

デフォルト

GPGパス

所属パッケージ

pgdg95

有効

/etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-95

pgdg-centos95

pgdg95-source

無効

/etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-95

pgdg-centos95

pgdg94

有効

/etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-94

pgdg-centos94

pgdg94-source

無効

/etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-94

pgdg-centos94

pgdg90

有効

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

pgdg-redhat90

pgdg90-source

無効

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

pgdg-redhat90

CentOS7環境

アーキテクチャ

バージョン

セットアップコマンド

x86_64

9.6

rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-redhat96-9.6-1.noarch.rpm

9.5

rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-2.noarch.rpm

9.4

rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-2.noarch.rpm

9.3

rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.3/redhat/rhel-7-x86_64/pgdg-centos93-9.3-2.noarch.rpm

9.2

rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.2/redhat/rhel-7-x86_64/pgdg-centos92-9.2-2.noarch.rpm

9.1

-

9.0

-

8.4

-

8.3

-

8.2

-

8.1

-

8.0

-

7.4

-

7.3

-

※x86 アーキテクチャ分のバイナリは存在しません。

CentOS6環境

アーキテクチャ

バージョン

セットアップコマンド

x86_64

9.6

rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-6-x86_64/pgdg-redhat96-9.6-1.noarch.rpm

9.5

rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-6-x86_64/pgdg-centos95-9.5-2.noarch.rpm

9.4

rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.4/redhat/rhel-6-x86_64/pgdg-centos94-9.4-2.noarch.rpm

9.3

rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.3/redhat/rhel-6-x86_64/pgdg-centos93-9.3-2.noarch.rpm

9.2

rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.2/redhat/rhel-6-x86_64/pgdg-centos92-9.2-7.noarch.rpm

9.1

rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.1/redhat/rhel-6-x86_64/pgdg-centos91-9.1-6.noarch.rpm

9.0

rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.0/redhat/rhel-6-x86_64/pgdg-centos90-9.0-5.noarch.rpm

8.4

rpm -Uvh http://yum.postgresql.org/8.4/redhat/rhel-6-x86_64/pgdg-centos-8.4-3.noarch.rpm

8.3

-

8.2

-

8.1

-

8.0

-

7.4

-

7.3

-

アーキテクチャ

バージョン

セットアップコマンド

x86

9.6

-

9.5

rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-6-i386/pgdg-centos95-9.5-2.noarch.rpm

9.4

rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.4/redhat/rhel-6-i386/pgdg-centos94-9.4-2.noarch.rpm

9.3

rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.3/redhat/rhel-6-i386/pgdg-centos93-9.3-2.noarch.rpm

9.2

rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.2/redhat/rhel-6-i386/pgdg-centos92-9.2-7.noarch.rpm

9.1

rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.1/redhat/rhel-6-i386/pgdg-centos91-9.1-6.noarch.rpm

9.0

rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.0/redhat/rhel-6-i386/pgdg-centos90-9.0-5.noarch.rpm

8.4

rpm -Uvh http://yum.postgresql.org/8.4/redhat/rhel-6-i386/pgdg-centos-8.4-3.noarch.rpm

8.3

-

8.2

-

8.1

-

8.0

-

7.4

-

7.3

-

CentOS5環境

アーキテクチャ

バージョン

セットアップコマンド

x86_64

9.6

-

9.5

rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-5-x86_64/pgdg-centos95-9.5-2.noarch.rpm

9.4

rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.4/redhat/rhel-5-x86_64/pgdg-centos94-9.4-2.noarch.rpm

9.3

rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.3/redhat/rhel-5-x86_64/pgdg-centos93-9.3-2.noarch.rpm

9.2

rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.2/redhat/rhel-5-x86_64/pgdg-centos92-9.2-7.noarch.rpm

9.1

rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.1/redhat/rhel-5-x86_64/pgdg-centos91-9.1-6.noarch.rpm

9.0

rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.0/redhat/rhel-5-x86_64/pgdg-centos90-9.0-5.noarch.rpm

8.4

rpm -Uvh http://yum.postgresql.org/8.4/redhat/rhel-5-x86_64/pgdg-centos-8.4-3.noarch.rpm

8.3

rpm -Uvh http://yum.postgresql.org/8.3/redhat/rhel-5-x86_64/pgdg-centos-8.3-7.noarch.rpm

8.2

!http://yum.postgresql.org/8.2/redhat/rhel-5-x86_64/ (RPMが置いてあるだけ)

8.1

!http://yum.postgresql.org/8.1/redhat/rhel-5-x86_64/ (RPMが置いてあるだけ)

8.0

!http://yum.postgresql.org/8.0/redhat/rhel-5-x86_64/ (RPMが置いてあるだけ)

7.4

!http://yum.postgresql.org/7.4/redhat/rhel-5-x86_64/ (RPMが置いてあるだけ)

7.3

!http://yum.postgresql.org/7.3/redhat/rhel-5-x86_64/ (RPMが置いてあるだけ)

x86

9.6

-

9.5

rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-5-i386/pgdg-centos95-9.5-2.noarch.rpm

9.4

rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.4/redhat/rhel-5-i386/pgdg-centos94-9.4-2.noarch.rpm

9.3

rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.3/redhat/rhel-5-i386/pgdg-centos93-9.3-2.noarch.rpm

9.2

rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.2/redhat/rhel-5-i386/pgdg-centos92-9.2-7.noarch.rpm

9.1

rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.1/redhat/rhel-5-i386/pgdg-centos91-9.1-6.noarch.rpm

9.0

rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.0/redhat/rhel-5-i386/pgdg-centos90-9.0-5.noarch.rpm

8.4

rpm -Uvh http://yum.postgresql.org/8.4/redhat/rhel-5-i386/pgdg-centos-8.4-3.noarch.rpm

8.3

rpm -Uvh http://yum.postgresql.org/8.3/redhat/rhel-5-i386/pgdg-centos-8.3-7.noarch.rpm

8.2

!http://yum.postgresql.org/8.2/redhat/rhel-5-i386/ (RPMが置いてあるだけ)

8.1

!http://yum.postgresql.org/8.1/redhat/rhel-5-i386/ (RPMが置いてあるだけ)

8.0

!http://yum.postgresql.org/8.0/redhat/rhel-5-i386/ (RPMが置いてあるだけ)

7.4

!http://yum.postgresql.org/7.4/redhat/rhel-5-i386/ (RPMが置いてあるだけ)

7.3

!http://yum.postgresql.org/7.3/redhat/rhel-5-i386/ (RPMが置いてあるだけ)

CentOS4環境

アーキテクチャ

バージョン

セットアップコマンド

x86_64

9.6

-

9.5

-

9.4

-

9.3

-

9.2

-

9.1

-

9.0

-

8.4

-

8.3

rpm -Uvh http://yum.postgresql.org/8.3/redhat/rhel-4-x86_64/pgdg-centos-8.3-7.noarch.rpm

8.2

!http://yum.postgresql.org/8.2/redhat/rhel-4-x86_64/ (RPMが置いてあるだけ)

8.1

!http://yum.postgresql.org/8.1/redhat/rhel-4-x86_64/ (RPMが置いてあるだけ)

8.0

!http://yum.postgresql.org/8.0/redhat/rhel-4-x86_64/ (RPMが置いてあるだけ)

7.4

!http://yum.postgresql.org/7.4/redhat/rhel-4-x86_64/ (RPMが置いてあるだけ)

7.3

!http://yum.postgresql.org/7.3/redhat/rhel-4-x86_64/ (RPMが置いてあるだけ)

アーキテクチャ

バージョン

セットアップコマンド

x86

9.6

-

9.5

-

9.4

-

9.3

-

9.2

-

9.1

-

9.0

-

8.4

-

8.3

rpm -Uvh http://yum.postgresql.org/8.3/redhat/rhel-4-i386/pgdg-centos-8.3-7.noarch.rpm

8.2

!http://yum.postgresql.org/8.2/redhat/rhel-4-i386/ (RPMが置いてあるだけ)

8.1

!http://yum.postgresql.org/8.1/redhat/rhel-4-i386/ (RPMが置いてあるだけ)

8.0

!http://yum.postgresql.org/8.0/redhat/rhel-4-i386/ (RPMが置いてあるだけ)

7.4

!http://yum.postgresql.org/7.4/redhat/rhel-4-i386/ (RPMが置いてあるだけ)

7.3

!http://yum.postgresql.org/7.3/redhat/rhel-4-i386/ (RPMが置いてあるだけ)

PGDGインストール例

ここでは PostgreSQL 9.5 を例に解説する。 このパターン自体はCentOS6環境で PostgreSQL 9.0, 9.4 でも同じ手順であることを確認しています。 なおその後の起動方法等に若干の違い(カスタマイズ)が発生していることを確認しています。 詳細は別途、別ページにて。

PostgreSQLライブラリのインストール

yum -y install postgresql95-libs

CentOS標準の postgresql-libs パッケージと互換性(compat- 無しで)あります。 これはPostgreSQLライブラリが提供している、いわゆる libpq プロトコル・関数群の上位互換性が高いためです。

後は postgresql-libs に依存している他のパッケージの「依存厳密性」にもよりますが、 バージョン情報まで含めた依存が定義されているとどうしようもないですが、 たいていのパッケージでは postgresql95-libs に依存してくれます。

PostgreSQLクライアントのインストール

yum -y install postgresql95 postgresql95-contrib

PostgreSQLサーバーのインストール

yum -y install postgresql95-server postgresql95-contrib

postgresql95-server パッケージは postgresql95 パッケージを必要としますので、一緒にインストールされます。

PGDG参考文献

MySQL Yum Repository のインストール

MySQLセットアップ

リポジトリ名

デフォルト

GPGパス

所属パッケージ

mysql-connectors-community

有効

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

mysql-community-release

mysql-tools-community

有効

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

mysql-community-release

mysql55-community

無効

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

mysql-community-release

mysql56-community

有効

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

mysql-community-release

mysql57-community

無効

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

mysql-community-release

mysql-connectors-community-source

無効

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

mysql-community-release

mysql-tools-community-source

無効

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

mysql-community-release

mysql55-community-source

無効

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

mysql-community-release

mysql56-community-source

無効

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

mysql-community-release

mysql57-community-source

無効

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

mysql-community-release

CentOS7環境

rpm -Uvh http://repo.mysql.com/mysql-community-release-el7-7.noarch.rpm

CentOS6環境

rpm -Uvh http://repo.mysql.com/mysql-community-release-el6-7.noarch.rpm

CentOS5環境

rpm -Uvh http://repo.mysql.com/mysql-community-release-el5-7.noarch.rpm

CentOS4環境

未提供。提供無し。

mysql56-community リポジトリのアクティベイト

  :
[mysql55-community]
  :
enabled=0
  :

[mysql56-community]
  :
enabled=1
  :

[mysql57-community]
  :
enabled=0
  :

mysql55-community・mysql57-community リポジトリのアクティベイト

アップデート(ライブラリ依存性の解消)

# yum -y upgrade
  :
依存性の解決をしています
--> トランザクションの確認を実行しています。
---> Package mysql-community-libs.x86_64 0:5.6.28-2.el6 will be obsoleting
--> 依存性の処理をしています: mysql-community-common(x86-64) = 5.6.28-2.el6 のパッケージ: mysql-community-libs-5.6.28-2.el6.x86_64
---> Package mysql-community-libs-compat.x86_64 0:5.6.28-2.el6 will be obsoleting
---> Package mysql-libs.x86_64 0:5.1.73-5.el6_6 will be 不要
--> トランザクションの確認を実行しています。
---> Package mysql-community-common.x86_64 0:5.6.28-2.el6 will be インストール
--> 依存性解決を終了しました。

依存性を解決しました

==================================================================================================================
 パッケージ                                               アーキテクチャ   バージョン    リポジトリー        容量
==================================================================================================================
インストールしています:
 mysql-community-libs                                     x86_64           5.6.28-2.el6  mysql56-community  1.9 M
     置き換えています  mysql-libs.x86_64 5.1.73-5.el6_6
 mysql-community-libs-compat                              x86_64           5.6.28-2.el6  mysql56-community  1.6 M
     置き換えています  mysql-libs.x86_64 5.1.73-5.el6_6
依存性関連でのインストールをします。:
 mysql-community-common                                   x86_64           5.6.28-2.el6  mysql56-community  307 k

トランザクションの要約
==================================================================================================================
インストール         3 パッケージ

総ダウンロード容量: 3.8 M
パッケージをダウンロードしています:
(1/3): mysql-community-common-5.6.28-2.el6.x86_64.rpm                                                      | 307 kB  00:00
(2/3): mysql-community-libs-5.6.28-2.el6.x86_64.rpm                                                        | 1.9 MB  00:00
(3/3): mysql-community-libs-compat-5.6.28-2.el6.x86_64.rpm                                                 | 1.6 MB  00:00
----------------------------------------------------------------------------------------------------------------------------
合計                                                                                               29 MB/s | 3.8 MB  00:00
  :
  インストールしています  : mysql-community-common-5.6.28-2.el6.x86_64         1/4
  インストールしています  : mysql-community-libs-5.6.28-2.el6.x86_64           2/4
  インストールしています  : mysql-community-libs-compat-5.6.28-2.el6.x86_64    3/4
  削除中                  : mysql-libs-5.1.73-5.el6_6.x86_64                   4/4
  Verifying               : mysql-community-common-5.6.28-2.el6.x86_64         1/4
  Verifying               : mysql-community-libs-5.6.28-2.el6.x86_64           2/4
  Verifying               : mysql-community-libs-compat-5.6.28-2.el6.x86_64    3/4
  Verifying               : mysql-libs-5.1.73-5.el6_6.x86_64                   4/4

インストール:
  mysql-community-libs.x86_64 0:5.6.28-2.el6    mysql-community-libs-compat.x86_64 0:5.6.28-2.el6

依存性関連をインストールしました:
  mysql-community-common.x86_64 0:5.6.28-2.el6

置換:
  mysql-libs.x86_64 0:5.1.73-5.el6_6

完了しました!

# rpm -qf /usr/lib64/mysql/libmysqlclient.so.16
mysql-community-libs-compat-5.6.28-2.el6.x86_64

# rpm -qf /usr/lib64/mysql/libmysqlclient.so.18
mysql-community-libs-5.6.28-2.el6.x86_64

MySQLクライアントのインストール方法

yum -y install mysql-community-client

MySQLライブラリのインストール方法

MySQLサーバーのインストール方法

yum install mysql-community-server 

参考文献