暂无图片
暂无图片
13
暂无图片
暂无图片
暂无图片

靓野!19C RAC静默安装,linux_x86 超详细

原创 阿林哥 2021-07-15
6555

前言

通常我们DBA去部署一套RAC,操作系统和共享存储会配好,存储方便基本都是多路径,多路径软件建议部署存储厂商的多路径软件,例如EMC的Powerpath,华为的Ultrapath等,当然也可以安装第三方多路径软件,例如红帽的Multipath。所以对磁盘的使用是多路径软件汇聚出来的盘符。

Note:共享存储模拟,可以参考我前面的写的openfiler,https://www.modb.pro/db/84359

环境信息:

操作系统:Oracle linux 7.8
数据库版本:19.3

一、操作系统配置

1、关闭selinux

vi /etc/selinux/config

...
SELINUX=disabled
...

Note:需要重启操作系统

2、配置好主机名与域名解析

[root@19c-h1 ~]# cat /etc/hostname 
19c-h1
[root@19c-h1 ~]# 

修改hosts文件

[root@19c-h1 ~]# vi /etc/hosts

172.172.30.161	19c-h1.alinge.com 19c-h1
172.172.30.162	19c-h2.alinge.com 19c-h2
172.172.30.163	19c-h1-vip.alinge.com 19c-h1-vip
172.172.30.164	19c-h2-vip.alinge.com 19c-h2-vip
172.172.30.165	wldb-scan.alinge.com wldb-scan
10.10.10.1	19c-h1-priv.alinge.com 19c-h1-priv
10.10.10.2	19c-h2-priv.alinge.com 19c-h2-priv

Note:往往系统工程师交付主机过来主机名是没有配置的。这里采用本地解析的方式,不写域也可以。

3、关闭防火墙

systemctl stop firewalld.service
systemctl disable firewalld.service
systemctl status firewalld.service

4、配置yum源

cd /etc/yum.repos.d/
mkdir bak
mv * bak
vi server.repo

[server]
name=rhel7.8
baseurl=file:///mnt
enable=1
gpgcheck=0

挂盘

[root@19c-h1 ~]# mount /dev/sr0 /mnt
mount: /dev/sr0 is write-protected, mounting read-only
[root@19c-h1 ~]# 


5、安装依赖包

yum install -y bc binutils* compat-libcap1* compat-libstdc* elfutils-libelf* elfutils-libelf-devel* fontconfig-devel* glibc* glibc-devel* ksh libaio* libaio-devel* libX11* libXau* libXi* libXtst* libXrender* libXrender-devel* libgcc* libstdc++* libstdc++-devel* libxcb* make net-tools nfs-utils smartmontools sysstat unixODBC gcc gcc-c++ python python-configshell python-rtslib python-six targetcli


4、关闭avahi-daemon

systemctl stop avahi-daemon
systemctl disable avahi-daemon
systemctl status avahi-daemon

5、配置NTP

mv /etc/chrony.conf /etc/chrony.conf.org

Note:这里无ntp服务器,生产环境建议进行配置

6、修改网络参数

[root@19c-h1 ~]# vi /etc/sysconfig/network

NOZEROCONF=yes

7、(可选)禁用虚拟网卡

systemctl stop libvirtd
systemctl disable libvirtd

Note:服务器配置虚拟化的一个桥接网卡,virbr0,用处不大

8、关闭透明大页

[root@19c-h1 ~]# cat /sys/kernel/mm/transparent_hugepage/enabled 
[always] madvise never

Note:状态要改成never

[root@19c-h1 ~]# vi /etc/default/grub

GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=auto rhgb quiet numa=off transparent_hugepage=never"
GRUB_DISABLE_RECOVERY="true"

Note:transparent_hugepage=never附加在最后

