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

VirtualBoxでOracle Linux 9 + Oracle DB 19c 環境構築(2)Oracle Databaseインストール事前準備

Last updated at Posted at 2025-02-25

構築手順

7-2_Oracle Databaseインストール事前準備.png

  1. 仮想マシン(Oracle Linux)作成
    1. 仮想マシン作成
    2. Oracle Linux 9.5インストール<
  2. Oracle Databaseインストール事前準備
    1. Oracle Preinstallation RPM実行(Oracleユーザ作成)
    2. ディレクトリ作成
    3. Oracle Database ソフトウェア配置
  3. Opatchインストール
    1. RU配置
    2. Opatchインストール
  4. Oracle Database インストール
  5. データベース作成

2. Oracle database インストール事前準備

2-1. インストールメディアを光学ドライブに設定

image.png

image.png

2-2. Tera Term で SSH接続

1.で構築した仮想サーバにrootで接続(Tera Term)
ホスト: 192.168.56.10

image.png

image.png

2-3. hostsの設定

[root@o95db19c bin]# cd ~
[root@o95db19c ~]# vi /etc/hosts
hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
※以下を追加
192.168.56.10   ol95db19c.dev   ol95db19c

2-4. インストールメディアをマウント

[root@ol95db19c ~]# mount -t iso9660 /dev/cdrom /mnt
mount: /mnt: 警告: ソースは書き込み禁止です、読み込み専用でマウントします.
[root@ol95db19c ~]# ls /mnt
AppStream  EFI   GPL                  RPM-GPG-KEY-oracle  images    media.repo
BaseOS     EULA  OL9-RELNOTES9-5.zip  extra_files.json    isolinux

2-5. Oracle Database Preinstall RPM実行

Oracleユーザの作成など Oracle database インストールに必要なOS設定

[root@ol95db19c ~]# yum -y install oracle-database-preinstall-19c
(中略)
完了しました!
出力内容
[root@ol95db19c ~]# yum -y install oracle-database-preinstall-19c
メタデータの期限切れの最終確認: 0:19:18 前の 2025年01月15日 23時44分10秒 に実施 しました。
依存関係が解決しました。
================================================================================
 パッケージ                Arch   バージョン            リポジトリー      サイズ
================================================================================
インストール:
 oracle-database-preinstall-19c
                           x86_64 1.0-1.el9             ol9_appstream      33 k
依存関係のインストール:
 glibc-devel               x86_64 2.34-125.0.1.el9_5.1  ol9_appstream      52 k
 glibc-headers             x86_64 2.34-125.0.1.el9_5.1  ol9_appstream     908 k
 gssproxy                  x86_64 0.8.4-7.el9           ol9_baseos_latest 120 k
 initscripts               x86_64 10.11.7-1.0.1.el9     ol9_baseos_latest 285 k
 kernel-headers            x86_64 5.14.0-503.21.1.el9_5 ol9_appstream     4.5 M
 ksh                       x86_64 3:1.0.6-4.el9_5       ol9_appstream     889 k
 libaio-devel              x86_64 0.3.111-13.el9        ol9_appstream      11 k
 libev                     x86_64 4.33-5.el9            ol9_baseos_latest  53 k
 libnfsidmap               x86_64 1:2.5.4-27.0.1.el9    ol9_baseos_latest  70 k
 libnsl                    x86_64 2.34-125.0.1.el9_5.1  ol9_baseos_latest  63 k
 libstdc++-devel           x86_64 11.5.0-2.0.1.el9      ol9_appstream     3.1 M
 libverto-libev            x86_64 0.3.2-3.el9           ol9_baseos_latest  14 k
 libxcrypt-devel           x86_64 4.4.18-3.el9          ol9_appstream      42 k
 lm_sensors-libs           x86_64 3.6.0-10.el9          ol9_appstream      42 k
 make                      x86_64 1:4.3-8.el9           ol9_baseos_latest 570 k
 nfs-utils                 x86_64 1:2.5.4-27.0.1.el9    ol9_baseos_latest 518 k
 pcp-conf                  x86_64 6.2.2-7.el9_5         ol9_appstream      38 k
 pcp-libs                  x86_64 6.2.2-7.el9_5         ol9_appstream     647 k
 rpcbind                   x86_64 1.2.6-7.el9           ol9_baseos_latest  69 k
 sssd-nfs-idmap            x86_64 2.9.5-4.0.1.el9       ol9_baseos_latest  47 k
 sysstat                   x86_64 12.5.4-9.0.2.el9      ol9_appstream     541 k

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

