1.配置 hosts
vi /etc/hosts
-----------------
#public
10.15.66.210 ORACLEN01
10.15.66.211 ORACLEN02
#private
192.168.1.2 ORACLEN01-priv
192.168.1.1 ORACLEN02-priv
#virtual
10.15.66.213 ORACLEN01-vip
10.15.66.214 ORACLEN02-vip
#Scan
10.15.66.215 oracle-scan
#DR
10.65.19.210 ORACLEDR
2.关闭 SELINIX
sed -i 's/^SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config   #需要重启生效
cat /etc/selinux/config
setenforce 0
getenforce
3.关闭防火墙
systemctl stop firewalld.service
systemctl disable firewalld.service
systemctl status firewalld.service
4.关闭透明大页和NUMA
grub2-editenv - list | grep ker
grub2-editenv - set "kernelopts=root=/dev/mapper/rhel-root ro audit=1 audit_backlog_limit=8192 transparent_hugepage=never numa=off"
reboot

输入以下命令进行确认:
cat /sys/kernel.mm/transparent_hugepage/enable
cat /proc/cmdline
gerp AnonHugePages /proc/meminfo
5.修改/etc/sysctl.conf
vi /etc/sysctl.conf
----------
kernel.shmmax =134217727999      #内存*1024*1024*1024-1
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
fs.file-max = 6815744
kernel.shmall =32768000    #内存*1024*1024*1024/4096
net.ipv4.ip_local_port_range = 9000 65500
fs.aio-max-nr = 1048576
-------------

sysctl -p
6.修改/etc/security/limits.conf
vi /etc/security/limits.conf
oracle   soft   nofile    1024
oracle   hard   nofile    65536
oracle   soft   nproc    16384
oracle   hard   nproc    16384
oracle   soft   stack    30720
oracle   hard   stack    32768
oracle   hard   memlock    unlimited
oracle   soft   memlock    unlimited
7.编辑环境变量
vi /etc/profile
------------------------
if [ $USER = "oracle" ]; then
   if [ $SHELL = "/bin/ksh" ]; then
	  ulimit -p 16384
	  ulimit -n 65536
	  else
	  ulimit -u 16384 -n 65536
   fi
fi
-----------------------

source /etc/profile
8.修改/etc/pam.d/login
echo 'session required pam_limits.so' >> /etc/pam.d/login
9.安装必要的package
yum -y install bc
yum -y install binutils
yum -y install elfutils-libelf
yum -y install elfutils-libelf-devel
yum -y install fontconfig-devel
yum -y install gcc
yum -y install gcc-c++
yum -y install glibc
yum -y install glibc-devel
yum -y install ksh
yum -y install libaio
yum -y install libaio-devel
yum -y install libgcc
yum -y install libgfortran
yum -y install libibverbs
yum -y install libnsl
yum -y install libnsl2
yum -y install librdmacm
yum -y install libstdc++
yum -y install libstdc++-devel
yum -y install libxcb
yum -y install libX11
yum -y install libXau
yum -y install libXi
yum -y install libXrender
yum -y install libXtst
yum -y install make
yum -y install policycoreutils
yum -y install policycoreutils-python-utils
yum -y install smartmontools
yum -y install sysstat
yum -y install unzip
yum -y install bind-utils
10、 检查系统语言环境
localectl status|grep LANG
##确认值为:System Locale: LANG=en_US.UTF-8
11、 主机时间、时区检查
timedatectl   #Time zone: Asia/Shanghai (CST, +0800)
12.创建文件目录、用户、用户组
groupadd oinstall
groupadd dba
groupadd oper

useradd oracle
passwd oracle

usermod -g oinstall -G dba,oper oracle

mkdir -p /u01/app/oracle
chmod -R 775 /u01/app/oracle
mkdir -p /u01/app/oraInventory
mkdir -p /u01/app/oracle/product/19.3.0/db
chown -R oracle:oinstall /u01
13.拷贝安装包
#移动数据库安装文件
mv /root/LINUX.X64_193000_db_home.zip /u01/app/oracle/product/19.3.0/db/

#修改数据库安装文件属性
chown -R oracle:oinstall LINUX.X64_193000_db_home.zip
14.配置ORACLE用户环境变量
su - oracle
vi .bash_profile
-------------------
export ORACLE_SID=droracle
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19.3.0/db
export INVENTORY_LOCATION=/u01/app/oraInventory
export TNS_ADMIN=$ORACLE_HOME/network/admin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export NLS_LANG="AMERICAN_AMERICA.AL32UTF8"
export NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"
export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin:$PATH:$HOME/bin:$ORACLE_HOME/perl/bin
export CV_ASSUME_DISTID=RHEL7.8
umask 022
---------------

source .bash_profile
15.使用oracle用户解压安装包
su - oracle
cd $ORACLE_HOME
unzip LINUX.X64_193000_db_home.zip
16.编辑响应文件
[oracle@ORACLEDR db]$ vi install/response droracle.rsp
-------------------------------
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v19.0.0
oracle.install.option=INSTALL_DB_SWONLY
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oraInventory
ORACLE_BASE=/u01/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.OSDBA_GROUP=dba
oracle.install.db.OSOPER_GROUP=oper
oracle.install.db.OSBACKUPDBA_GROUP=dba
oracle.install.db.OSDGDBA_GROUP=dba
oracle.install.db.OSKMDBA_GROUP=dba
oracle.install.db.OSRACDBA_GROUP=dba
oracle.install.db.rootconfig.executeRootScript=false
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
oracle.install.db.ConfigureAsContainerDB=false
oracle.install.db.config.starterdb.memoryOption=false
oracle.install.db.config.starterdb.installExampleSchemas=false
oracle.install.db.config.starterdb.managementOption=DEFAULT
oracle.install.db.config.starterdb.omsPort=0
oracle.install.db.config.starterdb.enableRecovery=false
------------------------
17.部署软件
[oracle@ORACLEDR response]$
./runInstaller -silent -responseFile /u01/app/oracle/product/19.3.0/db/install/response/droracle.rsp -logLevel info

==========执行过程==============
[oracle@CNDLPORA004 db]$ ./runInstaller -silent -responseFile /u01/app/oracle/product/19.3.0/db/install/response/droracle.rsp -logLevel info
Launching Oracle Database Setup Wizard...

The response file for this session can be found at:
 /u01/app/oracle/product/19.3.0/db/install/response/db_2024-04-17_01-58-15PM.rsp

You can find the log of this install session at:
 /tmp/InstallActions2024-04-17_01-58-15PM/installActions2024-04-17_01-58-15PM.log

As a root user, execute the following script(s):
		1. /u01/app/oraInventory/orainstRoot.sh
		2. /u01/app/oracle/product/19.3.0/db/root.sh

Execute /u01/app/oraInventory/orainstRoot.sh on the following nodes:
[CNDLPORA004]
Execute /u01/app/oracle/product/19.3.0/db/root.sh on the following nodes:
[CNDLPORA004]


Successfully Setup Software.
Moved the install session logs to:
 /u01/app/oraInventory/logs/InstallActions2024-04-17_01-58-15PM
============================================
18.执行root脚本
su - root
/u01/app/oraInventory/orainstRoot.sh
/u01/app/oracle/product/19.3.0/db/root.sh