MySQLとpostgresqlでのレプリケーション動作検証時使用perlスクリプト


MySQLのレプリケーション機能を使うとどのような動きをするのかを確認中。

テストデータのインサートと確認を行うためのスクリプトを作成した。

標準で用意されているデータベース「test」内にテーブル「testtable」を作成して、そこにデータを投入することにした。

# mysql -u root
mysql> use test;
mysql> create table testtable (
	id int(20) not null auto_increment,
	name char(100) default '' not null,
	text char(255) default '',
	primary key (id)
);
mysql> grant all on test.* to テストユーザ名@ホスト名 identified by 'パスワード';
mysql>

スクリプトはperl。
perl-DBD-MySQLパッケージをインストールしておくこと。

#!/usr/bin/perl

use DBI;

my $mysqluser="MySQL内のユーザ名";
my $mysqlpassword="パスワード";
my $masterserver="マスタサーバ名";
my $slaveserver="スレーブサーバ名";
my $dbname="test";
my $tablename="testtable";
$max=5;

sub getselect{
	my($server,$user,$password,$dbname,$tablename)=@_;
	my $db=DBI->connect("DBI:mysql:$dbname:$server",$user,$password);
	my $sth=$db->prepare("select id,name,text from $tablename order by id desc");
	$sth->execute;
	print "\tname\ttext\n";
	my $count=$max;
	for(my $i=0; $i<$sth->rows; $i++){
		my @tmp=$sth->fetchrow_array;
		if($count>0){
			print $tmp[0] ."\t". $tmp[1] ."\t". $tmp[2] ."\n";
			$count--;
		}
	}
	$sth->finish;
	$db->disconnect;
}

sub insertvalue{
	my($server,$user,$password,$dbname,$tablename)=@_;
	my $db=DBI->connect("DBI:mysql:$dbname:$server",$user,$password);
	my $str1=substr("00".rand(100),-3);
	my $str2=localtime();
	my $sth=$db->prepare("insert into $tablename values (NULL,'name$str1','$str2')");
	$sth->execute;
	$sth->finish;
	$db->disconnect;
}

if($ARGV[0] =~ /ins/){
	print "=== insert ===\n";
	insertvalue($masterserver,$mysqluser,$mysqlpassword,$dbname,$tablename);
}

print "=== master:$masterserver ===\n";
getselect($masterserver,$mysqluser,$mysqlpassword,$dbname,$tablename);

print "=== slave:$slaveserver ===\n";
getselect($slaveserver,$mysqluser,$mysqlpassword,$dbname,$tablename);

使い方
情報確認のみ「mysqltest.pl」
データ追加と情報確認「mysqltest.pl ins」

オプションとして「ins」(insert)を指定すると、データを追加する、というもの。

実行すると以下の様な形となる。

# mysqltest.pl ins
=== insert ===
=== マスタサーバ ===
name    text
248     name284 Fri Jun 20 11:42:01 2014
247     name563 Fri Jun 20 11:35:01 2014
246     name934 Fri Jun 20 11:28:01 2014
245     name769 Fri Jun 20 11:21:01 2014
244     name227 Fri Jun 20 11:14:01 2014
=== スレーブサーバ ===
name    text
248     name284 Fri Jun 20 11:42:01 2014
247     name563 Fri Jun 20 11:35:01 2014
246     name934 Fri Jun 20 11:28:01 2014
245     name769 Fri Jun 20 11:21:01 2014
244     name227 Fri Jun 20 11:14:01 2014
#

「単純増加する数字 name+ランダム数字 日付」という出力内容のうち、最新の5件のみ表示する、というものになっている。

マスタサーバの出力内容と、スレーブサーバの出力内容を比べる、というもの。


2021/05/19

postgresql環境でのバックアップ試験のためにこのスクリプトを流用しようとしたところ、作り直しが必要なポイントがあった。

まずはテーブル作成時の違い

create table testtable (
	id int(20) not null auto_increment,
	name char(100) default '' not null,
	text char(255) default '',
	primary key (id) 
);

これをそのまま実行すると下記エラーになる

ERROR:  syntax error at or near "("
LINE 2: id int(20) not null auto_increment,

int型auto_increment属性というのはMySQL特有で、postgresqlではserial型で置き換える。
「int(20) auto_increment」→「serial」に変更すると、以下のようになる。

create table testtable (
	id serial not null,
	name char(100) default '' not null,
	text char(255) default '',
	primary key (id) 
);

また、perlモジュールは DBD:mysqlではなくDBD:Pgに変更になり、データベースとホスト指定手法が変わった。

パッケージとしては perl-DBD-Pg をインストールする。

#!/usr/bin/perl

use DBI;

my $mysqluser="postgresql内のユーザ名";
my $mysqlpassword="パスワード";
my $masterserver="マスタサーバ名";
my $slaveserver="スレーブサーバ名";
my $dbname="test";
my $tablename="testtable";
$max=5;

sub getselect{
        my($server,$user,$password,$dbname,$tablename)=@_;
        my $db=DBI->connect("DBI:Pg:dbname=$dbname;host=$server",$user,$password);
        my $sth=$db->prepare("select id,name,text from $tablename order by id desc");
        $sth->execute;
        print "\tname\ttext\n";
        my $count=$max;
        for(my $i=0; $i<$sth->rows; $i++){
                my @tmp=$sth->fetchrow_array;
                if($count>0){
                        print $tmp[0] ."\t". $tmp[1] ."\t". $tmp[2] ."\n";
                        $count--;
                }
        }
        $sth->finish;
        $db->disconnect;
}

