[关闭]
@clisdodo 2020-10-10T14:27:11.000000Z 字数 27202 阅读 6292

Oracle 19c RAC 双节点搭建(OEL7.8)

19c RAC Linux


Askscuti 3级搭建类302-Oracle 19c RAC 双节点搭建

你需要知道的

1 规划

1.1 系统规划

磁盘名称 磁盘大小 作用
/dev/sda 50G OS 操作系统
/dev/sdb 20G 临时软件
/dev/sdc 50G Oracle 软件

1.2 网络规划

节点 IP 名称 类型 作用
Node1 192.168.31.101 racnode1 公网 IP 公司内部访问,非外网
Node1 192.168.111.128 node1pri 私有 IP 用于 2 节点间心跳网络
Node1 192.168.31.102 node1vip Virtual IP 提供客户端访问,漂移
Node2 192.168.31.201 racnode2 公网 IP 公司内部访问,非外网
Node2 192.168.111.129 node2pri 私有 IP 用于 1 节点间心跳网络
Node2 192.168.31.202 node2vip Virtual IP 提供客户端访问,漂移
N1+N2 192.168.31.100 racscan SCAN IP 提供客户端访问,均衡

1.3 存储规划

磁盘名称 磁盘大小 ASM磁盘名称 作用
/dev/sdd 2G asm-ocr1 OCR/Voting File
/dev/sde 2G asm-ocr2 OCR/Voting File
/dev/sdf 2G asm-ocr3 OCR/Voting File
/dev/sdg 30G asm-data Data Files

2 操作系统安装(略)

参考 0 级搭建类 相关文档完成此操作

3 系统环境及参数设置

3.1 YUM仓库配置(双节点)

