4
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Oracle Cloud: Database Service へ Yum Repositoryを設定してみてみた

Last updated at Posted at 2023-02-07

Oracle Cloud Infrastructure (OCI) の Oracle Database Service は Yumリポジトリが設定されていないので、設定してみてみます。

Oracle Database Service の動作に影響を与えるものはインストールしないでください。そのため、デフォルトはyumを使用することができないように設定されています。

■ Yum Install確認

Yum Repository が無いと次の様なエラーが出力されます

[root@db-west-us ~]# yum install iperf3
  Loaded plugins: versionlock
  There are no enabled repos.
  Run "yum repolist all" to see the repos you have.
  To enable custom repositories:
      yum-config-manager --enable <repo>

■ Yum Repository 確認

Yum Repository が無いことを確認

[root@db-west-us ~]# ls -ltr /etc/yum.repos.d
  total 0

■ dbcli update-server 事前チェック

OCI Oracle Database のコマンド dbcli update-server の事前チェックを実行して、yum リポジトリ ファイルをダウンロード

[root@db-west-us ~]# dbcli update-server -c os -p
{
  "jobId" : "0897fa90-eff4-46ee-a6bc-1eb04cd8670a",
  "status" : "Created",
  "message" : null,
  "errorCode" : "",
  "reports" : [ ],
  "createTimestamp" : "February 07, 2023 00:25:21 AM UTC",
  "resourceList" : [ ],
  "description" : "OS Patching Prechecks",
  "updatedTime" : "February 07, 2023 00:25:21 AM UTC",
  "percentageProgress" : "0%",
  "cause" : null,
  "action" : null
}

■ Yum Repository確認

/etc/yum.repos.d へ yum リポジトリ ファイルがダウンロードされます

[root@db-west-us ~]# ls -ltr /etc/yum.repos.d
  total 4
  -rw-r--r-- 1 root root 957 Feb  7 00:25 ol7.repo


[root@db-west-us ~]# cat /etc/yum.repos.d/ol7.repo
  [ol7_UEKR5]
  name=Latest Unbreakable Enterprise Kernel Release 5 for Oracle Linux $releasever ($basearch)
  baseurl=http://yum-phx.oracle.com/repo/OracleLinux/OL7/UEKR5/$basearch/
  gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
  gpgcheck=1
  enabled=1

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


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

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

■ Yum Install確認

● iperf3インストール

Yumで Iperf3 がインストールできることを確認

[root@db-west-us ~]# yum install iperf3
Loaded plugins: versionlock
ol7_UEKR5                                                                           | 3.0 kB  00:00:00
ol7_UEKR5_archive                                                                   | 3.0 kB  00:00:00
ol7_latest                                                                          | 3.6 kB  00:00:00
ol7_latest_archive                                                                  | 3.0 kB  00:00:00
(1/9): ol7_latest/x86_64/group_gz                                                   | 136 kB  00:00:00
(2/9): ol7_latest/x86_64/updateinfo                                                 | 3.5 MB  00:00:00
(3/9): ol7_UEKR5/x86_64/updateinfo                                                  | 345 kB  00:00:00
(4/9): ol7_UEKR5_archive/x86_64/updateinfo                                          | 206 kB  00:00:00
(5/9): ol7_latest_archive/x86_64/updateinfo                                         | 1.8 MB  00:00:00
(6/9): ol7_latest/x86_64/primary_db                                                 |  44 MB  00:00:01
(7/9): ol7_UEKR5_archive/x86_64/primary_db                                          |  46 MB  00:00:01
(8/9): ol7_UEKR5/x86_64/primary_db                                                  |  62 MB  00:00:02
(9/9): ol7_latest_archive/x86_64/primary_db                                         |  57 MB  00:00:01
Excluding 64 updates due to versionlock (use "yum versionlock status" to show them)
Resolving Dependencies
--> Running transaction check
---> Package iperf3.x86_64 0:3.1.7-2.el7 will be installed
--> Finished Dependency Resolution
--> Finding unneeded leftover dependencies
Found and removing 0 unneeded dependencies

Dependencies Resolved

===========================================================================================================
 Package               Arch                  Version                       Repository                 Size
===========================================================================================================
Installing:
 iperf3                x86_64                3.1.7-2.el7                   ol7_latest                 79 k

Transaction Summary
===========================================================================================================
Install  1 Package

Total download size: 79 k
Installed size: 197 k
Is this ok [y/d/N]: y
Downloading packages:
iperf3-3.1.7-2.el7.x86_64.rpm                                                       |  79 kB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : iperf3-3.1.7-2.el7.x86_64                                                               1/1
  Verifying  : iperf3-3.1.7-2.el7.x86_64                                                               1/1

Installed:
  iperf3.x86_64 0:3.1.7-2.el7

Complete!

■ 参考

 ・ dbcliを使用したDBシステム・リソースの更新
 ・ Yum Repository Not Configured In OCI Database Server

4
0
5

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
4
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?