ダウンロードサイズの合計: 12 M
インストール後のサイズ: 32 M
パッケージのダウンロード:
(1/22): libev-4.33-5.el9.x86_64.rpm             332 kB/s |  53 kB     00:00
(2/22): gssproxy-0.8.4-7.el9.x86_64.rpm         648 kB/s | 120 kB     00:00
(3/22): initscripts-10.11.7-1.0.1.el9.x86_64.rp 1.2 MB/s | 285 kB     00:00
(4/22): libnfsidmap-2.5.4-27.0.1.el9.x86_64.rpm 743 kB/s |  70 kB     00:00
(5/22): libverto-libev-0.3.2-3.el9.x86_64.rpm   286 kB/s |  14 kB     00:00
(6/22): libnsl-2.34-125.0.1.el9_5.1.x86_64.rpm  510 kB/s |  63 kB     00:00
(7/22): rpcbind-1.2.6-7.el9.x86_64.rpm          589 kB/s |  69 kB     00:00
(8/22): sssd-nfs-idmap-2.9.5-4.0.1.el9.x86_64.r 1.4 MB/s |  47 kB     00:00
(9/22): nfs-utils-2.5.4-27.0.1.el9.x86_64.rpm   1.9 MB/s | 518 kB     00:00
(10/22): make-4.3-8.el9.x86_64.rpm              1.5 MB/s | 570 kB     00:00
(11/22): glibc-devel-2.34-125.0.1.el9_5.1.x86_6 257 kB/s |  52 kB     00:00
(12/22): glibc-headers-2.34-125.0.1.el9_5.1.x86 2.0 MB/s | 908 kB     00:00
(13/22): ksh-1.0.6-4.el9_5.x86_64.rpm           2.1 MB/s | 889 kB     00:00
(14/22): libaio-devel-0.3.111-13.el9.x86_64.rpm  80 kB/s |  11 kB     00:00
(15/22): libxcrypt-devel-4.4.18-3.el9.x86_64.rp 1.1 MB/s |  42 kB     00:00
(16/22): lm_sensors-libs-3.6.0-10.el9.x86_64.rp 1.5 MB/s |  42 kB     00:00
(17/22): oracle-database-preinstall-19c-1.0-1.e 809 kB/s |  33 kB     00:00
(18/22): pcp-conf-6.2.2-7.el9_5.x86_64.rpm      1.2 MB/s |  38 kB     00:00
(19/22): pcp-libs-6.2.2-7.el9_5.x86_64.rpm      2.1 MB/s | 647 kB     00:00
(20/22): sysstat-12.5.4-9.0.2.el9.x86_64.rpm    2.0 MB/s | 541 kB     00:00
(21/22): libstdc++-devel-11.5.0-2.0.1.el9.x86_6 2.4 MB/s | 3.1 MB     00:01
(22/22): kernel-headers-5.14.0-503.21.1.el9_5.x 2.1 MB/s | 4.5 MB     00:02
--------------------------------------------------------------------------------
合計                                            4.3 MB/s |  12 MB     00:02
Oracle Linux 9 BaseOS Latest (x86_64)           1.1 MB/s | 6.2 kB     00:00
GPG 鍵 0x8D8B756F をインポート中:
 Userid     : "Oracle Linux (release key 1) <secalert_us@oracle.com>"
 Fingerprint: 3E6D 826D 3FBA B389 C2F3 8E34 BC4D 06A0 8D8B 756F
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
鍵のインポートに成功しました
GPG 鍵 0x8B4EFBE6 をインポート中:
 Userid     : "Oracle Linux (backup key 1) <secalert_us@oracle.com>"
 Fingerprint: 9822 3175 9C74 6706 5D0C E9B2 A7DD 0708 8B4E FBE6
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
鍵のインポートに成功しました
トランザクションを確認しています
トランザクションの確認に成功しました。
トランザクションをテストしています
トランザクションのテストに成功しました。
トランザクションを実行しています
  準備中           :                                                        1/1
  インストール中   : libnfsidmap-1:2.5.4-27.0.1.el9.x86_64                 1/22
  インストール中   : pcp-conf-6.2.2-7.el9_5.x86_64                         2/22
  インストール中   : pcp-libs-6.2.2-7.el9_5.x86_64                         3/22
  インストール中   : lm_sensors-libs-3.6.0-10.el9.x86_64                   4/22
  インストール中   : sysstat-12.5.4-9.0.2.el9.x86_64                       5/22
  scriptletの実行中: sysstat-12.5.4-9.0.2.el9.x86_64                       5/22