sub insertvalue{
        my($server,$user,$password,$dbname,$tablename)=@_;
        my $db=DBI->connect("DBI:Pg:dbname=$dbname;host=$server",$user,$password);
        my $str1=substr("00".rand(100),-3);
        my $str2=localtime();
        my $sth=$db->prepare("insert into $tablename (name, text) values ('name$str1','$str2')");
        $sth->execute;
        $sth->finish;
        $db->disconnect;
}

if($ARGV[0] =~ /ins/){
        print "=== insert ===\n";
        insertvalue($masterserver,$mysqluser,$mysqlpassword,$dbname,$tablename);
}

print "=== postgresql:$masterserver ===\n";
getselect($masterserver,$mysqluser,$mysqlpassword,$dbname,$tablename);

print "=== slave:$slaveserver ===\n";
getselect($slaveserver,$mysqluser,$mysqlpassword,$dbname,$tablename);

CentOS5でFedora20やRHEL6のrpmがrpm2cpioで展開できない



CentOS5環境で、Fedora20のRPMファイルを展開しようとした。

# wget http://archives.fedoraproject.org/pub/fedora/linux/updates/20/i386/nss-3.16.1-1.fc20.i686.rpm
# rpm2cpio nss-3.16.1-1.fc20.i686.rpm |cpio -ivd
cpio: warning: skipped 6151 bytes of junk
cpio: warning: archive header has reverse byte-order
cpio: g イaォ7・
             z,a1m俿イフJcレ[}\&・dDDシFンWロ [&;Y(・・クJ.疱:: unknown file type
cpio: premature end of file
#

エラー・・・

調べてみると、この展開の問題はRHEL5での問題らしい。
Bug 602423 – rpm2cpio fails on rhel-6 rpms
Bug 837945 – Can’t extract rpms from RHEL6 on RHEL5

Bug 602423の方に、この問題に対処するための、rpm2cpio.shというのがアップロードされている。(patched parmezan, works for me on rhel5 (1.48 KB, application/x-sh) というやつ)

このrpm2cpio.shを使ってみると、期待通りの動作をした。

# ./rpm2cpio.sh nss-3.16.1-1.fc20.i686.rpm|cpio -ivd
./etc/pki/nssdb
./etc/pki/nssdb/cert8.db
./etc/pki/nssdb/cert9.db
./etc/pki/nssdb/key3.db
./etc/pki/nssdb/key4.db
./etc/pki/nssdb/pkcs11.txt
./etc/pki/nssdb/secmod.db
./usr/lib/libnss3.so
./usr/lib/libnsspem.so
./usr/lib/libsmime3.so
./usr/lib/libssl3.so
./usr/lib/nss/libnssckbi.so
./usr/share/man/man5/cert8.db.5.gz
./usr/share/man/man5/cert9.db.5.gz
./usr/share/man/man5/key3.db.5.gz
./usr/share/man/man5/key4.db.5.gz
./usr/share/man/man5/pkcs11.txt.5.gz
./usr/share/man/man5/secmod.db.5.gz
5146 blocks
#

rpm2cpio.shの中を確認してみる。

#!/bin/sh

pkg=$1
if [ "$pkg" = "" -o ! -e "$pkg" ]; then
    echo "no package supplied" 1>&2
   exit 1
fi

leadsize=96
o=`expr $leadsize + 8`
set `od -j $o -N 8 -t u1 $pkg`
il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`
dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`
echo `od -j $o -N 8 -t u1 $pkg`
 echo "sig il: $il dl: $dl"

sigsize=`expr 8 + 16 \* $il + $dl`
o=`expr $o + $sigsize + \( 8 - \( $sigsize \% 8 \) \) \% 8 + 8`
set `od -j $o -N 8 -t u1 $pkg`
il=`expr 256 \* \( 256 \* \( 256 \* $2 + $3 \) + $4 \) + $5`
dl=`expr 256 \* \( 256 \* \( 256 \* $6 + $7 \) + $8 \) + $9`
 echo "hdr il: $il dl: $dl"
exit

hdrsize=`expr 8 + 16 \* $il + $dl`
o=`expr $o + $hdrsize`
EXTRACTOR="dd if=$pkg ibs=$o skip=1"

COMPRESSION=`($EXTRACTOR |file -) 2>/dev/null`
if echo $COMPRESSION |grep -q gzip; then
        DECOMPRESSOR=gunzip
elif echo $COMPRESSION |grep -q bzip2; then
        DECOMPRESSOR=bunzip2
elif echo $COMPRESSION |grep -q xz; then
        DECOMPRESSOR=unxz
elif echo $COMPRESSION |grep -q cpio; then
        DECOMPRESSOR=cat
elif $EXTRACTOR | od -x | head -1 | grep -q '37fd 587a '; then
        DECOMPRESSOR=unxz
else
        # Most versions of file don't support LZMA, therefore we assume
        # anything not detected is LZMA
        DECOMPRESSOR=`which unlzma 2>/dev/null`
        case "$DECOMPRESSOR" in
            /* ) ;;
            *  ) DECOMPRESSOR=`which lzmash 2>/dev/null`
                 case "$DECOMPRESSOR" in
                     /* ) DECOMPRESSOR="lzmash -d -c" ;;
                     *  ) DECOMPRESSOR=cat ;;
                 esac
                 ;;
        esac
fi

$EXTRACTOR 2>/dev/null | $DECOMPRESSOR

CentOS5ではサポートされていないヘッダと署名部分を削除してから、個別で展開しているような感じですかね。

オープンソース版もあるVTLソフトウェアQUADSTOR


LTFSについて調べていたら「QUADSTOR」というものが出てきた。

QUADSTORのページにいくと「Storage Virtualization Software」と「Virtual Tape Library(VTL)」の2種類がある。

どちらもLinux/FreeBSDサーバの管理下にあるディスクを使って、FC/iSCSI/Infiniband接続のデバイスとして見せるためのソフトウェア。

VTLの方は、さらに/dev/st0や/dev/sg0などの通常のデバイスファイルとして見せることもできるようだ。

おもしろそうなので、後ほど詳細を調査予定

使って見た詳細→「QUADSTOR VLTを使ってみた

LTOテープをファイルシステムとして使うLTFSについて 2014/06/09版


LTOテープをファイルシステムとして使うLTFSについて 2020/05/11版」にて内容を更新しました。


2015/11/18の情報を元に、新記事「LTOテープをファイルシステムとして使うLTFSについて 2015/11/18版」を公開しています。


LTOテープ1本を持ち運びができるファイルシステムメディアとして使用できるようにするLTFSについて、最近の状況を調べ直した。
(過去の関連記事:「LTOテープをファイルシステムとして使うLTFS(2012/11/28)」「テープ装置メーカ純正のLTFS一覧(2013/12/20更新)」「IBM版LTFSをRHEL5で使ってみた(2013/05/20)

LTO-5/LTO-6からは、メディアを2つの領域に分割して利用することが可能になった。
その機能を活かし、1本のテープメディアの中に、メディア内データの管理情報と、実データを分割して保存することを可能とした。
これにより、これまで実現出来なかった、1本のテープメディアだけで可搬性のあるファイルシステム構築、というものが可能となり、その実装として、LTFS(Linear Tape File System)というのがある。

使用用途としては、バックアップ用ではなく、長期保存のためのアーカイブ用や、大容量データの持ち運び用として使用されている。

LTFSを実現するためのソフトウェアについては、基本的には、IBMが大本のベースを作り、それを各LTOドライブメーカが、自社ドライブ向けにカスタマイズして提供しているような形となっている。

LTFSには、バージョンがいくつかあり、現状気にしなければならないのは、以下の4つ
・LTFS 1.0
・LTFS 2.0 : ファイルインデックス関連で機能をいろいろ追加
・LTFS 2.1 : 2012/05/18リリース。LTFS2.0+シンボリックリンク(現在draft版)
・LTFS 2.2 : 2013/12/21リリース。管理情報の改良

ファイルインデックスは、XMLで書かれているので、LTOテープからデータを直接読み込んで、自前でデコードしてみる、ということも可能ではある。

LTFS2.2の規格書はSNIAの「Linear Tape File System (LTFS)」にある。
その他、いろんな情報は、LTOの規格団体の「LTFS Overview」にある。

LTFSの公式認証を取得しているLTFSソフトウェアについては、「LTFS Compliance Verification」にて紹介されている。

2014/06/06時点では以下の6個が登録されている。

 Company

 Product

 Version

 LTFS Version*

 LTO Generation

 Date tested

 Quantum

 Quantum Scalar LTFS Appliance

 2.0.2

 2.0.1

 LTO5 & 6

 9/11/13

 HP

 HP StoreOpen Standalone

 2.1.0

 2.1.0

 LTO5 & 6

 9/11/13

 IBM

 IBM Single Drive Version

 1.3.0

 2.1.0

 LTO5 & 6

 9/11/13

 IBM

 IBM LTFS Library Edition

 V1R3

 2.1.0

 LTO5 & 6

 10/2/13

 Quantum

 Quantum LTFS

 2.1.0

 2.1.0

 LTO5 & 6

 11/29/13

 HP

 HP StoreOpen Automation

 1.2.0

 2.0.1

 LTO5 & 6

 11/29/13

ソフトウェアのバージョンと、対応しているLTFSフォーマットのバージョンに関連性は無いので注意が必要。

各ドライブメーカが出しているLTFSソフトウェアの情報について

まずは、上記のリストに載っているメーカのものから。

・IBM
公式: IBM Linear Tape File System

ソフトウェアの入手は、「Fix Central」にて「製品グループ:System Storage」-「Tape Systems」-「Tape drives and software」の下にある「LTFS Single Drive Edition (SDE)」や「LTFS Library Edition (LE)」を選択して行う。
なお、LEの方はアップデータのみの配布で、元になるソフトウェアについては、IBMから別途入手する必要がある。
基本的には、LTFS Single Drive Edition(SDE)が、他の全てのLTFSソフトウェアの原型になっているもの・・・という感じである。

2014/06/09時点での最新は、
LTFS Library Edition : ver2.1.2.2-4103(2013/12/06)
LTFS Single Drive Edition: ver2.2.0.0-4301(2014/05/09)

SDEの方はLTFS2.2をサポート。
LEの方はサポートしているのかどうかはっきりしなかった。

・HP
公式: HP StoreOpen
日本語情報: HP LTFS (Linear Tape File System)

ソフトウェアの入手は、単体ドライブ向けの「HP StoreOpen Standalone」も、チェンジャー向け「HP StoreOpen Automation」も、なぜか「HP StoreOpen Standaloneダウンロードページ」のリンクから可能。

2014/06/09時点での最新は、
HP StoreOpen Standalone : ver2.2.0(2014/04/29)
HP StoreOpen Automation : ver1.3.0(2014/02/03)

どちらのバージョンもLTFS 2.2.0をサポートするためにバージョンアップしている。

・Quantum
公式: Linear Tape File System

ソフトウェア入手は上記の公式ページの「Software」タブから行う。
ソースコードについては、LTFS Open Source Filesから。

2014/06/09時点での最新は、
qtmltfs : ver2.1.1(2014/02/25)

日付的にLTFS2.2もサポートなのかな?と思いきや、README内の変更履歴を見る限りでは、LTFS2.1までのサポート。

・Quantum Scalar LTFS Appliance
公式:Scalar LTFSアプライアンス

こいつだけ、他のとは違って、ハードウェアがセットになったアプライアンス。
これの下にFC経由などでテープチェンジャーを繋いで使うもの。

リストに載っていない、LTFS

・TANDBERG DATA
公式: LTFS for Big Data Storage

ソフトウェアの入手は「LTFS Documents and Downloadsから行う。

2014/06/09時点での最新は
バイナリ: ver2.1.0
ソースコード: ver1.2.0
ではあるものの、HP StoreOpen Standaloneそのままである模様。

・Oracle
公式: Oracle’s StorageTek Linear Tape File System, Open Edition

ソフトウェアの入手は「https://oss.oracle.com/projects/ltfs/files/」から行う。

2014/06/09時点での最新は
ltfs-1.2.6-20130711(2013/08/15)

IBM LTFS 1.2.5とHP LTFS 2.0.0を組み合わせ、Oracle/StorageTek用の設定を入れたもの。
LTFS2.0.0までのサポート

Oracle Linux用の公開レポジトリについて


Oracle Linux 7β版のページを見ていたら、以下の記述を発見。

Oracle Linux is an open source operating system available under the GNU General Public License (GPL). Oracle Linux is optimized for Oracle hardware and software and offers zero-downtime kernel updates with Ksplice and enterprise tracing and diagnostic capabilities with DTrace. Oracle Linux is free to download, free to distribute and free to use. All errata is freely available on public-yum.oracle.com .

契約していなくても使える公開レポジトリがあるらしい。

Oracle Linux Public Yum Server

現在、以下の4種類のレポジトリがある模様
・Oracle Linux 4 Update 6以降
・Oracle Linux 5
・Oracle Linux 6
・Oracle VM 2

Oracle Linux 4用は更新されてるのかなぁ?と覗いてみた・・・
以前「CentOS4の2012年03月以降のパッチ」で書いたように2014年更新なのはtzdataのみでした。
他のパッケージは更新されていないので、いまさらRHEL4/CentOS4を使い続けるのはやっぱり危険ですね。

で・・・本題のOracle Linux 6用のものを見てみる・・・
http://public-yum.oracle.com/repo/OracleLinux/OL6/

特筆するようなものとしては、以下のようなレポジトリが含まれているというところ。
・MySQL 5.5 (ol6_MySQL)
・MySQL 5.6 (ol6_MySQL56)
・Unbrakable Enterprise kernel 2.6.39 (ol6_UEK_latest)
・Unbrakable Enterprise kernel 3.8.13 (ol6_UEKR3_latest)
・常に最新kernel。2014/05/28時点では3.15.0-rc (ol6_playground_latest)

playgroundの位置づけについては、「Oracle Linux Playground」を参照のこと。

RHEL6/CentOS6でもこのレポジトリを突っ込めるので入れてみた。
競合するので、既存の/etc/yum.repos.dの中身をリネームしてから、Public repo用のファイルを入手

[root@rhel6 ~]# cd /etc/yum.repos.d/
[root@rhel6 yum.repos.d]# wget http://public-yum.oracle.com/public-yum-ol6.repo
--2014-05-28 xx:xx:xx--  http://public-yum.oracle.com/public-yum-ol6.repo
public-yum.oracle.com をDNSに問いあわせています... 203.179.83.19, 203.179.83.11
public-yum.oracle.com|203.179.83.19|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 4233 (4.1K) [text/plain]
`public-yum-ol6.repo' に保存中

100%[======================================&gt;] 4,233       --.-K/s 時間 0s

2014-05-28 xx:xx:xx (139 MB/s) - `public-yum-ol6.repo' へ保存完了 [4233/4233]

[root@rhel6 yum.repos.d]#

まず、中身を確認

[root@rhel6 yum.repos.d]# cat public-yum-ol6.repo
[ol6_latest]
name=Oracle Linux $releasever Latest ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1

[ol6_addons]
name=Oracle Linux $releasever Add ons ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/addons/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol6_ga_base]
name=Oracle Linux $releasever GA installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/0/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol6_u1_base]
name=Oracle Linux $releasever Update 1 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/1/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol6_u2_base]
name=Oracle Linux $releasever Update 2 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/2/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol6_u3_base]
name=Oracle Linux $releasever Update 3 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/3/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol6_u4_base]
name=Oracle Linux $releasever Update 4 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/4/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol6_u5_base]
name=Oracle Linux $releasever Update 5 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/5/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol6_UEKR3_latest]
name=Latest Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/UEKR3/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol6_UEK_latest]
name=Latest Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/UEK/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1

[ol6_UEK_base]
name=Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/UEK/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol6_playground_latest]
name=Latest mainline stable kernel for Oracle Linux 6 ($basearch) - Unsupported
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/playground/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol6_MySQL]
name=MySQL 5.5 for Oracle Linux 6 ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/MySQL/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol6_gdm_multiseat]
name=Oracle Linux 6 GDM Multiseat ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/gdm_multiseat/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol6_ofed_UEK]
name=OFED supporting tool packages for Unbreakable Enterprise Kernel on Oracle Linux 6 ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/ofed_UEK/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol6_MySQL56]
name=MySQL 5.6 for Oracle Linux 6 ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/MySQL56/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol6_spacewalk20_server]
name=Spacewalk Server 2.0 for Oracle Linux 6 ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/spacewalk20/server/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol6_spacewalk20_client]
name=Spacewalk Client 2.0 for Oracle Linux 6 ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/spacewalk20/client/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[root@rhel6 yum.repos.d]#

標準で有効になっているものは「ol6_latest」「ol6_UEK_latest」。
つまり、基本はRHEL6互換だけど、kernelだけ2.6.39になる、というもの。

kernelとmysqlについては複数の選択肢がある。

・kernelの使い分けについて
「RHEL6相当のkernel 2.6.32」「UEK kernel 2.6.39」「UEK kernel 3.8.13」の3種類がある。
UEKのkernelを使いたい場合は、「kernel-uek」を追加でインストールし、grub.confを修正してkernel-uekで起動できるように変更する。
「UEK kernel 2.6.39」と「UEK kernel 3.8.13」は、パッケージ名としては、どちらも「kernel-uek」となる。
初期設定時「kernel-uek」を指定すると「UEK kernel 2.6.39」になるが、/etc/yum.repo.d/public-yum-ol6.repo 内の「ol6_UEKR3_latest」の「enabled=0」を「enabled=1」に変更すると、「UEK kernel 3.8.13」を使用する用になる。

・MySQLの使い分けについて
「RHEL6相当のMySQL 5.1」「MySQL 5.5」「MySQL 5.6」の3種類がある。
標準状態は「RHEL6相当のMySQL 5.1」となる。
パッケージ名としては「mysql-server」という名前で「RHEL6相当のMySQL 5.1」「MySQL 5.5」の両方が該当する。
このため、RPM管理上は単純な置き換え、という扱いになる。

それに対して「MySQL 5.6」の方は「mysql-community-server」という別のパッケージ名での提供になる。
ただし、/etc/init.d/mysqldとか/etc/my.cnfとか設定ファイル上は、いままでのものと同じである。
(このため、mysql-serverとmysql-community-serverは、同時にインストールできない)

さて、CentOS6.5の状態からアップデートした場合、どんなパッケージがアップデートされるのか確認してみる。

まず、通常のCentOS6.5をインストールした直後にyum check-updateを実行した場合。

[root@centos6 ~]# yum check-update
Loaded plugins: fastestmirror
base                                                     | 3.7 kB     00:00
base/primary_db                                          | 4.4 MB     00:00
extras                                                   | 3.4 kB     00:00
extras/primary_db                                        |  19 kB     00:00
updates                                                  | 3.4 kB     00:00
updates/primary_db                                       | 3.1 MB     00:00

ca-certificates.noarch                     2013.1.95-65.1.el6_5          updates
centos-release.x86_64                      6-5.el6.centos.11.2           updates
coreutils.x86_64                           8.4-31.el6_5.1                updates
coreutils-libs.x86_64                      8.4-31.el6_5.1                updates
device-mapper-persistent-data.x86_64       0.2.8-4.el6_5                 updates
dracut.noarch                              004-336.el6_5.2               updates
dracut-kernel.noarch                       004-336.el6_5.2               updates
ethtool.x86_64                             2:3.5-1.4.el6_5               updates
glib2.x86_64                               2.26.1-7.el6_5                updates
glibc.x86_64                               2.12-1.132.el6_5.2            updates
glibc-common.x86_64                        2.12-1.132.el6_5.2            updates
grep.x86_64                                2.6.3-4.el6_5.1               updates
initscripts.x86_64                         9.03.40-2.el6.centos.1        updates
kernel.x86_64                              2.6.32-431.17.1.el6           updates
kernel-firmware.noarch                     2.6.32-431.17.1.el6           updates
krb5-libs.x86_64                           1.10.3-15.el6_5.1             updates
libblkid.x86_64                            2.17.2-12.14.el6_5            updates
libuuid.x86_64                             2.17.2-12.14.el6_5            updates
libxml2.x86_64                             2.7.6-14.el6_5.1              updates
mysql-libs.x86_64                          5.1.73-3.el6_5                updates
nspr.x86_64                                4.10.2-1.el6_5                updates
nss.x86_64                                 3.15.3-6.el6_5                updates
nss-softokn.x86_64                         3.14.3-10.el6_5               updates
nss-softokn-freebl.x86_64                  3.14.3-10.el6_5               updates
nss-sysinit.x86_64                         3.15.3-6.el6_5                updates
nss-tools.x86_64                           3.15.3-6.el6_5                updates
nss-util.x86_64                            3.15.3-1.el6_5                updates
openldap.x86_64                            2.4.23-34.el6_5.1             updates
openssl.x86_64                             1.0.1e-16.el6_5.7             updates
p11-kit.x86_64                             0.18.5-2.el6_5.2              updates
p11-kit-trust.x86_64                       0.18.5-2.el6_5.2              updates
postfix.x86_64                             2:2.6.6-6.el6_5               updates
psmisc.x86_64                              22.6-19.el6_5                 updates
python.x86_64                              2.6.6-52.el6                  updates
python-libs.x86_64                         2.6.6-52.el6                  updates
selinux-policy.noarch                      3.7.19-231.el6_5.3            updates
selinux-policy-targeted.noarch             3.7.19-231.el6_5.3            updates
tzdata.noarch                              2014b-3.24.el6                updates
upstart.x86_64                             0.6.5-13.el6_5.3              updates
util-linux-ng.x86_64                       2.17.2-12.14.el6_5            updates
yum.noarch                                 3.2.29-43.el6.centos          updates
yum-plugin-fastestmirror.noarch            1.1.30-17.el6_5               updates
[root@centos6 ~]#

続いて、Oralce Linux 6 public yumにした場合のyum check-updateの結果。

[root@centos6 yum.repos.d]# yum check-update
Loaded plugins: fastestmirror
Determining fastest mirrors
ol6_UEK_latest                                           | 1.2 kB     00:00
ol6_UEK_latest/primary                                   |  14 MB     00:01
ol6_UEK_latest                                                          302/302
ol6_latest                                               | 1.4 kB     00:00
ol6_latest/primary                                       |  38 MB     00:03
ol6_latest                                                          25346/25346

basesystem.noarch                    10.0-4.0.1.el6         ol6_latest
bfa-firmware.noarch                  3.2.23.0-1.0.1.el6     ol6_latest
ca-certificates.noarch               2013.1.95-65.1.el6_5   ol6_latest
coreutils.x86_64                     8.4-31.0.1.el6_5.1     ol6_latest
coreutils-libs.x86_64                8.4-31.0.1.el6_5.1     ol6_latest
curl.x86_64                          7.19.7-37.el6_5.3      ol6_latest
dbus-glib.x86_64                     0.86-6.el6_4           ol6_latest
dbus-libs.x86_64                     1:1.2.24-7.0.1.el6_3   ol6_latest
device-mapper-persistent-data.x86_64 0.2.8-4.el6_5          ol6_latest
dhclient.x86_64                      12:4.1.1-38.P1.0.1.el6 ol6_latest
dhcp-common.x86_64                   12:4.1.1-38.P1.0.1.el6 ol6_latest
dracut.noarch                        004-336.0.1.el6_5.2    ol6_latest
dracut-kernel.noarch                 004-336.0.1.el6_5.2    ol6_latest
e2fsprogs.x86_64                     1.42.8-1.0.1.el6       ol6_latest
e2fsprogs-libs.x86_64                1.42.8-1.0.1.el6       ol6_latest
ethtool.x86_64                       2:3.5-1.4.el6_5        ol6_latest
glib2.x86_64                         2.26.1-7.el6_5         ol6_latest
glibc.x86_64                         2.12-1.132.el6_5.2     ol6_latest
glibc-common.x86_64                  2.12-1.132.el6_5.2     ol6_latest
grep.x86_64                          2.6.3-4.el6_5.1        ol6_latest
grub.x86_64                          1:0.97-83.0.1.el6      ol6_latest
grubby.x86_64                        7.0.15-5.0.2.el6       ol6_latest
initscripts.x86_64                   9.03.40-2.0.1.el6_5.1  ol6_latest
iptables.x86_64                      1.4.7-11.0.1.el6       ol6_latest
iptables-ipv6.x86_64                 1.4.7-11.0.1.el6       ol6_latest
kernel.x86_64                        2.6.32-431.17.1.el6    ol6_latest
kernel-firmware.noarch               2.6.32-431.17.1.el6    ol6_latest
krb5-libs.x86_64                     1.10.3-15.el6_5.1      ol6_latest
libblkid.x86_64                      2.17.2-12.14.el6_5     ol6_latest
libcom_err.x86_64                    1.42.8-1.0.1.el6       ol6_latest
libcurl.x86_64                       7.19.7-37.el6_5.3      ol6_latest
libss.x86_64                         1.42.8-1.0.1.el6       ol6_latest
libudev.x86_64                       147-2.51.0.3.el6       ol6_latest
libuuid.x86_64                       2.17.2-12.14.el6_5     ol6_latest
libxml2.x86_64                       2.7.6-14.0.1.el6_5.1   ol6_latest
module-init-tools.x86_64             3.9-21.0.1.el6_4       ol6_latest
mysql-libs.x86_64                    5.1.73-3.el6_5         ol6_latest
nspr.x86_64                          4.10.2-1.el6_5         ol6_latest
nss.x86_64                           3.15.3-6.0.1.el6_5     ol6_latest
nss-softokn.x86_64                   3.14.3-10.el6_5        ol6_latest
nss-softokn-freebl.x86_64            3.14.3-10.el6_5        ol6_latest
nss-sysinit.x86_64                   3.15.3-6.0.1.el6_5     ol6_latest
nss-tools.x86_64                     3.15.3-6.0.1.el6_5     ol6_latest
nss-util.x86_64                      3.15.3-1.el6_5         ol6_latest
openldap.x86_64                      2.4.23-34.el6_5.1      ol6_latest
openssl.x86_64                       1.0.1e-16.el6_5.7      ol6_latest
p11-kit.x86_64                       0.18.5-2.el6_5.2       ol6_latest
p11-kit-trust.x86_64                 0.18.5-2.el6_5.2       ol6_latest
plymouth.x86_64                      0.8.3-27.0.1.el6       ol6_latest
plymouth-core-libs.x86_64            0.8.3-27.0.1.el6       ol6_latest
plymouth-scripts.x86_64              0.8.3-27.0.1.el6       ol6_latest
policycoreutils.x86_64               2.0.83-19.39.0.1.el6   ol6_latest
postfix.x86_64                       2:2.6.6-6.el6_5        ol6_latest
psmisc.x86_64                        22.6-19.el6_5          ol6_latest
python.x86_64                        2.6.6-52.el6           ol6_latest
python-libs.x86_64                   2.6.6-52.el6           ol6_latest
ql2400-firmware.noarch               7.03.00-1.0.1.el6      ol6_latest
ql2500-firmware.noarch               7.03.00-1.0.1.el6      ol6_latest
rsyslog.x86_64                       5.8.10-8.0.1.el6       ol6_latest
selinux-policy.noarch                3.7.19-231.0.1.el6_5.3 ol6_latest
selinux-policy-targeted.noarch       3.7.19-231.0.1.el6_5.3 ol6_latest
tzdata.noarch                        2014b-3.24.el6         ol6_latest
udev.x86_64                          147-2.51.0.3.el6       ol6_latest
upstart.x86_64                       0.6.5-13.el6_5.3       ol6_latest
util-linux-ng.x86_64                 2.17.2-12.14.el6_5     ol6_latest
yum.noarch                           3.2.29-43.0.1.el6_5    ol6_latest
yum-plugin-fastestmirror.noarch      1.1.30-17.0.1.el6_5    ol6_latest
Obsoleting Packages
oracle-logos.noarch                  60.0.14-1.0.1.el6      ol6_latest
    redhat-logos.noarch              60.0.14-12.el6.centos  @anaconda-CentOS-201311272149.x86_64/6.5
[root@centos6 yum.repos.d]#

現在の段階では、いくつかのパッケージのバージョンが上がっているようです。

[root@centos6 ~]# yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Setting up Update Process
Resolving Dependencies
--&gt; Running transaction check
---&gt; Package basesystem.noarch 0:10.0-4.el6 will be updated
<略>
Transaction Summary
================================================================================
Install       4 Package(s)
Upgrade      66 Package(s)

Total download size: 109 M
Is this ok [y/N]: y
Downloading Packages:
(1/70): basesystem-10.0-4.0.1.el6.noarch.rpm             | 4.3 kB     00:00
<略>
(70/70): yum-plugin-fastestmirror-1.1.30-17.0.1.el6_5.no |  28 kB     00:00
--------------------------------------------------------------------------------
Total                                            10 MB/s | 109 MB     00:10
警告: rpmts_HdrFromFdno: ヘッダ V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle

GPG key retrieval failed: [Errno 14] Could not open/read file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
[root@centos6 ~]#

RPMパッケージの署名検証に必要なファイルが無いのでエラー終了します。
(ちなみに/etc/yum.repos.d/public-yum-ol6.repo内の「gpgcheck=1」を「gpgcheck=0」に変更して書名検証を行わないという回避手法もありますが、この後の手順でファイルが用意されるので行いません)

以下のようにRPMパッケージとして、「centos-release」というものがインストールされています。

[root@centos6 ~]# rpm -qa|grep release
centos-release-6-5.el6.centos.11.1.x86_64
[root@centos6 ~]#

これを、「oraclelinux-release」というパッケージに入れ替えます。
先ほど失敗したyum updateコマンドによって、/var/cache/yum/x86_64/6/ol6_latest/packages/ディレクトリに必要なRPMファイルがダウンロードされてきているので、それを手動で指定します。

また、「rpm -ivh」だけでは競合を検出しインストールできないので「–force」オプションもしていします。

[root@centos6 ~]# ls /var/cache/yum/x86_64/6/ol6_latest/packages/*release*
/var/cache/yum/x86_64/6/ol6_latest/packages/oraclelinux-release-6Server-5.0.2.x86_64.rpm
/var/cache/yum/x86_64/6/ol6_latest/packages/redhat-release-server-6Server-6.5.0.1.0.1.el6.x86_64.rpm
[root@centos6 ~]# rpm --force -ivh /var/cache/yum/x86_64/6/ol6_latest/packages/oraclelinux-release-6Server-5.0.2.x86_64.rpm /var/cache/yum/x86_64/6/ol6_latest/packages/redhat-release-server-6Server-6.5.0.1.0.1.el6.x86_64.rpm
警告: /var/cache/yum/x86_64/6/ol6_latest/packages/oraclelinux-release-6Server-5.0.2.x86_64.rpm: ヘッダ V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
準備中... ########################################### [100%]
1:redhat-release-server ########################################### [ 50%]
2:oraclelinux-release ########################################### [100%]
[root@centos6 ~]#

いままでの「centos-release」ファイルは不要なのでrpm -evで削除します。

[root@centos6 ~]# rpm -ev centos-release
[root@centos6 ~]# rpm -qa|grep release
redhat-release-server-6Server-6.5.0.1.0.1.el6.x86_64
oraclelinux-release-6Server-5.0.2.x86_64
[root@centos6 ~]#

これでyum updateを再実行すれば、アップデートを行うことができます。

[root@centos6 ~]# yum update
Loaded plugins: fastestmirror
ol6_UEK_latest                                           | 1.2 kB     00:00
ol6_UEK_latest/primary                                   |  14 MB     00:01
ol6_UEK_latest                                                          302/302
ol6_latest                                               | 1.4 kB     00:00
ol6_latest/primary                                       |  38 MB     00:03
ol6_latest                                                          25346/25346
Setting up Update Process
Resolving Dependencies
--&gt; Running transaction check
<略>
Transaction Summary
================================================================================
Install       2 Package(s)
Upgrade      66 Package(s)

Total download size: 109 M
Is this ok [y/N]: y
Downloading Packages:
(1/68): basesystem-10.0-4.0.1.el6.noarch.rpm             | 4.3 kB     00:00
<略>
(68/68): yum-plugin-fastestmirror-1.1.30-17.0.1.el6_5.no |  28 kB     00:00
--------------------------------------------------------------------------------
Total                                           9.7 MB/s | 109 MB     00:11
警告: rpmts_HdrFromFdno: ヘッダ V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
Importing GPG key 0xEC551F03:
 Userid : Oracle OSS group (Open Source Software group) &lt;build@oss.oracle.com&gt;
 Package: 6:oraclelinux-release-6Server-5.0.2.x86_64 (installed)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Updating   : basesystem-10.0-4.0.1.el6.noarch                           1/135
  yum.noarch 0:3.2.29-43.0.1.el6_5
  yum-plugin-fastestmirror.noarch 0:1.1.30-17.0.1.el6_5

Replaced:
  redhat-logos.noarch 0:60.0.14-12.el6.centos

Complete!
[root@centos6 ~]#

2020/09/28追記

最近はpublic-yum-ol7.repoが使用されなくなり、oracle-linux-ol7.repo, uek-ol7.repo, virt-ol7.repo に分割されたようで、public-yumを使用していると下記の様なメッセージが表示されたりする。(具体的にはoraclelinux-releaseパッケージのアップデートの時に出る)

IMPORTANT: A legacy Oracle Linux yum server repo file was found. Oracle Linux yum server repository configurations have changed which means public-yum-ol7.repo will no longer be updated. New repository configuration files have been installed but are disabled. To complete the transition, run this script as the root user:

/usr/bin/ol_yum_configure.sh

See https://yum.oracle.com/faq.html for more information.

  インストール中          : oraclelinux-release-el7-1.0-12.1.el7.x86_64                                                                                                                                                               69/640

oracle-linux-ol7.repo の中身

[ol7_latest]
name=Oracle Linux $releasever Latest ($basearch)
baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL7/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1

[ol7_u0_base]
name=Oracle Linux $releasever GA installation media copy ($basearch)
baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL7/0/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol7_u1_base]
name=Oracle Linux $releasever Update 1 installation media copy ($basearch)
baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL7/1/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol7_u2_base]
name=Oracle Linux $releasever Update 2 installation media copy ($basearch)
baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL7/2/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol7_u3_base]
name=Oracle Linux $releasever Update 3 installation media copy ($basearch)
baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL7/3/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol7_u4_base]
name=Oracle Linux $releasever Update 4 installation media copy ($basearch)
baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL7/4/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol7_u5_base]
name=Oracle Linux $releasever Update 5 installation media copy ($basearch)
baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL7/5/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol7_u6_base]
name=Oracle Linux $releasever Update 6 installation media copy ($basearch)
baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL7/6/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol7_u7_base]
name=Oracle Linux $releasever Update 7 installation media copy ($basearch)
baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL7/7/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0


[ol7_u8_base]
name=Oracle Linux $releasever Update 8 installation media copy ($basearch)
baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL7/8/base/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol7_optional_latest]
name=Oracle Linux $releasever Optional Latest ($basearch)
baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL7/optional/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol7_addons]
name=Oracle Linux $releasever Add ons ($basearch)
baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL7/addons/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol7_MODRHCK]
name=Latest RHCK with fixes from Oracle for Oracle Linux $releasever ($basearch)
baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL7/MODRHCK/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
priority=20
enabled=0

[ol7_latest_archive]
name=Oracle Linux $releasever Latest ($basearch) - Archive
baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL7/latest/archive/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol7_optional_archive]
name=Oracle Linux $releasever Optional ($basearch) - Archive
baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL7/optional/archive/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0


[ol7_security_validation]
name=Oracle Linux $releasever ($basearch) Security Validations
baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL7/security/validation/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

uek-ol7.repo の中身

[ol7_UEKR6]
name=Latest Unbreakable Enterprise Kernel Release 6 for Oracle Linux $releasever ($basearch)
baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL7/UEKR6/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol7_UEKR5]
name=Latest Unbreakable Enterprise Kernel Release 5 for Oracle Linux $releasever ($basearch)
baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL7/UEKR5/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1

[ol7_UEKR4]
name=Latest Unbreakable Enterprise Kernel Release 4 for Oracle Linux $releasever ($basearch)
baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL7/UEKR4/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol7_UEKR3]
name=Latest Unbreakable Enterprise Kernel Release 3 for Oracle Linux $releasever ($basearch)
baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL7/UEKR3/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol7_UEKR3_OFED20]
name=OFED supporting tool packages for Unbreakable Enterprise Kernel on Oracle Linux 7 ($basearch)
baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL7/UEKR3_OFED20/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0
priority=20

[ol7_UEKR6_RDMA]
name=Oracle Linux 7 UEK6 RDMA ($basearch)
baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL7/UEKR6/RDMA/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol7_UEKR5_RDMA]
name=Oracle Linux 7 UEK5 RDMA ($basearch)
baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL7/UEKR5/RDMA/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol7_UEKR4_OFED]
name=OFED supporting tool packages for Unbreakable Enterprise Kernel Release 4 on Oracle Linux 7 ($basearch)
baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL7/UEKR4/OFED/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0
priority=20

[ol7_UEKR4_archive]
name=Unbreakable Enterprise Kernel Release 4 for Oracle Linux $releasever ($basearch) - Archive
baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL7/UEKR4/archive/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol7_UEKR5_archive]
name=Unbreakable Enterprise Kernel Release 5 for Oracle Linux $releasever ($basearch) - Archive
baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL7/UEKR5/archive/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

virt-ol7.repo の中身

[ol7_kvm_utils]
name=Oracle Linux $releasever KVM Utilities ($basearch)
baseurl=https://yum$ociregion.oracle.com/repo/OracleLinux/OL7/kvm/utils/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0