[root@19c-h1 ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.14.35-1902.300.11.el7uek.x86_64
Found initrd image: /boot/initramfs-4.14.35-1902.300.11.el7uek.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-1127.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-1127.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-30045c81c5f94350aadd5efe9ad1f19f
Found initrd image: /boot/initramfs-0-rescue-30045c81c5f94350aadd5efe9ad1f19f.img
done
[root@19c-h1 ~]# 
[root@19c-h1 ~]# inti 6

[root@19c-h1 ~]# cat /sys/kernel/mm/transparent_hugepage/enabled 
always madvise [never]
[root@19c-h1 ~]# 

Note:可以看到状态变为never了。

9、配置内核参数

[root@19c-h1 ~]# vi /etc/sysctl.conf 


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

生效

[root@19c-h2 yum.repos.d]# sysctl -p
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
[root@19c-h2 yum.repos.d]# 


Note:可以根据实际情况调优。

10、配置资源限制

[root@19c-h1 ~]# vi /etc/security/limits.conf 

grid   soft   nofile   1024
grid   hard   nofile   65536
grid   soft   nproc    16384
grid   hard   nproc    16384
grid  soft  stack  10240
grid  soft  memlock  3145728
grid  hard  memlock  3145728
oracle   soft   nofile   1024
oracle   hard   nofile   65536
oracle   soft   nproc    16384
oracle   hard   nproc    16384
oracle  soft  memlock  3145728
oracle  hard  memlock  3145728
oracle  soft  stack  10240

Note:可以根据实际情况调优。

11、创建用户和组

组:

groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
groupadd -g 54324 backupdba
groupadd -g 54325 dgdba
groupadd -g 54326 kmdba
groupadd -g 54327 asmdba
groupadd -g 54328 asmoper
groupadd -g 54329 asmadmin
groupadd -g 54330 racdba

用户:

useradd -u 54321 -g oinstall -G dba,oper,backupdba,dgdba,kmdba,asmdba,racdba,asmadmin oracle
useradd -u 54322 -g oinstall -G asmdba,asmoper,asmadmin,racdba grid

改密码:

passwd oracle
passwd grid

12、创建目录

mkdir -p /oracle/app/oraInventory
mkdir -p /oracle/app/19.0.0/grid
mkdir -p /oracle/app/grid
mkdir -p /oracle/app/oracle/product/19.0.0/dbhome_1
chown -R grid:oinstall /oracle
chown -R oracle:oinstall /oracle/app/oracle
chmod -R 775 /oracle

13、配置用户环境变量

grid用户

umask 022
export PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
export LD_LIBRARY_PATH=/usr/lib:/usr/X11R6/lib
export ORACLE_SID=+ASM1
export ORACLE_BASE=/oracle/app/grid
export ORACLE_HOME=/oracle/app/19.0.0/grid
export LD_LIBRARY_PATH=$ORACLE_HOME/rdbms/lib:$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin:$PATH

oracle用户

umask 022
export PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
export LD_LIBRARY_PATH=/usr/lib:/usr/X11R6/lib
export ORACLE_BASE=/oracle/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19.0.0/dbhome_1
export ORACLE_SID=wldb1
export ORACLE_UNQNAME=wldb
export LD_LIBRARY_PATH=$ORACLE_HOME/rdbms/lib:$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin:$PATH

14、UDEV绑定asm磁盘

规则生成

for i in b c d e f g ;
do
echo "KERNEL==\"sd*\", SUBSYSTEM==\"block\", PROGRAM==\"/usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/\$name\", RESULT==\"`/usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/sd$i`\", SYMLINK+=\"asm_disk$i\", OWNER=\"grid\", GROUP=\"asmadmin\", MODE=\"0660\""      
done

Note:写法很多,萝卜青菜各有所爱。

编辑规则文件
vi /etc/udev/rules.d/99-oracle-asmdevices.rules

KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="14f504e46494c45524c347234514c2d424e77742d5762374f", SYMLINK+="asm_vote01", OWNER="grid", GROUP="asmadmin", MODE="0660"      
KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="14f504e46494c45525735446651542d367170502d70386255", SYMLINK+="asm_vote02", OWNER="grid", GROUP="asmadmin", MODE="0660"      
KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="14f504e46494c45527953307075692d304152612d4d386550", SYMLINK+="asm_vote03", OWNER="grid", GROUP="asmadmin", MODE="0660"       
KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="14f504e46494c4552584f536353672d7432654c2d7a317777", SYMLINK+="asm_arch01", OWNER="grid", GROUP="asmadmin", MODE="0660"      
KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="14f504e46494c4552584f745769682d4e74534f2d45596a69", SYMLINK+="asm_data01", OWNER="grid", GROUP="asmadmin", MODE="0660"

Note:修改下磁盘名称,容易辨认。

启动

[root@19c-h2 ~]# systemctl restart systemd-udev-trigger.service
[root@19c-h2 ~]# 
[root@19c-h2 ~]# 
查看
[root@19c-h1 ~]# ll /dev/asm*
lrwxrwxrwx 1 root root 3 Jul 15 22:20 /dev/asm_arch01 -> sde
lrwxrwxrwx 1 root root 3 Jul 15 22:20 /dev/asm_data01 -> sdf
lrwxrwxrwx 1 root root 3 Jul 15 22:20 /dev/asm_vote01 -> sdb
lrwxrwxrwx 1 root root 3 Jul 15 22:10 /dev/asm_vote02 -> sdc
lrwxrwxrwx 1 root root 3 Jul 15 22:10 /dev/asm_vote03 -> sdd
[root@19c-h1 ~]# 



15、解压安装包

gi软件
[grid@19c-h1 ~]$ ll
total 2821472
-rw-r--r--. 1 grid oinstall 2889184573 Jul 15 17:35 LINUX.X64_193000_grid_home.zip
[grid@19c-h1 ~]$ 
[grid@19c-h1 ~]$ unzip -d /oracle/app/19.0.0/grid/ LINUX.X64_193000_grid_home.zip 

db软件
[oracle@19c-h1 ~]$ ll
total 2987996
-rw-r--r--. 1 oracle oinstall 3059705302 Jul 15 17:35 LINUX.X64_193000_db_home.zip
[oracle@19c-h1 ~]$ 
[oracle@19c-h1 ~]$ unzip -d /oracle/app/oracle/product/19.0.0/dbhome_1/ LINUX.X64_193000_db_home.zip 

Note:解压就是软件的home目录

16、配置SSH免密

grid用户
$ORACLE_HOME/oui/prov/resources/scripts/sshUserSetup.sh -user grid  -hosts "19c-h1 19c-h2"  -advanced -noPromptPassphrase

oracle用户
$ORACLE_HOME/oui/prov/resources/scripts/sshUserSetup.sh -user oracle  -hosts "19c-h1 19c-h2"  -advanced -noPromptPassphrase

Note:输入yes,输入4次密码即可。

二、GI软件安装

1、校验与修复

[grid@19c-h1 ~]$ cd $ORACLE_HOME
[grid@19c-h1 ~]$ ./runcluvfy.sh stage -pre crsinst -n 19c-h1,19c-h2 -verbose -fixup

修复

[root@19c-h1 ~]# /tmp/CVU_19.0.0.0.0_grid/runfixup.sh
All Fix-up operations were completed successfully.

[root@19c-h2 ~]# /tmp/CVU_19.0.0.0.0_grid/runfixup.sh
All Fix-up operations were completed successfully.

再次校验

[grid@19c-h1 grid]$ ./runcluvfy.sh stage -pre crsinst -n 19c-h1,19c-h2 -verbose 

Verifying Physical Memory ...
  Node Name     Available                 Required                  Status    
  ------------  ------------------------  ------------------------  ----------
  19c-h2        7.7565GB (8133276.0KB)    8GB (8388608.0KB)         passed    
  19c-h1        7.7565GB (8133268.0KB)    8GB (8388608.0KB)         passed    
Verifying Physical Memory ...PASSED
Verifying Available Physical Memory ...
  Node Name     Available                 Required                  Status    
  ------------  ------------------------  ------------------------  ----------
  19c-h2        7.2417GB (7593476.0KB)    50MB (51200.0KB)          passed    
  19c-h1        6.8663GB (7199848.0KB)    50MB (51200.0KB)          passed    
Verifying Available Physical Memory ...PASSED
Verifying Swap Size ...
  Node Name     Available                 Required                  Status    
  ------------  ------------------------  ------------------------  ----------
  19c-h2        17GB (1.7825788E7KB)      7.7565GB (8133276.0KB)    passed    
  19c-h1        17GB (1.7825788E7KB)      7.7565GB (8133268.0KB)    passed    
Verifying Swap Size ...PASSED
Verifying Free Space: 19c-h2:/usr,19c-h2:/var,19c-h2:/etc,19c-h2:/sbin,19c-h2:/tmp ...
  Path              Node Name     Mount point   Available     Required      Status      
  ----------------  ------------  ------------  ------------  ------------  ------------
  /usr              19c-h2        /             82.0557GB     25MB          passed      
  /var              19c-h2        /             82.0557GB     5MB           passed      
  /etc              19c-h2        /             82.0557GB     25MB          passed      
  /sbin             19c-h2        /             82.0557GB     10MB          passed      
  /tmp              19c-h2        /             82.0557GB     1GB           passed      
Verifying Free Space: 19c-h2:/usr,19c-h2:/var,19c-h2:/etc,19c-h2:/sbin,19c-h2:/tmp ...PASSED
Verifying Free Space: 19c-h1:/usr,19c-h1:/var,19c-h1:/etc,19c-h1:/sbin,19c-h1:/tmp ...
  Path              Node Name     Mount point   Available     Required      Status      
  ----------------  ------------  ------------  ------------  ------------  ------------
  /usr              19c-h1        /             63.206GB      25MB          passed      
  /var              19c-h1        /             63.206GB      5MB           passed      
  /etc              19c-h1        /             63.206GB      25MB          passed      
  /sbin             19c-h1        /             63.206GB      10MB          passed      
  /tmp              19c-h1        /             63.206GB      1GB           passed      
Verifying Free Space: 19c-h1:/usr,19c-h1:/var,19c-h1:/etc,19c-h1:/sbin,19c-h1:/tmp ...PASSED
Verifying User Existence: grid ...
  Node Name     Status                    Comment                 
  ------------  ------------------------  ------------------------
  19c-h2        passed                    exists(54322)           
  19c-h1        passed                    exists(54322)           

  Verifying Users With Same UID: 54322 ...PASSED
Verifying User Existence: grid ...PASSED
Verifying Group Existence: asmadmin ...
  Node Name     Status                    Comment                 
  ------------  ------------------------  ------------------------
  19c-h2        passed                    exists                  
  19c-h1        passed                    exists                  
Verifying Group Existence: asmadmin ...PASSED
Verifying Group Existence: asmdba ...
  Node Name     Status                    Comment                 
  ------------  ------------------------  ------------------------
  19c-h2        passed                    exists                  
  19c-h1        passed                    exists                  
Verifying Group Existence: asmdba ...PASSED
Verifying Group Existence: oinstall ...
  Node Name     Status                    Comment                 
  ------------  ------------------------  ------------------------
  19c-h2        passed                    exists                  
  19c-h1        passed                    exists                  
Verifying Group Existence: oinstall ...PASSED
Verifying Group Membership: asmdba ...
  Node Name         User Exists   Group Exists  User in Group  Status          
  ----------------  ------------  ------------  ------------  ----------------
  19c-h2            yes           yes           yes           passed          
  19c-h1            yes           yes           yes           passed          
Verifying Group Membership: asmdba ...PASSED
Verifying Group Membership: asmadmin ...
  Node Name         User Exists   Group Exists  User in Group  Status          
  ----------------  ------------  ------------  ------------  ----------------
  19c-h2            yes           yes           yes           passed          
  19c-h1            yes           yes           yes           passed          
Verifying Group Membership: asmadmin ...PASSED
Verifying Group Membership: oinstall(Primary) ...
  Node Name         User Exists   Group Exists  User in Group  Primary       Status      
  ----------------  ------------  ------------  ------------  ------------  ------------
  19c-h2            yes           yes           yes           yes           passed      
  19c-h1            yes           yes           yes           yes           passed      
Verifying Group Membership: oinstall(Primary) ...PASSED
Verifying Run Level ...
  Node Name     run level                 Required                  Status    
  ------------  ------------------------  ------------------------  ----------
  19c-h2        5                         3,5                       passed    
  19c-h1        5                         3,5                       passed    
Verifying Run Level ...PASSED
Verifying Hard Limit: maximum open file descriptors ...
  Node Name         Type          Available     Required      Status          
  ----------------  ------------  ------------  ------------  ----------------
  19c-h2            hard          65536         65536         passed          
  19c-h1            hard          65536         65536         passed          
Verifying Hard Limit: maximum open file descriptors ...PASSED
Verifying Soft Limit: maximum open file descriptors ...
  Node Name         Type          Available     Required      Status          
  ----------------  ------------  ------------  ------------  ----------------
  19c-h2            soft          1024          1024          passed          
  19c-h1            soft          1024          1024          passed          
Verifying Soft Limit: maximum open file descriptors ...PASSED
Verifying Hard Limit: maximum user processes ...
  Node Name         Type          Available     Required      Status          
  ----------------  ------------  ------------  ------------  ----------------
  19c-h2            hard          16384         16384         passed          
  19c-h1            hard          16384         16384         passed          
Verifying Hard Limit: maximum user processes ...PASSED
Verifying Soft Limit: maximum user processes ...
  Node Name         Type          Available     Required      Status          
  ----------------  ------------  ------------  ------------  ----------------
  19c-h2            soft          16384         2047          passed          
  19c-h1            soft          16384         2047          passed          
Verifying Soft Limit: maximum user processes ...PASSED
Verifying Soft Limit: maximum stack size ...
  Node Name         Type          Available     Required      Status          
  ----------------  ------------  ------------  ------------  ----------------
  19c-h2            soft          10240         10240         passed          
  19c-h1            soft          10240         10240         passed          
Verifying Soft Limit: maximum stack size ...PASSED
Verifying Architecture ...
  Node Name     Available                 Required                  Status    
  ------------  ------------------------  ------------------------  ----------
  19c-h2        x86_64                    x86_64                    passed    
  19c-h1        x86_64                    x86_64                    passed    
Verifying Architecture ...PASSED
Verifying OS Kernel Version ...
  Node Name     Available                 Required                  Status    
  ------------  ------------------------  ------------------------  ----------
  19c-h2        4.14.35-1902.300.11.el7uek.x86_64  4.1.12                    passed    
  19c-h1        4.14.35-1902.300.11.el7uek.x86_64  4.1.12                    passed    
Verifying OS Kernel Version ...PASSED
Verifying OS Kernel Parameter: semmsl ...
  Node Name         Current       Configured    Required      Status        Comment     
  ----------------  ------------  ------------  ------------  ------------  ------------
  19c-h1            250           250           250           passed          
  19c-h2            250           250           250           passed          
Verifying OS Kernel Parameter: semmsl ...PASSED
Verifying OS Kernel Parameter: semmns ...
  Node Name         Current       Configured    Required      Status        Comment     
  ----------------  ------------  ------------  ------------  ------------  ------------
  19c-h1            32000         32000         32000         passed          
  19c-h2            32000         32000         32000         passed          
Verifying OS Kernel Parameter: semmns ...PASSED
Verifying OS Kernel Parameter: semopm ...
  Node Name         Current       Configured    Required      Status        Comment     
  ----------------  ------------  ------------  ------------  ------------  ------------
  19c-h1            100           100           100           passed          
  19c-h2            100           100           100           passed          
Verifying OS Kernel Parameter: semopm ...PASSED
Verifying OS Kernel Parameter: semmni ...
  Node Name         Current       Configured    Required      Status        Comment     
  ----------------  ------------  ------------  ------------  ------------  ------------
  19c-h1            128           128           128           passed          
  19c-h2            128           128           128           passed          
Verifying OS Kernel Parameter: semmni ...PASSED
Verifying OS Kernel Parameter: shmmax ...
  Node Name         Current       Configured    Required      Status        Comment     
  ----------------  ------------  ------------  ------------  ------------  ------------
  19c-h1            4398046511104  4398046511104  4164233216    passed          
  19c-h2            4398046511104  4398046511104  4164237312    passed          
Verifying OS Kernel Parameter: shmmax ...PASSED
Verifying OS Kernel Parameter: shmmni ...
  Node Name         Current       Configured    Required      Status        Comment     
  ----------------  ------------  ------------  ------------  ------------  ------------
  19c-h1            4096          4096          4096          passed          
  19c-h2            4096          4096          4096          passed          
Verifying OS Kernel Parameter: shmmni ...PASSED
Verifying OS Kernel Parameter: shmall ...
  Node Name         Current       Configured    Required      Status        Comment     
  ----------------  ------------  ------------  ------------  ------------  ------------
  19c-h1            1073741824    1073741824    1073741824    passed          
  19c-h2            1073741824    1073741824    1073741824    passed          
Verifying OS Kernel Parameter: shmall ...PASSED
Verifying OS Kernel Parameter: file-max ...
  Node Name         Current       Configured    Required      Status        Comment     
  ----------------  ------------  ------------  ------------  ------------  ------------
  19c-h1            6815744       6815744       6815744       passed          
  19c-h2            6815744       6815744       6815744       passed          
Verifying OS Kernel Parameter: file-max ...PASSED
Verifying OS Kernel Parameter: ip_local_port_range ...
  Node Name         Current       Configured    Required      Status        Comment     
  ----------------  ------------  ------------  ------------  ------------  ------------
  19c-h1            between 9000 & 65500  between 9000 & 65500  between 9000 & 65535  passed          
  19c-h2            between 9000 & 65500  between 9000 & 65500  between 9000 & 65535  passed          
Verifying OS Kernel Parameter: ip_local_port_range ...PASSED
Verifying OS Kernel Parameter: rmem_default ...
  Node Name         Current       Configured    Required      Status        Comment     
  ----------------  ------------  ------------  ------------  ------------  ------------
  19c-h1            262144        262144        262144        passed          
  19c-h2            262144        262144        262144        passed          
Verifying OS Kernel Parameter: rmem_default ...PASSED
Verifying OS Kernel Parameter: rmem_max ...
  Node Name         Current       Configured    Required      Status        Comment     
  ----------------  ------------  ------------  ------------  ------------  ------------
  19c-h1            4194304       4194304       4194304       passed          
  19c-h2            4194304       4194304       4194304       passed          
Verifying OS Kernel Parameter: rmem_max ...PASSED
Verifying OS Kernel Parameter: wmem_default ...
  Node Name         Current       Configured    Required      Status        Comment     
  ----------------  ------------  ------------  ------------  ------------  ------------
  19c-h1            262144        262144        262144        passed          
  19c-h2            262144        262144        262144        passed          
Verifying OS Kernel Parameter: wmem_default ...PASSED
Verifying OS Kernel Parameter: wmem_max ...
  Node Name         Current       Configured    Required      Status        Comment     
  ----------------  ------------  ------------  ------------  ------------  ------------
  19c-h1            1048576       1048576       1048576       passed          
  19c-h2            1048576       1048576       1048576       passed          
Verifying OS Kernel Parameter: wmem_max ...PASSED
Verifying OS Kernel Parameter: aio-max-nr ...
  Node Name         Current       Configured    Required      Status        Comment     
  ----------------  ------------  ------------  ------------  ------------  ------------
  19c-h1            1048576       1048576       1048576       passed          
  19c-h2            1048576       1048576       1048576       passed          
Verifying OS Kernel Parameter: aio-max-nr ...PASSED
Verifying OS Kernel Parameter: panic_on_oops ...
  Node Name         Current       Configured    Required      Status        Comment     
  ----------------  ------------  ------------  ------------  ------------  ------------
  19c-h1            1             1             1             passed          
  19c-h2            1             1             1             passed          
Verifying OS Kernel Parameter: panic_on_oops ...PASSED
Verifying Package: kmod-20-21 (x86_64) ...
  Node Name     Available                 Required                  Status    
  ------------  ------------------------  ------------------------  ----------
  19c-h2        kmod(x86_64)-20-28.0.1.el7  kmod(x86_64)-20-21        passed    
  19c-h1        kmod(x86_64)-20-28.0.1.el7  kmod(x86_64)-20-21        passed    
Verifying Package: kmod-20-21 (x86_64) ...PASSED
Verifying Package: kmod-libs-20-21 (x86_64) ...
  Node Name     Available                 Required                  Status    
  ------------  ------------------------  ------------------------  ----------
  19c-h2        kmod-libs(x86_64)-20-28.0.1.el7  kmod-libs(x86_64)-20-21   passed    
  19c-h1        kmod-libs(x86_64)-20-28.0.1.el7  kmod-libs(x86_64)-20-21   passed    
Verifying Package: kmod-libs-20-21 (x86_64) ...PASSED
Verifying Package: binutils-2.23.52.0.1 ...
  Node Name     Available                 Required                  Status    
  ------------  ------------------------  ------------------------  ----------
  19c-h2        binutils-2.27-43.base.0.1.el7  binutils-2.23.52.0.1      passed    
  19c-h1        binutils-2.27-43.base.0.1.el7  binutils-2.23.52.0.1      passed    
Verifying Package: binutils-2.23.52.0.1 ...PASSED
Verifying Package: compat-libcap1-1.10 ...
  Node Name     Available                 Required                  Status    
  ------------  ------------------------  ------------------------  ----------
  19c-h2        compat-libcap1-1.10-7.el7  compat-libcap1-1.10       passed    
  19c-h1        compat-libcap1-1.10-7.el7  compat-libcap1-1.10       passed    
Verifying Package: compat-libcap1-1.10 ...PASSED
Verifying Package: libgcc-4.8.2 (x86_64) ...
  Node Name     Available                 Required                  Status    
  ------------  ------------------------  ------------------------  ----------
  19c-h2        libgcc(x86_64)-4.8.5-39.0.3.el7  libgcc(x86_64)-4.8.2      passed    
  19c-h1        libgcc(x86_64)-4.8.5-39.0.3.el7  libgcc(x86_64)-4.8.2      passed    
Verifying Package: libgcc-4.8.2 (x86_64) ...PASSED
Verifying Package: libstdc++-4.8.2 (x86_64) ...
  Node Name     Available                 Required                  Status    
  ------------  ------------------------  ------------------------  ----------
  19c-h2        libstdc++(x86_64)-4.8.5-39.0.3.el7  libstdc++(x86_64)-4.8.2   passed    
  19c-h1        libstdc++(x86_64)-4.8.5-39.0.3.el7  libstdc++(x86_64)-4.8.2   passed    
Verifying Package: libstdc++-4.8.2 (x86_64) ...PASSED
Verifying Package: libstdc++-devel-4.8.2 (x86_64) ...
  Node Name     Available                 Required                  Status    
  ------------  ------------------------  ------------------------  ----------
  19c-h2        libstdc++-devel(x86_64)-4.8.5-39.0.3.el7  libstdc++-devel(x86_64)-4.8.2  passed    
  19c-h1        libstdc++-devel(x86_64)-4.8.5-39.0.3.el7  libstdc++-devel(x86_64)-4.8.2  passed    
Verifying Package: libstdc++-devel-4.8.2 (x86_64) ...PASSED
Verifying Package: sysstat-10.1.5 ...
  Node Name     Available                 Required                  Status    
  ------------  ------------------------  ------------------------  ----------
  19c-h2        sysstat-10.1.5-19.el7     sysstat-10.1.5            passed    
  19c-h1        sysstat-10.1.5-19.el7     sysstat-10.1.5            passed    
Verifying Package: sysstat-10.1.5 ...PASSED
Verifying Package: ksh ...
  Node Name     Available                 Required                  Status    
  ------------  ------------------------  ------------------------  ----------
  19c-h2        ksh                       ksh                       passed    
  19c-h1        ksh                       ksh                       passed    
Verifying Package: ksh ...PASSED
Verifying Package: make-3.82 ...
  Node Name     Available                 Required                  Status    
  ------------  ------------------------  ------------------------  ----------
  19c-h2        make-3.82-24.el7          make-3.82                 passed    
  19c-h1        make-3.82-24.el7          make-3.82                 passed    
Verifying Package: make-3.82 ...PASSED
Verifying Package: glibc-2.17 (x86_64) ...
  Node Name     Available                 Required                  Status    
  ------------  ------------------------  ------------------------  ----------
  19c-h2        glibc(x86_64)-2.17-307.0.1.el7.1  glibc(x86_64)-2.17        passed    
  19c-h1        glibc(x86_64)-2.17-307.0.1.el7.1  glibc(x86_64)-2.17        passed    
Verifying Package: glibc-2.17 (x86_64) ...PASSED
Verifying Package: glibc-devel-2.17 (x86_64) ...
  Node Name     Available                 Required                  Status    
  ------------  ------------------------  ------------------------  ----------
  19c-h2        glibc-devel(x86_64)-2.17-307.0.1.el7.1  glibc-devel(x86_64)-2.17  passed    
  19c-h1        glibc-devel(x86_64)-2.17-307.0.1.el7.1  glibc-devel(x86_64)-2.17  passed    
Verifying Package: glibc-devel-2.17 (x86_64) ...PASSED
Verifying Package: libaio-0.3.109 (x86_64) ...
  Node Name     Available                 Required                  Status    
  ------------  ------------------------  ------------------------  ----------
  19c-h2        libaio(x86_64)-0.3.109-13.el7  libaio(x86_64)-0.3.109    passed    
  19c-h1        libaio(x86_64)-0.3.109-13.el7  libaio(x86_64)-0.3.109    passed    
Verifying Package: libaio-0.3.109 (x86_64) ...PASSED
Verifying Package: libaio-devel-0.3.109 (x86_64) ...
  Node Name     Available                 Required                  Status    
  ------------  ------------------------  ------------------------  ----------
  19c-h2        libaio-devel(x86_64)-0.3.109-13.el7  libaio-devel(x86_64)-0.3.109  passed    
  19c-h1        libaio-devel(x86_64)-0.3.109-13.el7  libaio-devel(x86_64)-0.3.109  passed    
Verifying Package: libaio-devel-0.3.109 (x86_64) ...PASSED
Verifying Package: nfs-utils-1.2.3-15 ...
  Node Name     Available                 Required                  Status    
  ------------  ------------------------  ------------------------  ----------
  19c-h2        nfs-utils-1.3.0-0.66.0.1.el7  nfs-utils-1.2.3-15        passed    
  19c-h1        nfs-utils-1.3.0-0.66.0.1.el7  nfs-utils-1.2.3-15        passed    
Verifying Package: nfs-utils-1.2.3-15 ...PASSED
Verifying Package: smartmontools-6.2-4 ...
  Node Name     Available                 Required                  Status    
  ------------  ------------------------  ------------------------  ----------
  19c-h2        smartmontools-7.0-2.el7   smartmontools-6.2-4       passed    
  19c-h1        smartmontools-7.0-2.el7   smartmontools-6.2-4       passed    
Verifying Package: smartmontools-6.2-4 ...PASSED
Verifying Package: net-tools-2.0-0.17 ...
  Node Name     Available                 Required                  Status    
  ------------  ------------------------  ------------------------  ----------
  19c-h2        net-tools-2.0-0.25.20131004git.el7  net-tools-2.0-0.17        passed    
  19c-h1        net-tools-2.0-0.25.20131004git.el7  net-tools-2.0-0.17        passed    
Verifying Package: net-tools-2.0-0.17 ...PASSED
Verifying Port Availability for component "Oracle Notification Service (ONS)" ...
  Node Name         Port Number   Protocol      Available     Status          
  ----------------  ------------  ------------  ------------  ----------------
  19c-h2            6200          TCP           yes           successful      
  19c-h1            6200          TCP           yes           successful      
  19c-h2            6100          TCP           yes           successful      
  19c-h1            6100          TCP           yes           successful      
Verifying Port Availability for component "Oracle Notification Service (ONS)" ...PASSED
Verifying Port Availability for component "Oracle Cluster Synchronization Services (CSSD)" ...
  Node Name         Port Number   Protocol      Available     Status          
  ----------------  ------------  ------------  ------------  ----------------
  19c-h2            42424         TCP           yes           successful      
  19c-h1            42424         TCP           yes           successful      
Verifying Port Availability for component "Oracle Cluster Synchronization Services (CSSD)" ...PASSED
Verifying Users With Same UID: 0 ...PASSED
Verifying Current Group ID ...PASSED
Verifying Root user consistency ...
  Node Name                             Status                  
  ------------------------------------  ------------------------
  19c-h2                                passed                  
  19c-h1                                passed                  
Verifying Root user consistency ...PASSED
Verifying Package: cvuqdisk-1.0.10-1 ...
  Node Name     Available                 Required                  Status    
  ------------  ------------------------  ------------------------  ----------
  19c-h2        cvuqdisk-1.0.10-1         cvuqdisk-1.0.10-1         passed    
  19c-h1        cvuqdisk-1.0.10-1         cvuqdisk-1.0.10-1         passed    
Verifying Package: cvuqdisk-1.0.10-1 ...PASSED
Verifying Host name ...PASSED
Verifying Node Connectivity ...
  Verifying Hosts File ...
  Node Name                             Status                  
  ------------------------------------  ------------------------
  19c-h1                                passed                  
  19c-h2                                passed                  
  Verifying Hosts File ...PASSED

Interface information for node "19c-h2"

 Name   IP Address      Subnet          Gateway         Def. Gateway    HW Address        MTU   
 ------ --------------- --------------- --------------- --------------- ----------------- ------
 ens32  172.172.30.162  172.172.30.0    0.0.0.0         172.172.30.254  00:0C:29:20:BF:7D 1500  
 ens33  10.10.10.2      10.10.10.0      0.0.0.0         172.172.30.254  00:0C:29:20:BF:87 1500  

Interface information for node "19c-h1"

 Name   IP Address      Subnet          Gateway         Def. Gateway    HW Address        MTU   
 ------ --------------- --------------- --------------- --------------- ----------------- ------
 ens32  172.172.30.161  172.172.30.0    0.0.0.0         172.172.30.254  00:0C:29:B4:6A:41 1500  
 ens33  10.10.10.1      10.10.10.0      0.0.0.0         172.172.30.254  00:0C:29:B4:6A:4B 1500  

Check: MTU consistency of the subnet "10.10.10.0".

  Node              Name          IP Address    Subnet        MTU             
  ----------------  ------------  ------------  ------------  ----------------
  19c-h2            ens33         10.10.10.2    10.10.10.0    1500            
  19c-h1            ens33         10.10.10.1    10.10.10.0    1500            

Check: MTU consistency of the subnet "172.172.30.0".

  Node              Name          IP Address    Subnet        MTU             
  ----------------  ------------  ------------  ------------  ----------------
  19c-h2            ens32         172.172.30.162  172.172.30.0  1500            
  19c-h1            ens32         172.172.30.161  172.172.30.0  1500            
  Verifying Check that maximum (MTU) size packet goes through subnet ...PASSED

  Source                          Destination                     Connected?      
  ------------------------------  ------------------------------  ----------------
  19c-h1[ens33:10.10.10.1]        19c-h2[ens33:10.10.10.2]        yes             

  Source                          Destination                     Connected?      
  ------------------------------  ------------------------------  ----------------
  19c-h1[ens32:172.172.30.161]    19c-h2[ens32:172.172.30.162]    yes             
  Verifying subnet mask consistency for subnet "10.10.10.0" ...PASSED
  Verifying subnet mask consistency for subnet "172.172.30.0" ...PASSED
Verifying Node Connectivity ...PASSED
Verifying Multicast or broadcast check ...
Checking subnet "10.10.10.0" for multicast communication with multicast group "224.0.0.251"
Verifying Multicast or broadcast check ...PASSED
Verifying Network Time Protocol (NTP) ...PASSED
Verifying Same core file name pattern ...PASSED
Verifying User Mask ...
  Node Name     Available                 Required                  Comment   
  ------------  ------------------------  ------------------------  ----------
  19c-h2        0022                      0022                      passed    
  19c-h1        0022                      0022                      passed    
Verifying User Mask ...PASSED
Verifying User Not In Group "root": grid ...
  Node Name     Status                    Comment                 
  ------------  ------------------------  ------------------------
  19c-h2        passed                    does not exist          
  19c-h1        passed                    does not exist          
Verifying User Not In Group "root": grid ...PASSED
Verifying Time zone consistency ...PASSED
Verifying Time offset between nodes ...PASSED
Verifying resolv.conf Integrity ...FAILED (PRVG-13159)
Verifying DNS/NIS name service ...PASSED
Verifying Domain Sockets ...PASSED
Verifying /boot mount ...PASSED
Verifying Daemon "avahi-daemon" not configured and running ...
  Node Name     Configured                Status                  
  ------------  ------------------------  ------------------------
  19c-h2        no                        passed                  
  19c-h1        no                        passed                  

  Node Name     Running?                  Status                  
  ------------  ------------------------  ------------------------
  19c-h2        no                        passed                  
  19c-h1        no                        passed                  
Verifying Daemon "avahi-daemon" not configured and running ...PASSED
Verifying Daemon "proxyt" not configured and running ...
  Node Name     Configured                Status                  
  ------------  ------------------------  ------------------------
  19c-h2        no                        passed                  
  19c-h1        no                        passed                  

  Node Name     Running?                  Status                  
  ------------  ------------------------  ------------------------
  19c-h2        no                        passed                  
  19c-h1        no                        passed                  
Verifying Daemon "proxyt" not configured and running ...PASSED
Verifying User Equivalence ...PASSED
Verifying RPM Package Manager database ...INFORMATION (PRVG-11250)
Verifying /dev/shm mounted as temporary file system ...PASSED
Verifying File system mount options for path /var ...PASSED
Verifying DefaultTasksMax parameter ...PASSED
Verifying zeroconf check ...PASSED
Verifying ASM Filter Driver configuration ...PASSED
Verifying Systemd login manager IPC parameter ...PASSED

Pre-check for cluster services setup was unsuccessful on all the nodes. 


Failures were encountered during execution of CVU verification request "stage -pre crsinst".

Verifying resolv.conf Integrity ...FAILED
19c-h2: PRVG-13159 : On node "19c-h2" the file "/etc/resolv.conf" could not be
        parsed because the file is empty.

19c-h1: PRVG-13159 : On node "19c-h1" the file "/etc/resolv.conf" could not be
        parsed because the file is empty.

Verifying RPM Package Manager database ...INFORMATION
PRVG-11250 : The check "RPM Package Manager database" was not performed because
it needs 'root' user privileges.


CVU operation performed:      stage -pre crsinst
Date:                         Jul 15, 2021 6:55:06 PM
CVU home:                     /oracle/app/19.0.0/grid/
User:                         grid
[grid@19c-h1 grid]$ 

Note:最后只提示无dns配置的错误,无影响,我们采用本地解析。

2、编辑响应文件

[grid@19c-h1 ~]$ cp /oracle/app/19.0.0/grid/install/response/gridsetup.rsp /home/grid/
[grid@19c-h1 ~]$ vi gridsetup.rsp 

oracle.install.responseFileVersion=/oracle/install/rspfmt_crsinstall_response_schema_v19.0.0
INVENTORY_LOCATION=/oracle/app/oraInventory
oracle.install.option=CRS_CONFIG
ORACLE_BASE=/oracle/app/grid
oracle.install.asm.OSDBA=asmdba
oracle.install.asm.OSOPER=asmoper
oracle.install.asm.OSASM=asmadmin
oracle.install.crs.config.scanType=LOCAL_SCAN
oracle.install.crs.config.SCANClientDataFile=
oracle.install.crs.config.gpnp.scanName=wldb-scan.alinge.com
oracle.install.crs.config.gpnp.scanPort=1521
oracle.install.crs.config.ClusterConfiguration=STANDALONE
oracle.install.crs.config.configureAsExtendedCluster=
oracle.install.crs.config.memberClusterManifestFile=
oracle.install.crs.config.clusterName=wldb-cluster
oracle.install.crs.config.gpnp.configureGNS=
oracle.install.crs.config.autoConfigureClusterNodeVIP=
oracle.install.crs.config.gpnp.gnsOption=
oracle.install.crs.config.gpnp.gnsClientDataFile=
oracle.install.crs.config.gpnp.gnsSubDomain=
oracle.install.crs.config.gpnp.gnsVIPAddress=
oracle.install.crs.config.sites=
oracle.install.crs.config.clusterNodes=19c-h1.alinge.com:19c-h1-vip.alinge.com:HUB,19c-h2.alinge.com:19c-h2-vip.alinge.com:HUB
oracle.install.crs.config.networkInterfaceList=ens32:172.172.30.0:1,ens33:10.10.10.0:5
oracle.install.crs.configureGIMR=true
oracle.install.asm.configureGIMRDataDG=true
oracle.install.crs.config.storageOption=FLEX_ASM_STORAGE
oracle.install.crs.config.sharedFileSystemStorage.votingDiskLocations=
oracle.install.crs.config.sharedFileSystemStorage.ocrLocations=
oracle.install.crs.config.useIPMI=false
oracle.install.crs.config.ipmi.bmcUsername=
oracle.install.crs.config.ipmi.bmcPassword=
oracle.install.asm.SYSASMPassword=oracle
oracle.install.asm.diskGroup.name=vote
oracle.install.asm.diskGroup.redundancy=NORMAL
oracle.install.asm.diskGroup.AUSize=4
oracle.install.asm.diskGroup.FailureGroups=
oracle.install.asm.diskGroup.disksWithFailureGroupNames=
oracle.install.asm.diskGroup.disks=/dev/asm_vote01,/dev/asm_vote02,/dev/asm_vote03
oracle.install.asm.diskGroup.quorumFailureGroupNames=
oracle.install.asm.diskGroup.diskDiscoveryString=/dev/asm*
oracle.install.asm.monitorPassword=oracle
oracle.install.asm.gimrDG.name=DATA
oracle.install.asm.gimrDG.redundancy=EXTERNAL
oracle.install.asm.gimrDG.AUSize=4
oracle.install.asm.gimrDG.FailureGroups=
oracle.install.asm.gimrDG.disksWithFailureGroupNames=
oracle.install.asm.gimrDG.disks=/dev/asm_data01
oracle.install.asm.gimrDG.quorumFailureGroupNames=
oracle.install.asm.configureAFD=false
oracle.install.crs.configureRHPS=false
oracle.install.crs.config.ignoreDownNodes=false
oracle.install.config.managementOption=NONE
oracle.install.config.omsHost=
oracle.install.config.omsPort=
oracle.install.config.emAdminUser=
oracle.install.config.emAdminPassword=
oracle.install.crs.rootconfig.executeRootScript=false
oracle.install.crs.rootconfig.configMethod=
oracle.install.crs.rootconfig.sudoPath=
oracle.install.crs.rootconfig.sudoUserName=
oracle.install.crs.config.batchinfo=
oracle.install.crs.app.applicationAddress=
oracle.install.crs.deleteNode.nodes=

3、开始安装

[grid@19c-h1 grid]$ ./gridSetup.sh -silent -ignorePrereqFailure -waitForCompletion -responseFile /home/grid/gridsetup.rsp
Launching Oracle Grid Infrastructure Setup Wizard...

[WARNING] [INS-30011] The SYS password entered does not conform to the Oracle recommended standards.
   CAUSE: Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
   ACTION: Provide a password that conforms to the Oracle recommended standards.
[WARNING] [INS-30011] The ASMSNMP password entered does not conform to the Oracle recommended standards.
   CAUSE: Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
   ACTION: Provide a password that conforms to the Oracle recommended standards.
[WARNING] [INS-13013] Target environment does not meet some mandatory requirements.
   CAUSE: Some of the mandatory prerequisites are not met. See logs for details. /tmp/GridSetupActions2021-07-15_07-25-07PM/gridSetupActions2021-07-15_07-25-07PM.log
   ACTION: Identify the list of failed prerequisite checks from the log: /tmp/GridSetupActions2021-07-15_07-25-07PM/gridSetupActions2021-07-15_07-25-07PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
The response file for this session can be found at:
 /oracle/app/19.0.0/grid/install/response/grid_2021-07-15_07-25-07PM.rsp

You can find the log of this install session at:
 /tmp/GridSetupActions2021-07-15_07-25-07PM/gridSetupActions2021-07-15_07-25-07PM.log

As a root user, execute the following script(s):
	1. /oracle/app/oraInventory/orainstRoot.sh
	2. /oracle/app/19.0.0/grid/root.sh

Execute /oracle/app/oraInventory/orainstRoot.sh on the following nodes: 
[19c-h1, 19c-h2]
Execute /oracle/app/19.0.0/grid/root.sh on the following nodes: 
[19c-h1, 19c-h2]

Run the script on the local node first. After successful completion, you can start the script in parallel on all other nodes.

Successfully Setup Software with warning(s).
As install user, execute the following command to complete the configuration.
	/oracle/app/19.0.0/grid/gridSetup.sh -executeConfigTools -responseFile /home/grid/gridsetup.rsp [-silent]


Moved the install session logs to:
 /oracle/app/oraInventory/logs/GridSetupActions2021-07-15_07-25-07PM
[grid@19c-h1 grid]$ 

4、运行脚本

脚本一:
[root@19c-h1 grid]# /oracle/app/oraInventory/orainstRoot.sh
Changing permissions of /oracle/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /oracle/app/oraInventory to oinstall.
The execution of the script is complete.
[root@19c-h1 grid]# 

[root@19c-h2 ~]# /oracle/app/oraInventory/orainstRoot.sh
Changing permissions of /oracle/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /oracle/app/oraInventory to oinstall.
The execution of the script is complete.
[root@19c-h2 ~]# 

脚本二:
[root@19c-h1 ~]# /oracle/app/19.0.0/grid/root.sh
Check /oracle/app/19.0.0/grid/install/root_19c-h1_2021-07-15_19-33-35-206950224.log for the output of root script
[root@19c-h1 ~]# 

[root@19c-h1 ~]# tail -f /oracle/app/19.0.0/grid/install/root_19c-h1_2021-07-15_19-33-35-206950224.log
2021/07/15 19:39:41 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.
2021/07/15 19:41:04 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.

[INFO] [DBT-30001] Disk groups created successfully. Check /oracle/app/grid/cfgtoollogs/asmca/asmca-210715PM074109.log for details.


2021/07/15 19:41:50 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded

[root@19c-h2 ~]# /oracle/app/19.0.0/grid/root.sh
Check /oracle/app/19.0.0/grid/install/root_19c-h2_2021-07-15_19-43-08-068936322.log for the output of root script
[root@19c-h2 ~]# 

[root@19c-h2 ~]# tail -f /oracle/app/19.0.0/grid/install/root_19c-h2_2021-07-15_19-43-08-068936322.log
2021/07/15 19:45:11 CLSRSC-343: Successfully started Oracle Clusterware stack
2021/07/15 19:45:11 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.
2021/07/15 19:45:26 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.
2021/07/15 19:45:32 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded

5、最后的配置

[grid@19c-h1 grid]$ /oracle/app/19.0.0/grid/gridSetup.sh -silent -executeConfigTools -responseFile /home/grid/gridsetup.rsp
Launching Oracle Grid Infrastructure Setup Wizard...

You can find the logs of this session at:
/oracle/app/oraInventory/logs/GridSetupActions2021-07-15_07-47-18PM

You can find the log of this install session at:
 /oracle/app/oraInventory/logs/UpdateNodeList2021-07-15_07-47-18PM.log
Configuration failed.
[WARNING] [INS-43080] Some of the configuration assistants failed, were cancelled or skipped.
   ACTION: Refer to the logs or contact Oracle Support Services.
[grid@19c-h1 grid]$ 

Note:因为前面跳过了DNS错误,所以最后会有警告信息。此步骤前面配置了GIMR所有花费时间会比较久。

6、集群状态查看

[grid@19c-h1 grid]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
               ONLINE  ONLINE       19c-h1                   STABLE
               ONLINE  ONLINE       19c-h2                   STABLE
ora.chad
               ONLINE  ONLINE       19c-h1                   STABLE
               ONLINE  ONLINE       19c-h2                   STABLE
ora.net1.network
               ONLINE  ONLINE       19c-h1                   STABLE
               ONLINE  ONLINE       19c-h2                   STABLE
ora.ons
               ONLINE  ONLINE       19c-h1                   STABLE
               ONLINE  ONLINE       19c-h2                   STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.19c-h1.vip
      1        ONLINE  ONLINE       19c-h1                   STABLE
ora.19c-h2.vip
      1        ONLINE  ONLINE       19c-h2                   STABLE
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
      1        ONLINE  ONLINE       19c-h1                   STABLE
      2        ONLINE  ONLINE       19c-h2                   STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.DATA.dg(ora.asmgroup)
      1        ONLINE  ONLINE       19c-h1                   STABLE
      2        ONLINE  ONLINE       19c-h2                   STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       19c-h1                   STABLE
ora.MGMTLSNR
      1        ONLINE  ONLINE       19c-h1                   169.254.1.238 10.10.
                                                             10.1,STABLE
ora.VOTE.dg(ora.asmgroup)
      1        ONLINE  ONLINE       19c-h1                   STABLE
      2        ONLINE  ONLINE       19c-h2                   STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.asm(ora.asmgroup)
      1        ONLINE  ONLINE       19c-h1                   Started,STABLE
      2        ONLINE  ONLINE       19c-h2                   Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
      1        ONLINE  ONLINE       19c-h1                   STABLE
      2        ONLINE  ONLINE       19c-h2                   STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       19c-h1                   STABLE
ora.mgmtdb
      1        ONLINE  ONLINE       19c-h1                   Open,STABLE
ora.qosmserver
      1        ONLINE  ONLINE       19c-h1                   STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       19c-h1                   STABLE
--------------------------------------------------------------------------------
[grid@19c-h1 grid]$ 


三、磁盘组创建

[grid@19c-h1 grid]$ asmca -silent  -createDiskGroup -diskGroupName arch -diskList '/dev/asm_arch01' -redundancy EXTERNAL

[INFO] [DBT-30001] Disk groups created successfully. Check /oracle/app/grid/cfgtoollogs/asmca/asmca-210715PM082451.log for details.


[grid@19c-h1 grid]$ 

Note:前面安装GI配置GIMR,已经创建了data磁盘组。

四、DB软件安装

1、校验

/oracle/app/19.0.0/grid/runcluvfy.sh stage -pre dbinst -n 19c-h1,19c-h2 -verbose

Note:GI安装校验过,问题不大,基本会提示SCAN和DNS的问题,可以忽略。

2、编辑响应文件

[oracle@19c-h1 ~]$ cp $ORACLE_HOME/install/response/db_install.rsp /home/oracle
[oracle@19c-h1 ~]$ vi db_install.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=/oracle/app/oraInventory
ORACLE_HOME=/oracle/app/oracle/product/19.0.0/dbhome_1
ORACLE_BASE=/oracle/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.OSDBA_GROUP=dba
oracle.install.db.OSOPER_GROUP=oper
oracle.install.db.OSBACKUPDBA_GROUP=backupdba
oracle.install.db.OSDGDBA_GROUP=dgdba
oracle.install.db.OSKMDBA_GROUP=kmdba
oracle.install.db.OSRACDBA_GROUP=racdba
oracle.install.db.rootconfig.executeRootScript=false
oracle.install.db.rootconfig.configMethod=
oracle.install.db.rootconfig.sudoPath=
oracle.install.db.rootconfig.sudoUserName=
oracle.install.db.CLUSTER_NODES=19c-h1,19c-h2
oracle.install.db.config.starterdb.type=
oracle.install.db.config.starterdb.globalDBName=
oracle.install.db.config.starterdb.SID=
oracle.install.db.ConfigureAsContainerDB=
oracle.install.db.config.PDBName=
oracle.install.db.config.starterdb.characterSet=
oracle.install.db.config.starterdb.memoryOption=
oracle.install.db.config.starterdb.memoryLimit=
oracle.install.db.config.starterdb.installExampleSchemas=
oracle.install.db.config.starterdb.password.ALL=
oracle.install.db.config.starterdb.password.SYS=
oracle.install.db.config.starterdb.password.SYSTEM=
oracle.install.db.config.starterdb.password.DBSNMP=
oracle.install.db.config.starterdb.password.PDBADMIN=
oracle.install.db.config.starterdb.managementOption=
oracle.install.db.config.starterdb.omsHost=
oracle.install.db.config.starterdb.omsPort=
oracle.install.db.config.starterdb.emAdminUser=
oracle.install.db.config.starterdb.emAdminPassword=
oracle.install.db.config.starterdb.enableRecovery=
oracle.install.db.config.starterdb.storageType=
oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=
oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=
oracle.install.db.config.asm.diskGroup=
oracle.install.db.config.asm.ASMSNMPPassword=

3、安装软件

[oracle@19c-h1 dbhome_1]$ ./runInstaller -silent -ignorePrereqFailure -waitForCompletion -responseFile /home/oracle/db_install.rsp
Launching Oracle Database Setup Wizard...

[WARNING] [INS-13013] Target environment does not meet some mandatory requirements.
   CAUSE: Some of the mandatory prerequisites are not met. See logs for details. /oracle/app/oraInventory/logs/InstallActions2021-07-15_08-36-43PM/installActions2021-07-15_08-36-43PM.log
   ACTION: Identify the list of failed prerequisite checks from the log: /oracle/app/oraInventory/logs/InstallActions2021-07-15_08-36-43PM/installActions2021-07-15_08-36-43PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
The response file for this session can be found at:
 /oracle/app/oracle/product/19.0.0/dbhome_1/install/response/db_2021-07-15_08-36-43PM.rsp

You can find the log of this install session at:
 /oracle/app/oraInventory/logs/InstallActions2021-07-15_08-36-43PM/installActions2021-07-15_08-36-43PM.log

As a root user, execute the following script(s):
	1. /oracle/app/oracle/product/19.0.0/dbhome_1/root.sh

Execute /oracle/app/oracle/product/19.0.0/dbhome_1/root.sh on the following nodes: 
[19c-h1, 19c-h2]


Successfully Setup Software with warning(s).
[oracle@19c-h1 dbhome_1]$ 


Note:因为前面忽略了DNS和SCAN的错误所以会有告警信息。

4、运行root脚本

[root@19c-h1 ~]# /oracle/app/oracle/product/19.0.0/dbhome_1/root.sh
Check /oracle/app/oracle/product/19.0.0/dbhome_1/install/root_19c-h1_2021-07-15_20-50-16-745400442.log for the output of root script
[root@19c-h1 ~]# 

[root@19c-h2 ~]# /oracle/app/oracle/product/19.0.0/dbhome_1/root.sh
Check /oracle/app/oracle/product/19.0.0/dbhome_1/install/root_19c-h1_2021-07-15_20-50-16-745400442.log for the output of root script
[root@19c-h1 ~]# 


五、数据库创建

1、命令

dbca -silent -ignorePreReqs -createDatabase \
-templateName General_Purpose.dbc \
-datafileJarLocation $ORACLE_HOME/assistants/dbca/templates \
-gdbName wldb \
-sid wldb \
-sysPassword oracle \
-systemPassword oracle \
-storageType ASM \
-diskGroupName DATA \
-useOMF true \
-asmsnmpPassword oracle \
-dbsnmpPassword oracle \
-runCVUChecks true \
-nodelist 19c-h1,19c-h2 \
-createAsContainerDatabase true \
-useLocalUndoForPDBs true \
-characterset ZHS16GBK \
-nationalCharacterSet AL16UTF16 \
-sampleSchema false \
-databaseType MULTIPURPOSE \
-emConfiguration NONE \
-memoryPercentage 30

## 2、结果
[oracle@19c-h1 ~]$ dbca -silent -ignorePreReqs -createDatabase \
> -templateName General_Purpose.dbc \
> -datafileJarLocation $ORACLE_HOME/assistants/dbca/templates \
> -gdbName wldb \
> -sid wldb \
> -sysPassword oracle \
> -systemPassword oracle \
> -storageType ASM \
> -diskGroupName DATA \
> -useOMF true \
> -asmsnmpPassword oracle \
> -dbsnmpPassword oracle \
> -runCVUChecks true \
> -nodelist 19c-h1,19c-h2 \
> -createAsContainerDatabase true \
> -useLocalUndoForPDBs true \
> -characterset ZHS16GBK \
> -nationalCharacterSet AL16UTF16 \
> -sampleSchema false \
> -databaseType MULTIPURPOSE \
> -emConfiguration NONE \
> -memoryPercentage 30
[WARNING] [DBT-06208] The 'SYS' password entered does not conform to the Oracle recommended standards.
   CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[WARNING] [DBT-06208] The 'SYSTEM' password entered does not conform to the Oracle recommended standards.
   CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[WARNING] [DBT-06208] The 'DBSNMP' password entered does not conform to the Oracle recommended standards.
   CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
Prepare for db operation
8% complete
Copying database files
33% complete
Creating and starting Oracle instance
34% complete
35% complete
39% complete
44% complete
47% complete
50% complete
Creating cluster database views
52% complete
67% complete
Completing Database Creation
71% complete
73% complete
75% complete
Executing Post Configuration Actions
100% complete
Database creation complete. For details check the logfiles at:
 /oracle/app/oracle/cfgtoollogs/dbca/wldb.
Database Information:
Global Database Name:wldb
System Identifier(SID) Prefix:wldb
Look at the log file "/oracle/app/oracle/cfgtoollogs/dbca/wldb/wldb0.log" for further details.
[oracle@19c-h1 ~]$ 


3、查看

[oracle@19c-h1 ~]$ srvctl status database -d wldb
Instance wldb1 is running on node 19c-h1
Instance wldb2 is running on node 19c-h2
[oracle@19c-h1 ~]$ 


最后修改时间:2024-09-04 14:35:17
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
1人已赞赏
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论