Created symlink /etc/systemd/system/multi-user.target.wants/sysstat.service → /usr/lib/systemd/system/sysstat.service.
Created symlink /etc/systemd/system/sysstat.service.wants/sysstat-collect.timer → /usr/lib/systemd/system/sysstat-collect.timer.
Created symlink /etc/systemd/system/sysstat.service.wants/sysstat-summary.timer → /usr/lib/systemd/system/sysstat-summary.timer.

  インストール中   : libstdc++-devel-11.5.0-2.0.1.el9.x86_64               6/22
  インストール中   : libaio-devel-0.3.111-13.el9.x86_64                    7/22
  インストール中   : ksh-3:1.0.6-4.el9_5.x86_64                            8/22
  scriptletの実行中: ksh-3:1.0.6-4.el9_5.x86_64                            8/22
  インストール中   : kernel-headers-5.14.0-503.21.1.el9_5.x86_64           9/22
  インストール中   : glibc-headers-2.34-125.0.1.el9_5.1.x86_64            10/22
  インストール中   : libxcrypt-devel-4.4.18-3.el9.x86_64                  11/22
  インストール中   : glibc-devel-2.34-125.0.1.el9_5.1.x86_64              12/22
  scriptletの実行中: rpcbind-1.2.6-7.el9.x86_64                           13/22
  インストール中   : rpcbind-1.2.6-7.el9.x86_64                           13/22
  scriptletの実行中: rpcbind-1.2.6-7.el9.x86_64                           13/22
Created symlink /etc/systemd/system/multi-user.target.wants/rpcbind.service → /usr/lib/systemd/system/rpcbind.service.
Created symlink /etc/systemd/system/sockets.target.wants/rpcbind.socket → /usr/lib/systemd/system/rpcbind.socket.

  インストール中   : make-1:4.3-8.el9.x86_64                              14/22
  インストール中   : libnsl-2.34-125.0.1.el9_5.1.x86_64                   15/22
  インストール中   : libev-4.33-5.el9.x86_64                              16/22
  インストール中   : libverto-libev-0.3.2-3.el9.x86_64                    17/22
  インストール中   : gssproxy-0.8.4-7.el9.x86_64                          18/22
  scriptletの実行中: gssproxy-0.8.4-7.el9.x86_64                          18/22
  scriptletの実行中: nfs-utils-1:2.5.4-27.0.1.el9.x86_64                  19/22
  インストール中   : nfs-utils-1:2.5.4-27.0.1.el9.x86_64                  19/22
  scriptletの実行中: nfs-utils-1:2.5.4-27.0.1.el9.x86_64                  19/22
  インストール中   : initscripts-10.11.7-1.0.1.el9.x86_64                 20/22
  scriptletの実行中: initscripts-10.11.7-1.0.1.el9.x86_64                 20/22
