前言

前言
第一次在CSDN上写博客,周末抽空在vsphere环境下,搭建学习centos7.6下安装oracle rac12.2.0.1,操作系统centos7.6安装过程就省略了。

📢 注意:12C R2相比前一版本,OCR的磁盘占用需求有了明显增长。
为了方便操作,设置如下:
External: 1个卷x40G
Normal: 3个卷x30G
Hight: 5个卷x25G
Flex: 3个卷x30G
OCR+VOLTING+MGMT存储通常放到一个磁盘组,且选择Normal的冗余方式,也即最少3块asm磁盘80G空间。

一、安装环境准备

1、网络规划

#public
192.168.0.61       db1
192.168.0.62       db2
#private
111.111.111.111    db1-priv
111.111.111.112    db2-priv
#vip
192.168.0.63       db1-vip
192.168.0.64       db2-vip
#scan-ip
192.168.0.65       scan-ip

2、配置yum仓库

mkdir -p /etc/yum.repos.d/yum_bak
mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/yum_bak
cat >/etc/yum.repos.d/centos7u6.repo <<-EOF
[rhel-media]
name=CentOs Linux 
baseurl=file:///mnt/ 
enabled=1 
gpgcheck=0
EOF

3、安装依赖包

yum install binutils -y
yum install compat-libstdc++-33 -y
yum install compat-libstdc++-33.i686 -y
yum install gcc -y
yum install gcc-c++ -y
yum install glibc -y
yum install glibc.i686 -y
yum install glibc-devel -y
yum install glibc-devel.i686 -y
yum install ksh -y
yum install libgcc -y
yum install libgcc.i686 -y
yum install libstdc++ -y
yum install libstdc++.i686 -y
yum install libstdc++-devel -y
yum install libstdc++-devel.i686 -y
yum install libaio -y
yum install libaio.i686 -y
yum install libaio-devel -y
yum install libaio-devel.i686 -y
yum install libXext -y
yum install libXext.i686 -y
yum install libXtst -y
yum install libXtst.i686 -y
yum install libX11 -y
yum install libX11.i686 -y
yum install libXau -y
yum install libXau.i686 -y
yum install libxcb -y
yum install libxcb.i686 -y
yum install libXi -y
yum install libXi.i686 -y
yum install make -y
yum install sysstat -y
yum install unixODBC -y
yum install unixODBC-devel -y
yum install zlib-devel -y
yum install zlib-devel.i686 -y
yum install compat-libcap1.x86_64 -y
yum install binutils.x86_64 compat-libcap1.x86_64  e2fsprogs.x86_64 libaio* libXau* libXi* libXtst* libstdc*  -y
yum install tigervnc* -y

4、关闭防火墙

systemctl status firewalld
systemctl stop firewalld
systemctl disable firewalld
systemctl is-enabled firewalld
systemctl status firewalld

5、设置selinux

cp -rf /etc/selinux/config /etc/selinux/config.bk
sed 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config.bk > /etc/selinux/config

6、关闭关闭透明大页和NUMA

sed -i 's/quiet/quiet transparent_hugepage=never numa=off/' /etc/default/grub
grub2-mkconfig -o /boot/grub2/grub.cfg

📢 注意:重启生效

7、系统参数

vi /etc/sysctl.conf

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 8369610751
kernel.shmmni = 4096
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 = 1048576
net.ipv4.conf.ens192.rp_filter = 1
net.ipv4.conf.ens224.rp_filter = 2

sysctl -p

vi /etc/pam.d/login

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

vi /etc/sysconfig/network

NOZEROCONF=yes

8、资源限制

vi /etc/security/limits.conf

oracle soft nofile 2048
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
grid soft nofile 2048
grid hard nofile 65536
grid soft nproc 16384
grid hard nproc 16384
grid soft stack 10240
grid hard stack 32768
grid hard memlock 134217728
grid soft memlock 134217728

9、创建用户和组

