Oracle Database 19cをインストールするためにoracle-database-preinstall-19c-1.0-3.el7.x86_64.rpmをインストールして事前準備を行いました。
RHEL 8にOracle Database 19cをインストール – Oracle Database Preinstallation
今回はRPMパッケージを使用してOracle Databaseをインストールしてみたいと思います。
環境
・Red Hat Enterprise Linux release 8.5 (Ootpa)
・Kernel 4.18.0-348.7.1.el8_5.x86_64
・oracle-database-preinstall-19c-1.0-3.el7.x86_64.rpm
・開発環境、GNOME環境、日本語入力インストール
・Subscription登録
- RPMパッケージのダウンロード
- 必要なプログラムのインストール
- oracle-database-ee-19c-1.0-1.x86_64.rpmのインストール
- /etc/hostsに追加
- configure
下記サイトからoracle-database-ee-19c-1.0-1.x86_64.rpmをダウンロードします。
ダウンロードにはOracleプロファイルへのサインインが必要です。
Oracle Database 19c (19.3) for Linux x86-64 (RPM)
https://www.oracle.com/database/technologies/oracle19c-linux-downloads.html
下記サイトに必要なプログラムの記載があります。これをインストールします。
Supported Red Hat Enterprise Linux 8 Distributions for x86-64
https://docs.oracle.com/en/database/oracle/oracle-database/19/ladbi/supported-red-hat-enterprise-linux-8-distributions-for-x86-64.html#GUID-B1487167-84F8-4F8D-AC31-A4E8F592374B
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
[root@rhel8 ~]# dnf install bc binutils elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio libaio-devel libXrender libX11 libXau libXi libXtst libgcc libnsl librdmacm libstdc++ libstdc++-devel libxcb libibverbs make policycoreutils policycoreutils-python-utils smartmontools sysstat Updating Subscription Management repositories. Package bc-1.07.1-5.el8.x86_64 is already installed. Package binutils-2.30-108.el8_5.1.x86_64 is already installed. Package elfutils-libelf-0.185-1.el8.x86_64 is already installed. Package elfutils-libelf-devel-0.185-1.el8.x86_64 is already installed. Package glibc-2.28-164.el8.x86_64 is already installed. Package glibc-devel-2.28-164.el8.x86_64 is already installed. Package ksh-20120801-254.el8.x86_64 is already installed. Package libaio-0.3.112-1.el8.x86_64 is already installed. Package libaio-devel-0.3.112-1.el8.x86_64 is already installed. Package libXrender-0.9.10-7.el8.x86_64 is already installed. Package libX11-1.6.8-5.el8.x86_64 is already installed. Package libXau-1.0.9-3.el8.x86_64 is already installed. Package libXi-1.7.10-1.el8.x86_64 is already installed. Package libXtst-1.2.3-7.el8.x86_64 is already installed. Package libgcc-8.5.0-4.el8_5.x86_64 is already installed. Package librdmacm-35.0-1.el8.x86_64 is already installed. Package libstdc++-8.5.0-4.el8_5.x86_64 is already installed. Package libstdc++-devel-8.5.0-4.el8_5.x86_64 is already installed. Package libxcb-1.13.1-1.el8.x86_64 is already installed. Package libibverbs-35.0-1.el8.x86_64 is already installed. Package make-1:4.2.1-10.el8.x86_64 is already installed. Package policycoreutils-2.9-16.el8.x86_64 is already installed. Package policycoreutils-python-utils-2.9-16.el8.noarch is already installed. Package smartmontools-1:7.1-1.el8.x86_64 is already installed. Package sysstat-11.7.3-6.el8.x86_64 is already installed. Dependencies resolved. ================================================================================================= Package Arch Version Repository Size ================================================================================================= Installing: fontconfig-devel x86_64 2.13.1-4.el8 rhel-8-for-x86_64-baseos-rpms 151 k libnsl x86_64 2.28-164.el8 rhel-8-for-x86_64-baseos-rpms 103 k Installing dependencies: bzip2-devel x86_64 1.0.6-26.el8 rhel-8-for-x86_64-baseos-rpms 224 k expat-devel x86_64 2.2.5-4.el8 rhel-8-for-x86_64-baseos-rpms 55 k freetype-devel x86_64 2.9.1-4.el8_3.1 rhel-8-for-x86_64-baseos-rpms 464 k libpng-devel x86_64 2:1.6.34-5.el8 rhel-8-for-x86_64-baseos-rpms 328 k libuuid-devel x86_64 2.32.1-28.el8 rhel-8-for-x86_64-baseos-rpms 97 k Transaction Summary ================================================================================================= Install 7 Packages Total download size: 1.4 M Installed size: 4.6 M Is this ok [y/N]: y Downloading Packages: (1/7): expat-devel-2.2.5-4.el8.x86_64.rpm 138 kB/s | 55 kB 00:00 (2/7): libpng-devel-1.6.34-5.el8.x86_64.rpm 648 kB/s | 328 kB 00:00 (3/7): bzip2-devel-1.0.6-26.el8.x86_64.rpm 408 kB/s | 224 kB 00:00 (4/7): freetype-devel-2.9.1-4.el8_3.1.x86_64.rpm 1.2 MB/s | 464 kB 00:00 (5/7): libuuid-devel-2.32.1-28.el8.x86_64.rpm 338 kB/s | 97 kB 00:00 (6/7): libnsl-2.28-164.el8.x86_64.rpm 212 kB/s | 103 kB 00:00 (7/7): fontconfig-devel-2.13.1-4.el8.x86_64.rpm 584 kB/s | 151 kB 00:00 ------------------------------------------------------------------------------------------------- Total 1.3 MB/s | 1.4 MB 00:01 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : libuuid-devel-2.32.1-28.el8.x86_64 1/7 Installing : expat-devel-2.2.5-4.el8.x86_64 2/7 Installing : libpng-devel-2:1.6.34-5.el8.x86_64 3/7 Installing : bzip2-devel-1.0.6-26.el8.x86_64 4/7 Installing : freetype-devel-2.9.1-4.el8_3.1.x86_64 5/7 Installing : fontconfig-devel-2.13.1-4.el8.x86_64 6/7 Installing : libnsl-2.28-164.el8.x86_64 7/7 Running scriptlet: libnsl-2.28-164.el8.x86_64 7/7 Verifying : bzip2-devel-1.0.6-26.el8.x86_64 1/7 Verifying : libpng-devel-2:1.6.34-5.el8.x86_64 2/7 Verifying : expat-devel-2.2.5-4.el8.x86_64 3/7 Verifying : freetype-devel-2.9.1-4.el8_3.1.x86_64 4/7 Verifying : libnsl-2.28-164.el8.x86_64 5/7 Verifying : libuuid-devel-2.32.1-28.el8.x86_64 6/7 Verifying : fontconfig-devel-2.13.1-4.el8.x86_64 7/7 Installed products updated. Installed: bzip2-devel-1.0.6-26.el8.x86_64 expat-devel-2.2.5-4.el8.x86_64 fontconfig-devel-2.13.1-4.el8.x86_64 freetype-devel-2.9.1-4.el8_3.1.x86_64 libnsl-2.28-164.el8.x86_64 libpng-devel-2:1.6.34-5.el8.x86_64 libuuid-devel-2.32.1-28.el8.x86_64 Complete! |
ダウンロードしたoracle-database-ee-19c-1.0-1.x86_64.rpmをRHEL8にコピーしてインストールします。
1 2 3 4 5 6 7 8 |
[root@rhel8 ~]# rpm -ivh oracle-database-ee-19c-1.0-1.x86_64.rpm Verifying... ################################# [100%] Preparing... ################################# [100%] Updating / installing... 1:oracle-database-ee-19c-1.0-1 ################################# [100%] [INFO] Executing post installation scripts... [INFO] Oracle home installed successfully and ready to be configured. To configure a sample Oracle Database you can execute the following service configuration script as root: /etc/init.d/oracledb_ORCLCDB-19c configure |
configureの前にhostsに登録します。
1 2 3 4 5 |
[root@rhel8 ~]# vi /etc/hosts [root@rhel8 ~]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.1.2 rhel8 rhel8.rootlinks.net |
“rhel8.rootlinks.net”だけだと既にポートが使用されているのエラーでダメでした。
これで1日悩んだ(^^;
1 2 3 4 5 6 |
[root@rhel8 ~]# /etc/init.d/oracledb_ORCLCDB-19c configure Configuring Oracle Database ORCLCDB. [FATAL] [DBT-06103] The port (1,521) is already in use. ACTION: Specify a free port. Database configuration failed. |
エラーが発生した場合は”rhel8 rhel8.rootlinks.net”のようにホスト名とFQDNを記載してみて下さい。
Databaseを作成して初期設定を行います。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
[root@rhel8 ~]# /etc/init.d/oracledb_ORCLCDB-19c configure Configuring Oracle Database ORCLCDB. Prepare for db operation 8% complete Copying database files 31% complete Creating and starting Oracle instance 32% complete 36% complete 40% complete 43% complete 46% complete Completing Database Creation 51% complete 54% complete Creating Pluggable Databases 58% complete 77% complete Executing Post Configuration Actions 100% complete Database creation complete. For details check the logfiles at: /opt/oracle/cfgtoollogs/dbca/ORCLCDB. Database Information: Global Database Name:ORCLCDB System Identifier(SID):ORCLCDB Look at the log file "/opt/oracle/cfgtoollogs/dbca/ORCLCDB/ORCLCDB1.log" for further details. Database configuration completed successfully. The passwords were auto generated, you must change them by connecting to the database using 'sqlplus / as sysdba' as the oracle user. |