2019-05-18 | Adam Boliński

Install Oracle 19c on RHEL 8

Install Oracle 19c on RHEL 8

In this post I would like to present how to install Oracle 19c (but it is also suitable for Oracle 18c) in new fresh RHEL 8.

Why RHEL 8 ? Most important for me is to have natively kernel 4 and eBPF/bcc support, but of course there is a lot more in new functionality than that.

OK so lets start to install Oracle 19c in two ways, manual way and automatic way.

To be fair I will present two ways but I like more automatic way.

First of all for both install way we should disable Transparent Huge Pages for both install method.


# nano /etc/rc.local
echo never > /sys/kernel/mm/transparent_hugepage/enabled
# chmod +x /etc/rc.d/rc.local

So let’s try in first place do it in manual way.

Install required packages

# yum install bc binutils elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio libaio-devel libgcc libnsl librdmacm-devel libstdc++ libstdc++-devel libX11 libXau libxcb libXi libXrender libXrender-devel libXtst make net-tools nfs-utils python3 python3-configshell python3-rtslib python3-six smartmontools sysstat targetcli unzip

Sysctl

# Oracle Settings

fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500

# sysctl -p

Limits

# nano /etc/security/limits.d/97-oracle.conf

oracle   soft   nofile     1024
oracle   hard   nofile     65536
oracle   soft   nproc      16384
oracle   hard   nproc      16384
oracle   soft   stack      10240
oracle   hard   stack      32768
oracle   hard   memlock    134217728
oracle   soft   memlock    134217728

Groups and Users

groupadd -g 1001 oinstall
groupadd -g 1002 dba
groupadd -g 1003 oper

useradd -u 1001 -g oinstall -G dba,oper oracle
passwd oracle

Disable SELinux

# nano /etc/selinux/config
SELINUX=disabled

Disable Firewall

# systemctl stop firewalld
# systemctl disable firewalld

Create Directories

# mkdir -p /u01/app/oracle/product/19.3/dbhome_1
# chown -R oracle:oinstall /u01
# chmod -R 775 /u01

Unzip Oracle Home Installer

ssh -Y oracle@ora_machine
cd /u01/app/oracle/product/19.3/dbhome_1
unzip /tmp/LINUX.X64_193000_db_home.zip

If you think that it the end there will be unpleasant surprise for you after execute runInstaller :

There is no Override OS Check switch in runInstaller so we must resolve this in different way :

export CV_ASSUME_DISTID=OEL7.6

After that we won’t have a problem with installing Oracle 19c on RHEL 8.

Automatic Mode

For those of you that would like to install Oracle 19c in automatic way I will present how I do it.

We will be using preinstall rpm

oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm

But we will get error about missing packages compat-libstdc++ and compat-libcap1, this package was removed from RHEL 8 but you can still install from RHEL 7/CentOS 7

wget http://mirror.centos.org/centos/7/os/x86_64/Packages/compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm
wget http://mirror.centos.org/centos/7/os/x86_64/Packages/compat-libcap1-1.10-7.el7.x86_64.rpm

yum localinstall compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm
yum localinstall compat-libcap1-1.10-7.el7.x86_64.rpm
yum localinstall oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm

This is all we must to do it to bypass this manual setup but please remember we still must do an export

export CV_ASSUME_DISTID=OEL7.6