groupadd -g 60001 oinstall
groupadd -g 60002 dba
groupadd -g 60003 oper
groupadd -g 60004 backupdba
groupadd -g 60005 dgdba
groupadd -g 60006 kmdba
groupadd -g 60007 asmdba
groupadd -g 60008 asmoper
groupadd -g 60009 asmadmin
useradd -u 61001 -g oinstall -G asmadmin,asmdba,dba,asmoper grid
useradd -u 61002 -g oinstall -G dba,backupdba,dgdba,kmdba,asmadmin,oper,asmdba oracle

echo "grid" | passwd --stdin grid
echo "oracle" | passwd --stdin oracle

10、创建目录

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

11、用户环境参数

su - grid
vi .bash_profile
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/12.2.0/grid
export ORACLE_SID=+ASM1
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH

📢 注意:节点2:ORACLE_SID=+ASM2

su - oracle
vi .bash_profile
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/12.2.0/db
export ORACLE_SID=orcl1
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH

📢 注意:节点2:ORACLE_SID=orcl2

vi /etc/profile
if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi

12、连接存储

yum -y install iscsi-initiator-utils
iscsiadm -m discovery -t st -p 192.168.0.250:3260
iscsiadm -m node -T iqn.2007-09.jp.ne.peach.istgt:disk0 -l
iscsiadm -m node -T iqn.2007-09.jp.ne.peach.istgt:disk1 -l

13、配置多链路

vi /etc/multipath.conf
blacklist {
        devnode "^sda"
}
defaults {
        polling_interval        30
        failback                immediate
        no_path_retry           5
        rr_min_io               100
        path_checker            tur
        user_friendly_names     yes
}
multipaths {
        multipath {
                wwid  330000000eeafaaf9
                alias   asmdiskocr
                 }
        multipath {
                wwid  330000000019fc1e0
                alias   asmdiskdata
                  }                 
}
devices {
        device {
                vendor                  "IBM"
                product                 "2145"
                path_grouping_policy    group_by_prio
                prio    alua    #failover
        }
}

14、权限设置

vi /etc/udev/rules.d/99-oracle-asmdevices.rules

options=--whitelisted --replace-whitespace
KERNEL=="dm-*",ENV{DEVTYPE}=="disk",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",RESULT=="330000000eeafaaf9", RUN+="/bin/sh -c 'mknod /dev/asmdiskocr b  $major $minor; chown grid:asmadmin /dev/dm-2; chmod 0660 /dev/dm-2'"
KERNEL=="dm-*",ENV{DEVTYPE}=="disk",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",RESULT=="330000000019fc1e0", RUN+="/bin/sh -c 'mknod /dev/asmdiskdata b  $major $minor; chown grid:asmadmin /dev/dm-3; chmod 0660 /dev/dm-3'"

15、avahi-daemon 配置

yum -y install avahi-daemon
systemctl stop avahi-daemon
systemctl disable avahi-daemon
systemctl is-enabled avahi-daemon
systemctl status avahi-daemon

16、NTP参数

systemctl stop ntpd
systemctl disable ntpd
mv /etc/ntp.conf /etc/ntp.conf.bak
rm -rf /var/run/ntpd.pid
systemctl stop chronyd
systemctl disable chronyd
mv /etc/chrony.conf /etc/chrony.conf.bak
rm -rf /var/run/chronyd.pid

17、上传安装包

上传安装包到/soft

linuxx64_12201_database.zip
linuxx64_12201_grid_home.zip

18、解压安装包

chmod -R 755 /soft
chown -R grid:oinstall /soft
su - grid -c "unzip -q /soft/linuxx64_12201_grid_home.zip -d /u01/app/12.2.0/grid/"

19、安装cvuqdisk

rpm -ivh /u01/app/12.2.0/grid/cv/rpm/cvuqdisk-1.0.10-1.rpm

二、grid集群安装

centos7 安装部署 Arthas centos7安装rac_oracle


centos7 安装部署 Arthas centos7安装rac_数据库_02


centos7 安装部署 Arthas centos7安装rac_centos7 安装部署 Arthas_03


centos7 安装部署 Arthas centos7安装rac_bc_04


