CentOS Stream 8
Sponsored Link

Oracle Database 21c : Pre-Requirements2022/02/16

 
Install Oracle Database 21c.
Before Installing, Change some settings for requirements of installing Oracle database on here.
[1] Install required packages.
[root@dlp ~]#
dnf -y install binutils gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgcc libgcc.i686 libstdc++ libstdc++-devel libXi libXtst libnsl make sysstat

[2] Edit Kernel parameters.
[root@dlp ~]#
MEMTOTAL=$(free -b | sed -n '2p' | awk '{print $2}')

[root@dlp ~]#
SHMMAX=$(expr $MEMTOTAL / 2)

[root@dlp ~]#
SHMMNI=4096

[root@dlp ~]#
PAGESIZE=$(getconf PAGE_SIZE)
[root@dlp ~]#
cat > /etc/sysctl.d/50-oracle.conf << EOF
fs.file-max = 6815744
fs.aio-max-nr = 1048576
kernel.sem = 250 32000 100 128
kernel.shmmax = $SHMMAX
kernel.shmall = $(expr \( $SHMMAX / $PAGESIZE \) \* \( $SHMMNI / 16 \))
kernel.shmmni = $SHMMNI
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
net.ipv4.ip_local_port_range = 9000 65500
EOF 

[root@dlp ~]#
sysctl --system

.....
.....
* Applying /etc/sysctl.d/50-oracle.conf ...
fs.file-max = 6815744
fs.aio-max-nr = 1048576
kernel.sem = 250 32000 100 128
kernel.shmmax = 8284053504
kernel.shmall = 517753344
kernel.shmmni = 4096
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
net.ipv4.ip_local_port_range = 9000 65500
.....
.....
[3] Create user and groups for Oracle Database service.
[root@dlp ~]#
i=54321; for group in oinstall dba oper backupdba dgdba kmdba asmdba asmoper asmadmin racdba; do
groupadd -g $i $group; i=$(expr $i + 1)
done
[root@dlp ~]#
useradd -u 54321 -g oinstall -G dba,oper,backupdba,dgdba,kmdba,asmdba,racdba -d /usr/oracle oracle

[root@dlp ~]#
passwd oracle

Changing password for user oracle.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
[root@dlp ~]#
mkdir -p /u01/app/oracle

[root@dlp ~]#
chown -R oracle:oinstall /u01/app

[root@dlp ~]#
chmod -R 755 /u01

[root@dlp ~]#
vi /etc/security/limits.d/50-oracle.conf
# create new

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
oracle   soft   data       unlimited
oracle   hard   data       unlimited
[4] Login as user [oracle] and set environment variables.
dlp login:
oracle
Password:
[oracle@dlp ~]$
vi ~/.bash_profile
# add to the end

umask 022
export ORACLE_BASE=/u01/app/oracle
Matched Content