mv /etc/yum.repos.d/* /tmp/
echo "[local_yum]" >> /etc/yum.repos.d/henry.repo
echo "name = henry_repo" >> /etc/yum.repos.d/henry.repo
echo "baseurl = file:///mnt/" >> /etc/yum.repos.d/henry.repo
echo "enabled = 1" >> /etc/yum.repos.d/henry.repo
echo "gpgcheck = 0" >> /etc/yum.repos.d/henry.repo
mount /dev/cdrom /mnt/

yum -y install autoconf
yum -y install automake
yum -y install binutils
yum -y install binutils-devel
yum -y install bison
yum -y install cpp
yum -y install dos2unix
yum -y install ftp
yum -y install gcc
yum -y install gcc-c++
yum -y install lrzsz
yum -y install python-devel
yum -y install compat-libcap1
yum -y install compat-libstdc++-33
yum -y install compat-libstdc++-33.i686
yum -y install glibc-*
yum -y install glibc-*.i686
yum -y install libXpm-*.i686
yum -y install libXext
yum -y install libXext.i686
yum -y install libXtst
yum -y install libXtst.i686
yum -y install libX11
yum -y install libX11.i686
yum -y install libXau
yum -y install libXau.i686
yum -y install libxcb
yum -y install libxcb.i686
yum -y install libXi
yum -y install libXi.i686
yum -y install libstdc++.i686
yum -y install libstdc++-devel
yum -y install libstdc++-devel.i686
yum -y install libaio
yum -y install libaio.i686
yum -y install libaio-devel
yum -y install libaio-devel.i686
yum -y install ksh
yum -y install libXp
yum -y install libaio-devel
yum -y install numactl
yum -y install numactl-devel
yum -y install make -y
yum -y install sysstat -y
yum -y install unixODBC
yum -y install unixODBC-devel
yum -y install elfutils-libelf-devel
yum -y install redhat-lsb-core
yum -y install unzip
yum -y install libXrender
yum -y install libXrender-devel
yum -y install nfs-utils
yum -y install smartmontools
yum -y install tigervnc*
yum install -y libvirt*

3.2 编辑HOSTS文件(双节点)

vim /etc/hosts

# 添加内容

#scanip 
192.168.31.100 racscan

#node1
192.168.31.101 racnode1
192.168.31.102 node1vip
192.168.111.128 node1pri

#node2
192.168.31.201 racnode2
192.168.31.202 node2vip
192.168.111.129 node2pri

3.3 创建用户和组(双节点)

/usr/sbin/groupadd -g 5001 oinstall
/usr/sbin/groupadd -g 5002 dba
/usr/sbin/groupadd -g 5003 oper
/usr/sbin/groupadd -g 5004 asmadmin
/usr/sbin/groupadd -g 5005 asmoper
/usr/sbin/groupadd -g 5006 asmdba
/usr/sbin/useradd -g oinstall -G dba,asmdba,oper -d /home/oracle -m oracle
/usr/sbin/useradd -g oinstall -G asmadmin,asmdba,asmoper,oper,dba -d /home/grid -m grid

# 修改用户 oracle 及 grid 密码

passwd oracle
passwd grid

3.4 创建文件夹及授权(双节点)

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

3.5 用户资源限制配置(双节点)

vim /etc/security/limits.conf

# 添加内容

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
grid soft stack 10240
grid hard stack 32768
* soft memlock unlimited
* hard memlock unlimited
root soft stack 10240
root hard stack 32768

3.6 将资源限制加入验证模块(双节点)

echo "session required pam_limits.so" >> /etc/pam.d/login

3.7 修改内核参数(双节点)

vim /etc/sysctl.conf

# 编辑文件添加以下内容
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
kernel.panic_on_oops = 1
kernel.shmmax = 7730941132
kernel.shmall = 1887436
kernel.shmmni = 4096

# 执行命令刷新生效
sysctl -p

3.8 关闭交换页面(双节点)

vim /etc/rc.d/rc.local

# 添加内容

if test -f /sys/kernel/mm/transparent_hugepage/enabled; then
echo never > /sys/kernel/mm/transparent_hugepage/enabled
fi
if test -f /sys/kernel/mm/transparent_hugepage/defrag; then
echo never > /sys/kernel/mm/transparent_hugepage/defrag
fi

3.9 关闭防火墙(双节点)

systemctl stop firewalld.service
systemctl disable firewalld.service

3.10 关闭SELinux(双节点)

vim /etc/sysconfig/selinux

# 修改内容

SELINUX=disabled

3.11 关闭其他不需要的服务(双节点-可选)

systemctl stop avahi-dnsconfd
systemctl stop avahi-daemon
systemctl stop cups
systemctl stop postfix
systemctl stop smartd
systemctl disable avahi-dnsconfd
systemctl disable avahi-daemon
systemctl disable cups
systemctl disable postfix
systemctl disable smartd

4 编辑用户环境变量

4.1 GRID用户环境变量

4.1.1 节点1

  1. su - grid
  2. vim .bash_profile
  3. # 添加内容
  4. PS1="[`whoami`@`hostname`:"'$PWD]$'
  5. export PS1
  6. umask 022
  7. export TMP=/tmp
  8. export TMPDIR=$TMP
  9. export ORACLE_HOSTNAME=racnode1
  10. ORACLE_SID=+ASM1; export ORACLE_SID
  11. ORACLE_TERM=xterm; export ORACLE_TERM
  12. ORACLE_BASE=/u01/app/grid; export ORACLE_BASE
  13. ORACLE_HOME=/u01/app/19.3.0/grid; export ORACLE_HOME
  14. NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMAT
  15. PATH=.:$PATH:$HOME/bin:$ORACLE_HOME/bin; export PATH
  16. THREADS_FLAG=native; export THREADS_FLAG
  17. if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
  18. if [ $SHELL = "/bin/ksh" ]; then
  19. ulimit -p 16384
  20. ulimit -n 65536
  21. else
  22. ulimit -u 16384 -n 65536
  23. fi
  24. umask 022
  25. fi

4.1.2 节点2

  1. su - grid
  2. vim .bash_profile
  3. # 添加内容
  4. PS1="[`whoami`@`hostname`:"'$PWD]$'
  5. export PS1
  6. umask 022
  7. export TMP=/tmp
  8. export TMPDIR=$TMP
  9. export ORACLE_HOSTNAME=racnode2
  10. ORACLE_SID=+ASM2; export ORACLE_SID
  11. ORACLE_TERM=xterm; export ORACLE_TERM
  12. ORACLE_BASE=/u01/app/grid; export ORACLE_BASE
  13. ORACLE_HOME=/u01/app/19.3.0/grid; export ORACLE_HOME
  14. NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMAT
  15. PATH=.:$PATH:$HOME/bin:$ORACLE_HOME/bin; export PATH
  16. THREADS_FLAG=native; export THREADS_FLAG
  17. if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
  18. if [ $SHELL = "/bin/ksh" ]; then
  19. ulimit -p 16384
  20. ulimit -n 65536
  21. else
  22. ulimit -u 16384 -n 65536
  23. fi
  24. umask 022
  25. fi

4.2 ORACLE用户环境变量

4.2.1 节点1

  1. su - oracle
  2. vim .bash_profile
  3. # 添加内容
  4. PS1="[`whoami`@`hostname`:"'$PWD]$'
  5. export PS1
  6. export TMP=/tmp
  7. export TMPDIR=$TMP
  8. export ORACLE_HOSTNAME=racnode1
  9. export ORACLE_UNQNAME=SALESERP
  10. ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
  11. ORACLE_HOME=$ORACLE_BASE/product/19.3.0/dbhome_1; export ORACLE_HOME
  12. ORACLE_SID=SALES1; export ORACLE_SID
  13. ORACLE_TERM=xterm; export ORACLE_TERM
  14. NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMAT
  15. NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;export NLS_LANG
  16. PATH=.:$PATH:$HOME/bin:$ORACLE_BASE/product/19.3.0/dbhome_1/bin:$ORACLE_HOME/bin; export
  17. PATH
  18. THREADS_FLAG=native; export THREADS_FLAG
  19. if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
  20. if [ $SHELL = "/bin/ksh" ]; then
  21. ulimit -p 16384
  22. ulimit -n 65536
  23. else
  24. ulimit -u 16384 -n 65536
  25. fi
  26. umask 022
  27. fi

4.2.2 节点2

  1. su - oracle
  2. vim .bash_profile
  3. # 添加内容
  4. PS1="[`whoami`@`hostname`:"'$PWD]$'
  5. export PS1
  6. export TMP=/tmp
  7. export TMPDIR=$TMP
  8. export ORACLE_HOSTNAME=racnode2
  9. export ORACLE_UNQNAME=SALESERP
  10. ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
  11. ORACLE_HOME=$ORACLE_BASE/product/19.3.0/dbhome_1; export ORACLE_HOME
  12. ORACLE_SID=SALES2; export ORACLE_SID
  13. ORACLE_TERM=xterm; export ORACLE_TERM
  14. NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMAT
  15. NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;export NLS_LANG
  16. PATH=.:$PATH:$HOME/bin:$ORACLE_BASE/product/19.3.0/dbhome_1/bin:$ORACLE_HOME/bin; export
  17. PATH
  18. THREADS_FLAG=native; export THREADS_FLAG
  19. if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
  20. if [ $SHELL = "/bin/ksh" ]; then
  21. ulimit -p 16384
  22. ulimit -n 65536
  23. else
  24. ulimit -u 16384 -n 65536
  25. fi
  26. umask 022
  27. fi

5 SSH 互信

5.1 GRID用户互信

5.1.1 节点1

su - grid
rm -rf ~/.ssh
mkdir ~/.ssh
ssh-keygen -t rsa
ssh-keygen -t dsa

5.1.2 节点2

su - grid
rm -rf ~/.ssh
mkdir ~/.ssh
ssh-keygen -t rsa
ssh-keygen -t dsa

5.1.3 节点1追加互信并拷贝至节点2

cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys 
ssh racnode2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
ssh racnode2 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
scp /home/grid/.ssh/authorized_keys racnode2:~/.ssh/authorized_keys

5.1.4 节点1验证互信(无需密码)

ssh racnode1 date
ssh racnode2 date
ssh node1pri date
ssh node2pri date

5.1.5 节点2验证互信(无需密码)

ssh racnode1 date
ssh racnode2 date
ssh node1pri date
ssh node2pri date

5.2 ORACLE用户互信

5.2.1 节点1

su - oracle
rm -rf ~/.ssh
mkdir ~/.ssh
ssh-keygen -t rsa
ssh-keygen -t dsa

5.2.2 节点2

su - oracle
rm -rf ~/.ssh
mkdir ~/.ssh
ssh-keygen -t rsa
ssh-keygen -t dsa

5.2.3 节点1追加互信并拷贝至节点2

cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
ssh racnode2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
ssh racnode2 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys 
scp /home/oracle/.ssh/authorized_keys racnode2:~/.ssh/authorized_keys

5.2.4 节点1验证互信(无需密码)

ssh racnode1 date
ssh racnode2 date
ssh node1pri date
ssh node2pri date

5.2.5 节点2验证互信(无需密码)

ssh racnode1 date
ssh racnode2 date
ssh node1pri date
ssh node2pri date

6 ASM 磁盘配置(UDEV)

本文使用 VMWare Workstation 15.5 虚拟机进行配置

# 关闭节点1和节点2

systemctl poweroff

# 创建独立的共享磁盘文件夹

sharedisk

6.1 节点1添加磁盘

按照 1.3 规划,添加 4 块硬盘

1:编辑虚拟机设置 - 添加 - 硬盘 - SCSI - 创建新虚拟磁盘 - 磁盘大小:2G/立即分配所有磁盘空间 - 浏览路径:E:\Linux\sharedisk - 文件名:RAC-01-1-g1 - 保存/完成 - 高级 - 虚拟设备节点:SCSI 1:0 - 模式:勾选 独立/永久 - 确定

2:添加 - 硬盘 - SCSI - 创建新虚拟磁盘 - 磁盘大小:2G/立即分配所有磁盘空间 - 浏览路径:E:\Linux\sharedisk - 文件名:RAC-01-1-g2 - 保存/完成 - 高级 - 虚拟设备节点:SCSI 1:1 - 模式:勾选 独立/永久 - 确定

3:添加 - 硬盘 - SCSI - 创建新虚拟磁盘 - 磁盘大小:2G/立即分配所有磁盘空间 - 浏览路径:E:\Linux\sharedisk - 文件名:RAC-01-1-g3 - 保存/完成 - 高级 - 虚拟设备节点:SCSI 1:2 - 模式:勾选 独立/永久 - 确定

4:添加 - 硬盘 - SCSI - 创建新虚拟磁盘 - 磁盘大小:30G/立即分配所有磁盘空间 - 浏览路径:E:\Linux\sharedisk - 文件名:RAC-01-1-data - 保存/完成 - 高级 - 虚拟设备节点:SCSI 1:3 - 模式:勾选 独立/永久 - 确定

注意:虚拟机设置永久模式前提是不允许存在虚拟机快照,如存在,请删除

图示(以此类推)

image.png-53.6kB

image.png-49.6kB

image.png-56.5kB

image.png-58.1kB

image.png-49.7kB

image.png-59kB

6.2 节点2添加磁盘

节点2添加共享磁盘注意两点

1:编辑虚拟机设置 - 添加 - 硬盘 - SCSI - 使用现有虚拟磁盘 - 浏览:选择 E:\Linux\sharedisk\RAC-01-1-g1.vmdk - 完成 - 高级 - 虚拟设备节点:SCSI 1:0 - 模式:勾选 独立/永久 - 确定

2:添加 - 硬盘 - SCSI - 使用现有虚拟磁盘 - 浏览:选择 E:\Linux\sharedisk\RAC-01-1-g2.vmdk - 完成 - 高级 - 虚拟设备节点:SCSI 1:1 - 模式:勾选 独立/永久 - 确定

3:添加 - 硬盘 - SCSI - 使用现有虚拟磁盘 - 浏览:选择 E:\Linux\sharedisk\RAC-01-1-g3.vmdk - 完成 - 高级 - 虚拟设备节点:SCSI 1:2 - 模式:勾选 独立/永久 - 确定

4:添加 - 硬盘 - SCSI - 使用现有虚拟磁盘 - 浏览:选择 E:\Linux\sharedisk\RAC-01-1-data.vmdk - 完成 - 高级 - 虚拟设备节点:SCSI 1:3 - 模式:勾选 独立/永久 - 确定

图示(以此类推)

image.png-53.5kB

image.png-49.7kB

image.png-56.7kB

image.png-47.5kB

image.png-49kB

image.png-59kB

6.3 节点2虚拟机添加代码段

# 节点二虚拟机配置文件中添加以下代码段,避免同时开启锁定磁盘

disk.locking = "FALSE" 
diskLib.dataCacheMaxSize= "0" 
scsi1.sharedBus ="virtual"
diskLib.dataCacheMaxReadAheadSize = "0"
diskLib.DataCacheMinReadAheadSize = "0"
diskLib.dataCachePageSize = "4096"
diskLib.maxUnsyncedWrites = "0"
disk.EnableUUID = "TRUE"

6.4 节点1分区

fdisk /dev/sdd
fdisk /dev/sde
fdisk /dev/sdf
fdisk /dev/sdg

6.5 节点1确认SCSI标识符

分区 标识符
/usr/lib/udev/scsi_id -g -u -d /dev/sdd1 36000c29c627c4e18666e2ba340715dc9
/usr/lib/udev/scsi_id -g -u -d /dev/sde1 36000c295b648ea51ee6b56b006825def
/usr/lib/udev/scsi_id -g -u -d /dev/sdf1 36000c29d97a96e82fcd40598caba8115
/usr/lib/udev/scsi_id -g -u -d /dev/sdg1 36000c2990c196f54a57085a995e97d9d

6.6 节点1编辑UDEV规则文件

  1. KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="36000c29c627c4e18666e2ba340715dc9", SYMLINK+="oasm/asm-ocr1", OWNER="grid", GROUP="asmadmin", MODE="0660"
  2. KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="36000c295b648ea51ee6b56b006825def", SYMLINK+="oasm/asm-ocr2", OWNER="grid", GROUP="asmadmin", MODE="0660"
  3. KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="36000c29d97a96e82fcd40598caba8115", SYMLINK+="oasm/asm-ocr3", OWNER="grid", GROUP="asmadmin", MODE="0660"
  4. KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="36000c2990c196f54a57085a995e97d9d", SYMLINK+="oasm/asm-data", OWNER="grid", GROUP="asmadmin", MODE="0660"

6.7 拷贝节点1 UDEV文件至节点2

[root@racnode1 ~]# scp /etc/udev/rules.d/99-oracle-asmdevices.rules racnode2:/etc/udev/rules.d/

The authenticity of host 'racnode2 (192.168.31.201)' can't be established.
ECDSA key fingerprint is SHA256:Yj1vqmj9gGZ5pSF7E9B4kCce/C1TF6HvWHjzWVXMSuE.
ECDSA key fingerprint is MD5:bc:97:90:73:c2:a8:a6:5c:d0:9d:20:9e:6f:4c:d2:9a.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'racnode2,192.168.31.201' (ECDSA) to the list of known hosts.
root@racnode2's password: 
99-oracle-asmdevices.rules                         100%  828     1.2MB/s   00:00

6.8 节点2重启UDEV服务

systemctl restart systemd-udevd.service 
udevadm control --reload-rules
udevadm trigger --type=devices --action=add

[root@racnode2 ~]# ls -lathr /dev/oasm/*
lrwxrwxrwx 1 root root 7 Oct 10 10:34 /dev/oasm/asm-ocr1 -> ../sdd1
lrwxrwxrwx 1 root root 7 Oct 10 10:34 /dev/oasm/asm-ocr2 -> ../sde1
lrwxrwxrwx 1 root root 7 Oct 10 10:34 /dev/oasm/asm-ocr3 -> ../sdf1
lrwxrwxrwx 1 root root 7 Oct 10 10:34 /dev/oasm/asm-data -> ../sdg1

[root@racnode2 ~]# ls -lathr /dev/sd*1 |grep -v sda1 |grep -v sdb1 |grep -v sdc1
brw-rw---- 1 grid asmadmin 8, 49 Oct 10 10:34 /dev/sdd1
brw-rw---- 1 grid asmadmin 8, 65 Oct 10 10:34 /dev/sde1
brw-rw---- 1 grid asmadmin 8, 81 Oct 10 10:34 /dev/sdf1
brw-rw---- 1 grid asmadmin 8, 97 Oct 10 10:34 /dev/sdg1

# 强烈建议直接重启 systemctl reboot

学习实验配置RAC共享磁盘,建议使用 VirtualBox

7 Grid Infrastructure 配置安装

7.1 节点1解压GI软件

[root@racnode1 ~]# chmod -R 777 /soft/
[root@racnode1 ~]# su - grid
Last login: Wed Sep 30 10:18:34 CST 2020 on pts/0

[grid@racnode1:/home/grid]$cd $ORACLE_HOME
[grid@racnode1:/u01/app/19.3.0/grid]$unzip -q /soft/LINUX.X64_193000_grid_home.zip

7.2 节点1安装集群检测包

[root@racnode1 ~]# cd /u01/app/19.3.0/grid/cv/rpm/
[root@racnode1 rpm]# rpm -ivh cvuqdisk-1.0.10-1.rpm 
Preparing...                          ################################# [100%]
Using default group oinstall to install package
Updating / installing...
   1:cvuqdisk-1.0.10-1                ################################# [100%]

7.3 节点2安装集群检测包

# 拷贝至节点2

[root@racnode1 rpm]# scp cvuqdisk-1.0.10-1.rpm racnode2:/tmp
root@racnode2's password: 
cvuqdisk-1.0.10-1.rpm                       100%   11KB  10.7MB/s   00:00

# 节点2安装

[root@racnode2 ~]# cd /tmp/
[root@racnode2 tmp]# rpm -ivh cvuqdisk-1.0.10-1.rpm 
Preparing...                          ################################# [100%]
Using default group oinstall to install package
Updating / installing...
   1:cvuqdisk-1.0.10-1                ################################# [100%]

7.4 解压更新OPatch工具

如不考虑打补丁,可跳过本小节

# 截至文章发布,GI软件最新RU补丁版本为 2020.07.14 发布的 19.8.0.0.200714(补丁号 Patch 31305339),该补丁要求 OPatch 工具最低版本为 12.2.0.1.21

# 查看当前 OPatch 工具版本

[grid@racnode1:/home/grid]$cd $ORACLE_HOME
[grid@racnode1:/u01/app/19.3.0/grid]$OPatch/opatch version
OPatch Version: 12.2.0.1.17

OPatch succeeded.

# 下载最新 OPatch 工具解压覆盖

[grid@racnode1:/u01/app/19.3.0/grid]$unzip -q /soft/p6880880_121010_Linux-x86-64.zip

replace OPatch/emdpatch.pl? [y]es, [n]o, [A]ll, [N]one, [r]ename: A

# 查看最新 OPatch 工具版本

[grid@racnode1:/u01/app/19.3.0/grid]$OPatch/opatch version
OPatch Version: 12.2.0.1.21

OPatch succeeded.

7.5 解压GI软件最新RU补丁

如不考虑打补丁,可跳过本小节

[grid@racnode1:/home/grid]$cd /soft/

[grid@racnode1:/soft]$mkdir ogi

[grid@racnode1:/soft]$unzip -q p31305339_190000_Linux-x86-64.zip -d ogi

7.6 图形化安装GI软件

# 进入图形化桌面(打补丁)

[grid@racnode1 ~]$ cd $ORACLE_HOME
[grid@racnode1 grid]$ ./gridSetup.sh -applyRU /soft/ogi/31305339/

Preparing the home to patch...
Applying the patch /soft/ogi/31305339/...
Successfully applied the patch.
The log can be found at: /tmp/GridSetupActions2020-10-10_11-25-56AM/installerPatchActions_2020-10-10_11-25-56AM.log
Launching Oracle Grid Infrastructure Setup Wizard...


# 进入图形化桌面(不打补丁)

[grid@racnode1 ~]$ cd $ORACLE_HOME
[grid@racnode1 grid]$ ./gridSetup.sh

image.png-326kB

image.png-330.2kB

image.png-344.9kB

image.png-335.9kB

image.png-342kB

image.png-344.1kB

image.png-347kB

image.png-335.7kB

image.png-338.1kB

image.png-344.9kB

image.png-357.9kB

image.png-358.6kB

image.png-360kB

image.png-344.5kB

image.png-348.1kB

image.png-335.6kB

image.png-338.3kB

image.png-341.5kB

image.png-342kB

image.png-344.6kB

image.png-344.5kB

image.png-335.5kB

image.png-349.9kB

image.png-354.1kB

image.png-353.8kB

image.png-353.5kB

image.png-360.2kB

image.png-365.1kB

image.png-303.2kB

image.png-304kB

image.png-361.6kB

image.png-365.2kB

image.png-363.6kB

image.png-331.7kB

7.7 添加 ASM 磁盘

[grid@racnode1 ~]$ asmca

image.png-212.8kB

image.png-233kB

image.png-233.5kB

image.png-226.2kB

7.8 查看集群组件状态

[grid@racnode1:/home/grid]$crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
               ONLINE  ONLINE       racnode1                 STABLE
               ONLINE  ONLINE       racnode2                 STABLE
ora.chad
               ONLINE  ONLINE       racnode1                 STABLE
               ONLINE  ONLINE       racnode2                 STABLE
ora.net1.network
               ONLINE  ONLINE       racnode1                 STABLE
               ONLINE  ONLINE       racnode2                 STABLE
ora.ons
               ONLINE  ONLINE       racnode1                 STABLE
               ONLINE  ONLINE       racnode2                 STABLE
ora.proxy_advm
               OFFLINE OFFLINE      racnode1                 STABLE
               OFFLINE OFFLINE      racnode2                 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
      1        ONLINE  ONLINE       racnode1                 STABLE
      2        ONLINE  ONLINE       racnode2                 STABLE
ora.DATA.dg(ora.asmgroup)
      1        ONLINE  ONLINE       racnode1                 STABLE
      2        ONLINE  ONLINE       racnode2                 STABLE
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       racnode1                 STABLE
ora.OCRDG.dg(ora.asmgroup)
      1        ONLINE  ONLINE       racnode1                 STABLE
      2        ONLINE  ONLINE       racnode2                 STABLE
ora.asm(ora.asmgroup)
      1        ONLINE  ONLINE       racnode1                 Started,STABLE
      2        ONLINE  ONLINE       racnode2                 Started,STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
      1        ONLINE  ONLINE       racnode1                 STABLE
      2        ONLINE  ONLINE       racnode2                 STABLE
ora.cvu
      1        ONLINE  ONLINE       racnode1                 STABLE
ora.qosmserver
      1        ONLINE  ONLINE       racnode1                 STABLE
ora.racnode1.vip
      1        ONLINE  ONLINE       racnode1                 STABLE
ora.racnode2.vip
      1        ONLINE  ONLINE       racnode2                 STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       racnode1                 STABLE
--------------------------------------------------------------------------------

8 Oracle Database 配置安装

8.1 节点1解压DB软件

[oracle@racnode1 ~]$ cd $ORACLE_HOME
[oracle@racnode1 dbhome_1]$ unzip -q /soft/LINUX.X64_193000_db_home.zip

8.2 解压更新OPatch工具

如不考虑打补丁,可跳过本小节

# 截至文章发布,DB软件最新RU补丁版本为 2020.07.14 发布的 19.8.0.0.200714(补丁号 Patch Patch 31281355),该补丁要求 OPatch 工具最低版本为 12.2.0.1.21

# 查看当前 OPatch 工具版本

[oracle@racnode1 ~]$ cd $ORACLE_HOME
[oracle@racnode1 dbhome_1]$ OPatch/opatch version
OPatch Version: 12.2.0.1.17

OPatch succeeded.

# 下载最新 OPatch 工具解压覆盖

[oracle@racnode1 dbhome_1]$ unzip -q /soft/p6880880_121010_Linux-x86-64.zip 
replace OPatch/emdpatch.pl? [y]es, [n]o, [A]ll, [N]one, [r]ename: A

# 查看最新 OPatch 工具版本

[oracle@racnode1 dbhome_1]$ OPatch/opatch version
OPatch Version: 12.2.0.1.21

OPatch succeeded.

8.3 解压DB软件最新RU补丁

如不考虑打补丁,可跳过本小节

[oracle@racnode1 dbhome_1]$ cd /soft/

[oracle@racnode1 soft]$ mkdir odb

[oracle@racnode1 soft]$ unzip -q p31281355_190000_Linux-x86-64.zip -d odb

8.4 图形化安装DB软件

# 进入图形化桌面(打补丁)

[oracle@racnode1 ~]$ cd $ORACLE_HOME
[oracle@racnode1 dbhome_1]$ ./runInstaller -applyRU /soft/odb/31281355/

Preparing the home to patch...
Applying the patch /soft/odb/31281355/...
Successfully applied the patch.
The log can be found at: /u01/app/oraInventory/logs/InstallActions2020-10-10_01-12-49PM/installerPat    chActions_2020-10-10_01-12-49PM.log
Launching Oracle Database Setup Wizard...


# 进入图形化桌面(不打补丁)

[oracle@racnode1 ~]$ cd $ORACLE_HOME
[oracle@racnode1 dbhome_1]$ ./runInstaller

image.png-329.6kB

image.png-320.9kB

image.png-331.9kB

image.png-335.5kB

image.png-333.8kB

image.png-336.7kB

image.png-330.6kB

image.png-329.9kB

image.png-345.6kB

image.png-334kB

image.png-323.6kB

image.png-343.4kB

image.png-344.4kB

image.png-334.3kB

image.png-296.9kB

image.png-316.3kB

8.5 创建数据库

[oracle@racnode1 ~]$ dbca

image.png-327.4kB

image.png-334.8kB

image.png-348.9kB

image.png-329.5kB

image.png-344.3kB

image.png-350.5kB

image.png-332.4kB

image.png-332kB

image.png-349.5kB

image.png-336.6kB

image.png-338.2kB

image.png-342.9kB

image.png-348kB

image.png-328.4kB

image.png-347.2kB

image.png-348.6kB

image.png-352.6kB

image.png-346.4kB

image.png-344.8kB

[End]

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注