Created symlink /etc/systemd/system/sysinit.target.wants/import-state.service → /usr/lib/systemd/system/import-state.service.
Created symlink /etc/systemd/system/sysinit.target.wants/loadmodules.service → /usr/lib/systemd/system/loadmodules.service.

  scriptletの実行中: oracle-database-preinstall-19c-1.0-1.el9.x86_64      21/22
  インストール中   : oracle-database-preinstall-19c-1.0-1.el9.x86_64      21/22
  インストール中   : sssd-nfs-idmap-2.9.5-4.0.1.el9.x86_64                22/22
  scriptletの実行中: oracle-database-preinstall-19c-1.0-1.el9.x86_64      22/22
  scriptletの実行中: sssd-nfs-idmap-2.9.5-4.0.1.el9.x86_64                22/22
  検証中           : gssproxy-0.8.4-7.el9.x86_64                           1/22
  検証中           : initscripts-10.11.7-1.0.1.el9.x86_64                  2/22
  検証中           : libev-4.33-5.el9.x86_64                               3/22
  検証中           : libnfsidmap-1:2.5.4-27.0.1.el9.x86_64                 4/22
  検証中           : libnsl-2.34-125.0.1.el9_5.1.x86_64                    5/22
  検証中           : libverto-libev-0.3.2-3.el9.x86_64                     6/22
  検証中           : make-1:4.3-8.el9.x86_64                               7/22
  検証中           : nfs-utils-1:2.5.4-27.0.1.el9.x86_64                   8/22
  検証中           : rpcbind-1.2.6-7.el9.x86_64                            9/22
  検証中           : sssd-nfs-idmap-2.9.5-4.0.1.el9.x86_64                10/22
  検証中           : glibc-devel-2.34-125.0.1.el9_5.1.x86_64              11/22
  検証中           : glibc-headers-2.34-125.0.1.el9_5.1.x86_64            12/22
  検証中           : kernel-headers-5.14.0-503.21.1.el9_5.x86_64          13/22
  検証中           : ksh-3:1.0.6-4.el9_5.x86_64                           14/22
  検証中           : libaio-devel-0.3.111-13.el9.x86_64                   15/22
  検証中           : libstdc++-devel-11.5.0-2.0.1.el9.x86_64              16/22
  検証中           : libxcrypt-devel-4.4.18-3.el9.x86_64                  17/22
  検証中           : lm_sensors-libs-3.6.0-10.el9.x86_64                  18/22
  検証中           : oracle-database-preinstall-19c-1.0-1.el9.x86_64      19/22
  検証中           : pcp-conf-6.2.2-7.el9_5.x86_64                        20/22
  検証中           : pcp-libs-6.2.2-7.el9_5.x86_64                        21/22
  検証中           : sysstat-12.5.4-9.0.2.el9.x86_64                      22/22

インストール済み:
  glibc-devel-2.34-125.0.1.el9_5.1.x86_64
  glibc-headers-2.34-125.0.1.el9_5.1.x86_64
  gssproxy-0.8.4-7.el9.x86_64
  initscripts-10.11.7-1.0.1.el9.x86_64
  kernel-headers-5.14.0-503.21.1.el9_5.x86_64
  ksh-3:1.0.6-4.el9_5.x86_64
  libaio-devel-0.3.111-13.el9.x86_64
  libev-4.33-5.el9.x86_64
  libnfsidmap-1:2.5.4-27.0.1.el9.x86_64
  libnsl-2.34-125.0.1.el9_5.1.x86_64
  libstdc++-devel-11.5.0-2.0.1.el9.x86_64
  libverto-libev-0.3.2-3.el9.x86_64
  libxcrypt-devel-4.4.18-3.el9.x86_64
  lm_sensors-libs-3.6.0-10.el9.x86_64
  make-1:4.3-8.el9.x86_64
  nfs-utils-1:2.5.4-27.0.1.el9.x86_64
  oracle-database-preinstall-19c-1.0-1.el9.x86_64
  pcp-conf-6.2.2-7.el9_5.x86_64
  pcp-libs-6.2.2-7.el9_5.x86_64
  rpcbind-1.2.6-7.el9.x86_64
  sssd-nfs-idmap-2.9.5-4.0.1.el9.x86_64
  sysstat-12.5.4-9.0.2.el9.x86_64

完了しました!

2-6. oracleユーザのパスワード設定

[root@ol95db19c ~]# passwd oracle
ユーザー oracle のパスワードを変更。
新しい パスワード:
正しくないパスワード: このパスワードは 8 文字未満の文字列です
新しい パスワードを再入力してください:
passwd: すべての認証トークンが正しく更新できました。

