1
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?

【備忘録】OCI Base DB ECPUで yumリポジトリを設定する

1
Posted at

はじめに

OCI Base DB ECPU版でVMのインフラ部分の情報を取得しようとしてコマンドを実行したところ、インストールされていなかったので dnf コマンドでインストールしようとしたところエラーが発生しました。

$ sudo fio
sudo: fio: command not found
$
$ sudo dnf install fio
Error: There are no enabled repositories in "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".
$ 
$ sudo ls -l /etc/yum.repos.d/
total 8
-r--r-----. 1 root root 896 Jan 18  2026 Exadata-computenode.repo.sample
-r--r-----. 1 root root 127 Jan 18  2026 Exadata-inactive.repo

以前からあったOCPU版では普通にyum/dnfでのパッケージ導入はできていた認識なのですが、どうやらECPU版では、有効な.repoファイルが存在しないようです。
(なぜかExadataのサンプルが・・・。)
ということで yum/dnf が使えるように設定していきます。

注意
BaseDB ECPU版ではパッケージを自由に追加・更新することが推奨されていない可能性があります。
以降の手順は自己責任にてお願いします。

リポジトリの追加手順

バージョンなど環境の確認

一応バージョンなど確認

$ sudo cat /etc/os-release
NAME="Oracle Linux Server"
VERSION="8.10"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="8.10"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Oracle Linux Server 8.10"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:8:10:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://github.com/oracle/oracle-linux"

ORACLE_BUGZILLA_PRODUCT="Oracle Linux 8"
ORACLE_BUGZILLA_PRODUCT_VERSION=8.10
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=8.10

リポジトリの状況確認

$ sudo dnf repolist all
repo id      repo name      status
inactive     inactive       disabled

有効なリポジトリが設定されていないことが改めて確認できます。

yum リポジトリの追加

OCI Regional Yum Serverへ接続でききるか確認

$ sudo curl -I https://yum.ap-tokyo-1.oci.oraclecloud.com
HTTP/1.1 200 OK
Date: Fri, 07 Aug 2026 09:17:46 GMT
Content-Type: text/html
Content-Length: 1356
Connection: keep-alive
:
Accept-Ranges: bytes

問題なく通信できているようです。

以下を実行し/etc/yum.repos.d/ol8-temp.repo を作成します。

sudo tee /etc/yum.repos.d/temp_base.repo >/dev/null <<'EOF'
[ol8_baseos_latest]
name=Oracle Linux 8 BaseOS Latest ($basearch)
baseurl=https://yum$ociregion.$ocidomain/repo/OracleLinux/OL8/baseos/latest/$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle

[ol8_appstream]
name=Oracle Linux 8 AppStream ($basearch)
baseurl=https://yum$ociregion.$ocidomain/repo/OracleLinux/OL8/appstream/$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
EOF

キャッシュ作成

$ sudo dnf clean all
0 files removed
$ sudo dnf makecache
Oracle Linux 8 BaseOS Latest (x86_64)                                                                                                                          106 MB/s | 156 MB     00:01    
Oracle Linux 8 AppStream (x86_64)                                                                                                                               99 MB/s |  84 MB     00:00    
Last metadata expiration check: 0:00:18 ago on Fri 07 Aug 2026 06:29:40 PM JST.
Metadata cache created.

パッケージの追加

今回は fio コマンドを使用したかったので以下実行し追加します。

$ sudo dnf install -y fio
Last metadata expiration check: 0:04:16 ago on Fri 07 Aug 2026 06:29:40 PM JST.
Dependencies resolved.
===============================================================================================================================================================================================
 Package                                       Architecture                   Version                                                          Repository                                 Size
===============================================================================================================================================================================================
Installing:
 fio                                           x86_64                         3.19-4.el8                                                       ol8_appstream                             538 k
Installing dependencies:
:
Installed:
:
Complete!
$

確認

$ which fio
/usr/bin/fio

追加されました。

(一応)リポジトリの削除手順

repoファイルを削除します。

sudo rm -f /etc/yum.repos.d/temp_base.repo

キャッシュを削除します。

sudo dnf clean all

以上

1
0
0

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
1
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?