centos7 安装部署 Arthas centos7安装rac_centos7 安装部署 Arthas_05


centos7 安装部署 Arthas centos7安装rac_数据库_06


centos7 安装部署 Arthas centos7安装rac_linux_07


centos7 安装部署 Arthas centos7安装rac_oracle_08


centos7 安装部署 Arthas centos7安装rac_centos7 安装部署 Arthas_09


centos7 安装部署 Arthas centos7安装rac_bc_10


在这里插入图片描述

centos7 安装部署 Arthas centos7安装rac_数据库_11


在这里插入图片描述

centos7 安装部署 Arthas centos7安装rac_数据库_12


centos7 安装部署 Arthas centos7安装rac_bc_13


centos7 安装部署 Arthas centos7安装rac_bc_14

[root@db1 ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@db2 ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@db1 ~]# /u01/app/12.2.0/grid/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/12.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Relinking oracle with rac_on option
Using configuration parameter file: /u01/app/12.2.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/grid/crsdata/db1/crsconfig/rootcrs_db1_2022-01-08_10-10-17PM.log
2022/01/08 22:10:19 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'.
2022/01/08 22:10:19 CLSRSC-4001: Installing Oracle Trace File Analyzer (TFA) Collector.
2022/01/08 22:10:43 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2022/01/08 22:10:43 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'.
2022/01/08 22:10:47 CLSRSC-363: User ignored prerequisites during installation
2022/01/08 22:10:47 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'.
2022/01/08 22:10:48 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'.
2022/01/08 22:10:49 CLSRSC-594: Executing installation step 5 of 19: 'SaveParamFile'.
2022/01/08 22:10:55 CLSRSC-594: Executing installation step 6 of 19: 'SetupOSD'.
2022/01/08 22:10:55 CLSRSC-594: Executing installation step 7 of 19: 'CheckCRSConfig'.
2022/01/08 22:10:55 CLSRSC-594: Executing installation step 8 of 19: 'SetupLocalGPNP'.
2022/01/08 22:11:11 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'.
2022/01/08 22:11:17 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'.
2022/01/08 22:11:17 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'.
2022/01/08 22:11:21 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'.
2022/01/08 22:11:37 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
2022/01/08 22:12:04 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'.
2022/01/08 22:12:08 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'.
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'db1'
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'db1' has completed
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
2022/01/08 22:12:28 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'.
2022/01/08 22:12:32 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'.
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'db1'
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'db1' has completed
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
CRS-2672: Attempting to start 'ora.evmd' on 'db1'
CRS-2672: Attempting to start 'ora.mdnsd' on 'db1'
CRS-2676: Start of 'ora.mdnsd' on 'db1' succeeded
CRS-2676: Start of 'ora.evmd' on 'db1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'db1'
CRS-2676: Start of 'ora.gpnpd' on 'db1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'db1'
CRS-2672: Attempting to start 'ora.gipcd' on 'db1'
CRS-2676: Start of 'ora.cssdmonitor' on 'db1' succeeded
CRS-2676: Start of 'ora.gipcd' on 'db1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'db1'
CRS-2672: Attempting to start 'ora.diskmon' on 'db1'
CRS-2676: Start of 'ora.diskmon' on 'db1' succeeded
CRS-2676: Start of 'ora.cssd' on 'db1' succeeded

Disk groups created successfully. Check /u01/app/grid/cfgtoollogs/asmca/asmca-220108PM101318.log for details.