2-7. ディレクトリの作成

※ ORACLE_HOMEディレクトリ
[root@ol95db19c ~]# mkdir -p /u01/app/oracle/product/19.3.0/dbhome_1
[root@ol95db19c ~]# chown -R oracle:oinstall /u01
[root@ol95db19c ~]# chmod -R 775 /u01
※ ORACLEインベントリ
[root@ol95db19c ~]# mkdir -p /u01/app/oraInventory
[root@ol95db19c ~]# chown -R oracle:oinstall /u01/app/oraInventory
[root@ol95db19c ~]# chmod -R 775 /u01/app/oraInventory

2-8. オラクル・データベース・ソフトウェアのダウンロード

オラクル・データベース・ソフトウェアのダウンロードサイトから Oracle Database 19c for Linux x86-64 をダウンロード

image.png
ファイル名:LINUX.X64_193000_db_home.zip

2-9. オラクル・データベース・ソフトウェアの配置

oracleユーザで接続
image.png

SSH SCPを選択
image.png

2-7でダウンロードしたファイルを選択し、Send
→ ログインユーザ(oracle)のホームディレクトリに送信
image.png

[oracle@ol95db19c ~]$ ls -la
合計 2988016
drwx------. 3 oracle oinstall        147  1月 16 00:32 .
drwxr-xr-x. 4 root   root             33  1月 16 00:04 ..
-rw-------. 1 oracle oinstall         59  1月 16 00:28 .Xauthority
-rw-r--r--. 1 oracle oinstall         18  5月  1  2024 .bash_logout
-rw-r--r--. 1 oracle oinstall        141  5月  1  2024 .bash_profile
-rw-r--r--. 1 oracle oinstall        492  5月  1  2024 .bashrc
-rw-r--r--. 1 oracle oinstall        172 12月 23 20:31 .kshrc
drwxr-xr-x. 4 oracle oinstall         39  1月 15 00:21 .mozilla
-rw-r--r--. 1 oracle oinstall 3059705302  4月 26  2023 LINUX.X64_193000_db_home.zip

2-10. オラクルデータベースソフトウェアをORACLE_HOMEに解凍

[oracle@ol95db19c ~]$ cd /u01/app/oracle/product/19.3.0/dbhome_1/
[oracle@ol95db19c dbhome_1]$ unzip ~/LINUX.X64_193000_db_home.zip
(中略)
  javavm/lib/security/README.txt -> ../../../javavm/jdk/jdk8/lib/security/README.txt
  javavm/lib/security/java.security -> ../../../javavm/jdk/jdk8/lib/security/java.security
  jdk/jre/lib/amd64/server/libjsig.so -> ../libjsig.so
  
[oracle@ol95db19c dbhome_1]$ ls
OPatch      css          dmu            javavm   nls      owm          root.sh.old.1  srvm
QOpatch     ctx          drdaas         jdbc     odbc     perl         runInstaller   suptools
R           cv           dv             jdk      olap     plsql        schagent.conf  ucp
addnode     data         env.ora        jlib     opmn     precomp      sdk            usm
apex        dbjava       has            ldap     oracore  racg         slax           utl
assistants  dbs          hs             lib      ord      rdbms        sqldeveloper   wwg
bin         deinstall    install        md       ords     relnotes     sqlj           xdk
clone       demo         instantclient  mgw      oss      root.sh      sqlpatch
crs         diagnostics  inventory      network  oui      root.sh.old  sqlplus

→ (3)Opatchインストール

構築手順

7-2_Oracle Databaseインストール事前準備.png

  1. 仮想マシン(Oracle Linux)作成
    1. 仮想マシン作成
    2. Oracle Linux 9.5インストール<
  2. Oracle Databaseインストール事前準備
    1. Oracle Preinstallation RPM実行(Oracleユーザ作成)
    2. ディレクトリ作成
    3. Oracle Database ソフトウェア配置
  3. Opatchインストール
    1. RU配置
    2. Opatchインストール
  4. Oracle Database インストール
  5. データベース作成
0
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
0
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?