Hello, in the past weeks Oracle informed that it supports its version 19.19 for RedHat 9 and Oracle Linux 9 platforms. In this writing, I will use RPM method, which I haven't experienced before, when installing 19c on OL9.3. Hope you will enjoy it.
PREREQUISITES
Before starting, Oracle Linux 9 operating system must be installed. You may download ISO file through this link. Also, minimum supported kernel levels are as follows:
1- Oracle Linux 9 Unbreakable Enterprise Kernel 7:
Minimum 5.15.0-1.43.4.2.el9uek.x86_64 or later.
2- Oracle Linux 9 Red Hat Compatible kernel:
Minimum 5.14.0-70.22.1.0.2.el9_0.x86_64 or later.
You may visit Oracle Downloads and My Oracle Support to reach other required files. Files required for installation:
Oracle Software (RPM) - oracle-database-ee-19c-1.0-1.x86_64.rpm
Patch 35775632 - p35775632_190000_Linux-x86-64
OPatch - p6880880_190000_Linux-x86-64 (12.2.0.1.37 or later)
19.19 Release Update - p35042068_190000_Linux-x86-64
Merge Patch 35859251 - p35859251_1919000DBRU_Linux-x86-64
NOTE: It is not possible to use Oracle ASM library with OL9 and RHEL9. Rather, Udev may be preferred to configure ASM discs.
Installation Steps
Update the operating system.
# yum -y update
Go to selinux config file and set "SELINUX=disabled".
# vi /etc/selinux/config
Disable firewall.
# systemctl disable firewalld.service --now
Reboot the server.
# reboot
Install Oracle preinstall package and that way kernel, memory, user, group etc. will be set.
# yum install -y oracle-database-preinstall-19c
Create a password for oracle user.
# passwd oracle
Install Oracle Software RPM which you downloaded with root user. Oracle enables us to install "Software Only" with one command. It also runs root scripts itself. For the installations made with RPM, rather than the standard Oracle Base "/u01/app/oracle" which we are used to, "/opt/oracle" index is used; be careful about that.
# chmod 777 oracle-database-ee-19c-1.0-1.x86_64.rpm
# yum -y localinstall oracle-database-ee-19c-1.0-1.x86_64.rpm
If you see the screen below at the end of the installation, that means installation is successfully completed.
Give ownership of the zip files you downloaded with root user to the oracle user.
# cd /tmp
# chown oracle.oinstall *.zip
Switch to oracle user and create your files on the profile.
# su - oracle
$ vi .profile_db
ORACLE_HOSTNAME=data4tech; export ORACLE_HOSTNAME
ORACLE_UNQNAME=ORCLCDB; export ORACLE_UNQNAME
ORACLE_BASE=/opt/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/19c/dbhome_1; export ORACLE_HOME
ORACLE_SID=ORCLCDB; export ORACLE_SID
BASE_PATH=/usr/sbin:$PATH; export BASE_PATH
PATH=$ORACLE_HOME/bin:$PATH:$ORACLE_HOME/OPatch:$BASE_PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
$ vi .bash_profile
. .profile_db
Update OPatch version. It should be minimum 12.2.0.1.37.
$ mv /opt/oracle/product/19c/dbhome_1/OPatch /opt/oracle/product/19c/dbhome_1/OPatch_old
$ unzip /tmp/p6880880_190000_Linux-x86-64.zip -d /opt/oracle/product/19c/dbhome_1
Check OPatch version. Continue if it succeeded.
$ opatch version
Apply STUBS.TAR patch which fixes Bug 33794281 for Oracle Linux 9.
$ unzip p35775632_190000_Linux-x86-64.zip
$ mv stubs.tar /opt/oracle/product/19c/dbhome_1/lib/stubs/
$ cd /opt/oracle/product/19c/dbhome_1/lib/stubs/
$ tar -xf stubs.tar
Unzip 19.19 DB RU.
$ unzip p35042068_190000_Linux-x86-64.zip
Apply Conflict Check and proceed if there is no problem.
$ cd 35042068/
$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Apply 19.19 DB RU. Answer 'y' for the question 'Do you want to proceed?'.
$ opatch apply
Unzip Merge Patch to apply which involves other bugs in the19.19 version.
$ unzip p35859251_1919000DBRU_Linux-x86-64.zip
Apply Conflict Check again and proceed if there is no problem.
$ cd 35859251/
$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./
$ opatch apply
Run the command "relink all" which is in the Post-patch step.
$ /opt/oracle/product/19c/dbhome_1/bin/relink all
If you have applied all patches successfully, "opatch lspatches" should be as below.
$ opatch lspatches
Now, you are ready to use Oracle 19c database as supported in the Oracle Linux 9 operating system. After this step, you may make database installation with the dbca graphical interface, as you are used to. However, in this writing we will test automatic db installation which comes with the installation of RPM. With this method, Oracle installs a standard CDB database for us with one command in 15 minutes and there is a default PDB present.
$ /etc/init.d/oracledb_ORCLCDB-19c configure
Connect to the database as sysdba and check the version.
$ sqlplus / as sysdba
SQL> select banner_full from v$version;
Since SYS password is auto-generated during database installation, change your password for once after the installation.
SQL> alter user sys identified by "<PASSWORD>";
Database and listener may be turned on and off as a service, this is also something new that comes with the installation of RPM. I liked this update, it maintains easy use. The command can be run with root or oracle user.
$ systemctl stop oracledb_ORCLCDB-19c.service
$ systemctl start oracledb_ORCLCDB-19c.service
Also, to ensure that oracle service runs automatically at start, you may add the line below to the oracle crontab.
$ crontab -e
@reboot systemctl start oracledb_ORCLDB-19c.service
Among the Oracle Linux 9 - Red Hat 9 operating system experiences, what caught my attention and liked the most was seeing this Turkish (Ottoman) keyboard. :)
This is how my writing "Installing Oracle 19c with RPM on Linux 9.3" ends. We have examined Oracle Linux 9 operating system and installing Oracle database with RPM while also applying DBRU and certain patch processes. I hope it's beneficial for you.
See you in new writings, take care...