2022/01/08 22:13:49 CLSRSC-482: Running command: '/u01/app/12.2.0/grid/bin/ocrconfig -upgrade grid oinstall'
CRS-2672: Attempting to start 'ora.crf' on 'db1'
CRS-2672: Attempting to start 'ora.storage' on 'db1'
CRS-2676: Start of 'ora.storage' on 'db1' succeeded
CRS-2676: Start of 'ora.crf' on 'db1' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'db1'
CRS-2676: Start of 'ora.crsd' on 'db1' succeeded
CRS-4256: Updating the profile
Successful addition of voting disk c01b8cdc9f6c4ffabf1e4113fb5eaf6f.
Successfully replaced voting disk group with +OCR.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   c01b8cdc9f6c4ffabf1e4113fb5eaf6f (/dev/asmdiskocr) [OCR]
Located 1 voting disk(s).
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'db1'
CRS-2673: Attempting to stop 'ora.crsd' on 'db1'
CRS-2677: Stop of 'ora.crsd' on 'db1' succeeded
CRS-2673: Attempting to stop 'ora.storage' on 'db1'
CRS-2673: Attempting to stop 'ora.crf' on 'db1'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'db1'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'db1'
CRS-2677: Stop of 'ora.crf' on 'db1' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'db1' succeeded
CRS-2677: Stop of 'ora.storage' on 'db1' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'db1'
CRS-2677: Stop of 'ora.mdnsd' on 'db1' succeeded
CRS-2677: Stop of 'ora.asm' on 'db1' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'db1'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'db1' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'db1'
CRS-2673: Attempting to stop 'ora.evmd' on 'db1'
CRS-2677: Stop of 'ora.ctssd' on 'db1' succeeded
CRS-2677: Stop of 'ora.evmd' on 'db1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'db1'
CRS-2677: Stop of 'ora.cssd' on 'db1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'db1'
CRS-2677: Stop of 'ora.gipcd' on 'db1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'db1' has completed
CRS-4133: Oracle High Availability Services has been stopped.
2022/01/08 22:14:52 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.
CRS-4123: Starting Oracle High Availability Services-managed resources
CRS-2672: Attempting to start 'ora.evmd' on 'db1'
CRS-2672: Attempting to start 'ora.mdnsd' on 'db1'
CRS-2676: Start of 'ora.mdnsd' on 'db1' succeeded
CRS-2676: Start of 'ora.evmd' on 'db1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'db1'
CRS-2676: Start of 'ora.gpnpd' on 'db1' succeeded
CRS-2672: Attempting to start 'ora.gipcd' on 'db1'
CRS-2676: Start of 'ora.gipcd' on 'db1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'db1'
CRS-2676: Start of 'ora.cssdmonitor' on 'db1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'db1'
CRS-2672: Attempting to start 'ora.diskmon' on 'db1'
CRS-2676: Start of 'ora.diskmon' on 'db1' succeeded
CRS-2676: Start of 'ora.cssd' on 'db1' succeeded
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'db1'
CRS-2672: Attempting to start 'ora.ctssd' on 'db1'
CRS-2676: Start of 'ora.ctssd' on 'db1' succeeded
CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'db1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'db1'
CRS-2676: Start of 'ora.asm' on 'db1' succeeded
CRS-2672: Attempting to start 'ora.storage' on 'db1'
CRS-2676: Start of 'ora.storage' on 'db1' succeeded
CRS-2672: Attempting to start 'ora.crf' on 'db1'
CRS-2676: Start of 'ora.crf' on 'db1' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'db1'
CRS-2676: Start of 'ora.crsd' on 'db1' succeeded
CRS-6023: Starting Oracle Cluster Ready Services-managed resources
CRS-6017: Processing resource auto-start for servers: db1
CRS-6016: Resource auto-start has completed for server db1
CRS-6024: Completed start of Oracle Cluster Ready Services-managed resources
CRS-4123: Oracle High Availability Services has been started.
2022/01/08 22:16:14 CLSRSC-343: Successfully started Oracle Clusterware stack
2022/01/08 22:16:14 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.
CRS-2672: Attempting to start 'ora.ASMNET1LSNR_ASM.lsnr' on 'db1'
CRS-2676: Start of 'ora.ASMNET1LSNR_ASM.lsnr' on 'db1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'db1'
CRS-2676: Start of 'ora.asm' on 'db1' succeeded
CRS-2672: Attempting to start 'ora.OCR.dg' on 'db1'
CRS-2676: Start of 'ora.OCR.dg' on 'db1' succeeded
2022/01/08 22:17:22 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.
2022/01/08 22:17:41 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded
[root@db2 ~]# /u01/app/12.2.0/grid/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/12.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Relinking oracle with rac_on option
Using configuration parameter file: /u01/app/12.2.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/grid/crsdata/db2/crsconfig/rootcrs_db2_2022-01-08_10-18-54PM.log
2022/01/08 22:18:57 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'.
2022/01/08 22:18:57 CLSRSC-4001: Installing Oracle Trace File Analyzer (TFA) Collector.
2022/01/08 22:19:21 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2022/01/08 22:19:21 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'.
2022/01/08 22:19:22 CLSRSC-363: User ignored prerequisites during installation
2022/01/08 22:19:22 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'.
2022/01/08 22:19:23 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'.
2022/01/08 22:19:23 CLSRSC-594: Executing installation step 5 of 19: 'SaveParamFile'.
2022/01/08 22:19:25 CLSRSC-594: Executing installation step 6 of 19: 'SetupOSD'.
2022/01/08 22:19:25 CLSRSC-594: Executing installation step 7 of 19: 'CheckCRSConfig'.
2022/01/08 22:19:26 CLSRSC-594: Executing installation step 8 of 19: 'SetupLocalGPNP'.
2022/01/08 22:19:27 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'.
2022/01/08 22:19:29 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'.
2022/01/08 22:19:29 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'.
2022/01/08 22:19:30 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'.
2022/01/08 22:19:45 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
2022/01/08 22:20:10 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'.
2022/01/08 22:20:11 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'.
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'db2'
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'db2' has completed
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
2022/01/08 22:20:27 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'.
2022/01/08 22:20:28 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'.
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'db2'
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'db2' has completed
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'db2'
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'db2' has completed
CRS-4133: Oracle High Availability Services has been stopped.
2022/01/08 22:20:46 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.
CRS-4123: Starting Oracle High Availability Services-managed resources
CRS-2672: Attempting to start 'ora.evmd' on 'db2'
CRS-2672: Attempting to start 'ora.mdnsd' on 'db2'
CRS-2676: Start of 'ora.mdnsd' on 'db2' succeeded
CRS-2676: Start of 'ora.evmd' on 'db2' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'db2'
CRS-2676: Start of 'ora.gpnpd' on 'db2' succeeded
CRS-2672: Attempting to start 'ora.gipcd' on 'db2'
CRS-2676: Start of 'ora.gipcd' on 'db2' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'db2'
CRS-2676: Start of 'ora.cssdmonitor' on 'db2' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'db2'
CRS-2672: Attempting to start 'ora.diskmon' on 'db2'
CRS-2676: Start of 'ora.diskmon' on 'db2' succeeded
CRS-2676: Start of 'ora.cssd' on 'db2' succeeded
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'db2'
CRS-2672: Attempting to start 'ora.ctssd' on 'db2'
CRS-2676: Start of 'ora.ctssd' on 'db2' succeeded
CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'db2' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'db2'
CRS-2676: Start of 'ora.asm' on 'db2' succeeded
CRS-2672: Attempting to start 'ora.storage' on 'db2'
CRS-2676: Start of 'ora.storage' on 'db2' succeeded
CRS-2672: Attempting to start 'ora.crf' on 'db2'
CRS-2676: Start of 'ora.crf' on 'db2' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'db2'
CRS-2676: Start of 'ora.crsd' on 'db2' succeeded
CRS-6017: Processing resource auto-start for servers: db2
CRS-2672: Attempting to start 'ora.ASMNET1LSNR_ASM.lsnr' on 'db2'
CRS-2672: Attempting to start 'ora.net1.network' on 'db2'
CRS-2676: Start of 'ora.net1.network' on 'db2' succeeded
CRS-2672: Attempting to start 'ora.ons' on 'db2'
CRS-2676: Start of 'ora.ASMNET1LSNR_ASM.lsnr' on 'db2' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'db2'
CRS-2676: Start of 'ora.ons' on 'db2' succeeded
CRS-2676: Start of 'ora.asm' on 'db2' succeeded
CRS-6016: Resource auto-start has completed for server db2
CRS-6024: Completed start of Oracle Cluster Ready Services-managed resources
CRS-4123: Oracle High Availability Services has been started.
2022/01/08 22:22:10 CLSRSC-343: Successfully started Oracle Clusterware stack
2022/01/08 22:22:10 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.
2022/01/08 22:22:20 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.
2022/01/08 22:22:29 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded

centos7 安装部署 Arthas centos7安装rac_数据库_15


centos7 安装部署 Arthas centos7安装rac_oracle_16

[grid@db1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
               ONLINE  ONLINE       db1                      STABLE
               ONLINE  ONLINE       db2                      STABLE
ora.DATA.dg
               ONLINE  ONLINE       db1                      STABLE
               ONLINE  ONLINE       db2                      STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       db1                      STABLE
               ONLINE  ONLINE       db2                      STABLE
ora.OCR.dg
               ONLINE  ONLINE       db1                      STABLE
               ONLINE  ONLINE       db2                      STABLE
ora.chad
               ONLINE  ONLINE       db1                      STABLE
               ONLINE  ONLINE       db2                      STABLE
ora.net1.network
               ONLINE  ONLINE       db1                      STABLE
               ONLINE  ONLINE       db2                      STABLE
ora.ons
               ONLINE  ONLINE       db1                      STABLE
               ONLINE  ONLINE       db2                      STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       db1                      STABLE
ora.MGMTLSNR
      1        ONLINE  ONLINE       db1                      169.254.34.153 111.1
                                                             11.111.111,STABLE
ora.asm
      1        ONLINE  ONLINE       db1                      Started,STABLE
      2        ONLINE  ONLINE       db2                      Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       db1                      STABLE
ora.db1.vip
      1        ONLINE  ONLINE       db1                      STABLE
ora.db2.vip
      1        ONLINE  ONLINE       db2                      STABLE
ora.mgmtdb
      1        ONLINE  ONLINE       db1                      Open,STABLE
ora.qosmserver
      1        ONLINE  ONLINE       db1                      STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       db1                      STABLE
--------------------------------------------------------------------------------

三、创建ASM数据盘

centos7 安装部署 Arthas centos7安装rac_数据库_17


centos7 安装部署 Arthas centos7安装rac_linux_18


centos7 安装部署 Arthas centos7安装rac_centos7 安装部署 Arthas_19

[grid@db1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
               ONLINE  ONLINE       db1                      STABLE
               ONLINE  ONLINE       db2                      STABLE
ora.DATA.dg
               ONLINE  ONLINE       db1                      STABLE
               ONLINE  ONLINE       db2                      STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       db1                      STABLE
               ONLINE  ONLINE       db2                      STABLE
ora.OCR.dg
               ONLINE  ONLINE       db1                      STABLE
               ONLINE  ONLINE       db2                      STABLE
ora.chad
               ONLINE  ONLINE       db1                      STABLE
               ONLINE  ONLINE       db2                      STABLE
ora.net1.network
               ONLINE  ONLINE       db1                      STABLE
               ONLINE  ONLINE       db2                      STABLE
ora.ons
               ONLINE  ONLINE       db1                      STABLE
               ONLINE  ONLINE       db2                      STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       db1                      STABLE
ora.MGMTLSNR
      1        ONLINE  ONLINE       db1                      169.254.34.153 111.1
                                                             11.111.111,STABLE
ora.asm
      1        ONLINE  ONLINE       db1                      Started,STABLE
      2        ONLINE  ONLINE       db2                      Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       db1                      STABLE
ora.db1.vip
      1        ONLINE  ONLINE       db1                      STABLE
ora.db2.vip
      1        ONLINE  ONLINE       db2                      STABLE
ora.mgmtdb
      1        ONLINE  ONLINE       db1                      Open,STABLE
ora.qosmserver
      1        ONLINE  ONLINE       db1                      STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       db1                      STABLE
--------------------------------------------------------------------------------

四、db软件安装

解压db软件

chown -R oracle:oinstall /soft
su - oracle -c "unzip -q /soft/linuxx64_12201_database.zip -d /soft/"

centos7 安装部署 Arthas centos7安装rac_centos7 安装部署 Arthas_20


centos7 安装部署 Arthas centos7安装rac_bc_21


centos7 安装部署 Arthas centos7安装rac_数据库_22


centos7 安装部署 Arthas centos7安装rac_bc_23


centos7 安装部署 Arthas centos7安装rac_数据库_24


centos7 安装部署 Arthas centos7安装rac_centos7 安装部署 Arthas_25


centos7 安装部署 Arthas centos7安装rac_oracle_26


centos7 安装部署 Arthas centos7安装rac_oracle_27


centos7 安装部署 Arthas centos7安装rac_bc_28


centos7 安装部署 Arthas centos7安装rac_bc_29

[root@db1 soft]# /u01/app/oracle/product/12.2.0/db/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/12.2.0/db

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
[root@db2 ~]# /u01/app/oracle/product/12.2.0/db/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/12.2.0/db

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.

centos7 安装部署 Arthas centos7安装rac_bc_30

五、创建数据库实例

centos7 安装部署 Arthas centos7安装rac_bc_31


centos7 安装部署 Arthas centos7安装rac_oracle_32


centos7 安装部署 Arthas centos7安装rac_linux_33


centos7 安装部署 Arthas centos7安装rac_centos7 安装部署 Arthas_34


centos7 安装部署 Arthas centos7安装rac_oracle_35


centos7 安装部署 Arthas centos7安装rac_linux_36


centos7 安装部署 Arthas centos7安装rac_centos7 安装部署 Arthas_37


centos7 安装部署 Arthas centos7安装rac_数据库_38


centos7 安装部署 Arthas centos7安装rac_centos7 安装部署 Arthas_39


centos7 安装部署 Arthas centos7安装rac_bc_40


centos7 安装部署 Arthas centos7安装rac_centos7 安装部署 Arthas_41


centos7 安装部署 Arthas centos7安装rac_oracle_42


centos7 安装部署 Arthas centos7安装rac_bc_43


centos7 安装部署 Arthas centos7安装rac_bc_44

[grid@db1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
               ONLINE  ONLINE       db1                      STABLE
               ONLINE  ONLINE       db2                      STABLE
ora.DATA.dg
               ONLINE  ONLINE       db1                      STABLE
               ONLINE  ONLINE       db2                      STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       db1                      STABLE
               ONLINE  ONLINE       db2                      STABLE
ora.OCR.dg
               ONLINE  ONLINE       db1                      STABLE
               ONLINE  ONLINE       db2                      STABLE
ora.chad
               ONLINE  ONLINE       db1                      STABLE
               ONLINE  ONLINE       db2                      STABLE
ora.net1.network
               ONLINE  ONLINE       db1                      STABLE
               ONLINE  ONLINE       db2                      STABLE
ora.ons
               ONLINE  ONLINE       db1                      STABLE
               ONLINE  ONLINE       db2                      STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       db1                      STABLE
ora.MGMTLSNR
      1        ONLINE  ONLINE       db1                      169.254.34.153 111.1
                                                             11.111.111,STABLE
ora.asm
      1        ONLINE  ONLINE       db1                      Started,STABLE
      2        ONLINE  ONLINE       db2                      Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       db1                      STABLE
ora.db1.vip
      1        ONLINE  ONLINE       db1                      STABLE
ora.db2.vip
      1        ONLINE  ONLINE       db2                      STABLE
ora.mgmtdb
      1        ONLINE  ONLINE       db1                      Open,STABLE
ora.orcl.db
      1        ONLINE  ONLINE       db1                      Open,HOME=/u01/app/o
                                                             racle/product/12.2.0
                                                             /db,STABLE
      2        ONLINE  ONLINE       db2                      Open,HOME=/u01/app/o
                                                             racle/product/12.2.0
                                                             /db,STABLE
ora.qosmserver
      1        ONLINE  ONLINE       db1                      STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       db1                      STABLE
--------------------------------------------------------------------------------