RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

       RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

                                                           作者:吴伟龙(PrudentWoo)

 

一、     RAC架构规划

1.1.   网络架构规划

项目

RAC节点一

RAC节点二

主机名

ora19crac1

ora19crac2

Private IP地址 (ens32)

90.90.90.1

90.90.90.2

Public IP地址 (ens33)

192.168.84.91

192.168.84.92

Public-vip地址(ens33)

192.168.84.93

192.168.84.94

SCAN_IP (ens33)

192.168.90.15

SCAN_NAME

scan-ora19racdb

 

1.2.   存储规划

共享磁盘路径

ASM磁盘名称

ASM磁盘组名称

大小

冗余

/dev/sdb1

asm_ocr_1

OCR_VOT_GP1

1GB

Normal

/dev/sdc1

asm_ocr_2

1GB

/dev/sdd1

asm_ocr_3

1GB

/dev/sde1

asm_data1

DATA_GP01

5GB

External

/dev/sdf1

asm_fra01

FRA_GP01

3GB

external

 

备注:19c中MGMT是可选项,经过过12c的摧残,我相信大部分人和企业都不愿意使用,在安装GI的时候选择No即可。

1.3.   软件规划

虚拟机软件

VMware Workstation 15.5.1 pro

操作系统

Red Hat Enterprise Linux Server release   7.7 (Maipo)

集群软件

Oracle Clusterware 19.3.0

数据库软件

Oracle Database EnterPrise 19.3.0

 

 

二、          虚拟机配置

2.1.   修改vmware配置文件以支持共享磁盘:

在节点一添加硬盘à选择scsi—>立即分配,按磁盘规划表格共添加五块磁盘,节点二选择使用现有虚拟磁盘,找到相应的五个磁盘文件,都添加好后关闭VMware Workstation软件,打开所有节点的.vmx文件添加如下内容,完成共享磁盘的配置。

 

disk.locking = "FALSE"
diskLib.dataCacheMaxSize = "0" 
diskLib.dataCacheMaxReadAheadSize = "0" 
diskLib.dataCacheMinReadAheadSize = "0" 
diskLib.dataCachePageSize = "4096" 
diskLib.maxUnsyncedWrites = "0"     
unity.wasCapable = "TRUE"
 
scsi0:5.fileName = "D:\vmware\ora19cRAC\share_disk\datadg01.vmdk"
scsi0:5.present = "TRUE"
scsi0:1.fileName = "D:\vmware\ora19cRAC\share_disk\ocrvot01.vmdk"
scsi0:1.present = "TRUE"
scsi0:2.fileName = "D:\vmware\ora19cRAC\share_disk\ocrvot02.vmdk"
scsi0:2.present = "TRUE"
scsi0:3.fileName = "D:\vmware\ora19cRAC\share_disk\ocrvot03.vmdk"
scsi0:3.present = "TRUE"
scsi0:4.fileName = "D:\vmware\ora19cRAC\share_disk\mgmt.vmdk"
scsi0:4.present = "TRUE"
scsi0:4.redo = ""
scsi0:3.redo = ""
scsi0:2.redo = ""
scsi0:1.redo = ""
scsi0:5.redo = ""
scsi0:0.redo = ""
 
scsi0:1.mode = "independent-persistent"
scsi0:1.deviceType = "disk"
scsi0:2.mode = "independent-persistent"
scsi0:2.deviceType = "disk"
scsi0:3.mode = "independent-persistent"
scsi0:3.deviceType = "disk"
scsi0:4.mode = "independent-persistent"
scsi0:4.deviceType = "disk"
scsi0:5.mode = "independent-persistent"
scsi0:4.deviceType = "disk"

 

 

修改主机名,配置IP地址

# ora19crac1:

 

[[email protected] ~]# cat /etc/hostname 
ora19crac1
 
[[email protected] ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens32 
TYPE=Ethernet
BOOTPROTO=none
NAME=ens32
DEVICE=ens32
ONBOOT=yes
IPADDR=90.90.90.1
NETMASK=255.255.255.0
ARPCHECK=no
 
[[email protected] ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens33
TYPE=Ethernet
BOOTPROTO=none
NAME=ens33
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.84.91
NETMASK=255.255.255.0
GATEWAY=192.168.84.1
ARPCHECK=no

三、          安装环境准备

备注:该过程均在两台主机上同时操作

3.1.   修改主机名和IP地址

 

# ora19crac1
# 修改主机名
[[email protected] ~]# vi /etc/hostsname
[[email protected] ~]# cat /etc/hostname
ora19crac1
 
# 修改私网IP地址
[[email protected] ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens32
TYPE=Ethernet
BOOTPROTO=none
NAME=ens32
DEVICE=ens32
ONBOOT=yes
IPADDR=90.90.90.1
NETMASK=255.255.255.0
 
# 修改公网IP地址
[[email protected] ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens33
TYPE=Ethernet
BOOTPROTO=none
NAME=ens33
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.84.91
NETMASK=255.255.255.0
GATEWAY=192.168.84.1

 

3.2.   关闭时间同步服务

 

[[email protected] ~]# systemctl stop chronyd
[[email protected] ~]# systemctl disable chronyd
[[email protected] ~]# mv /etc/chrony.conf /etc/chrony.conf.bak

 

3.3.   关闭防火墙和SELinux

 

[[email protected] ~]# chkconfig iptables off
[[email protected] ~]# chkconfig ip6tables off
[[email protected] ~]# setenforce Permissive
[[email protected] ~]# setenforce 0
[[email protected] ~]#sed -i "/^SELINUX=/s#enforcing#disabled#" /etc/selinux/config
[[email protected] ~]# vi /etc/selinux/config
SELINUX=disabled
 
[[email protected] ~]# service iptables stop
iptables: Setting chains to policy ACCEPT: filter [  OK  ]
iptables: Flushing firewall rules: [  OK  ]
iptables: Unloading modules: [  OK  ]
 
[[email protected] ~]# service ip6tables stop
ip6tables: Setting chains to policy ACCEPT: filter [  OK  ]
ip6tables: Flushing firewall rules: [  OK  ]
ip6tables: Unloading modules: [  OK  ]

 

3.4.        RHEL 7禁用防火墙

 

[[email protected] ~]# systemctl list-unit-files|grep firewalld
firewalld.service                             enabled 
 
[[email protected] ~]# systemctl stop firewalld.service
[[email protected] ~]# systemctl disable firewalld.service
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

 

3.5.        配置本地YUM:

 

[[email protected] ~]# mount /dev/sr0 /mnt/
mount: /dev/sr0 is write-protected, mounting read-only
 
[[email protected] ~]# cat > /etc/yum.repos.d/local.repo <<EOF
> [base]
> name=base
> baseurl=file:///mnt
> enabled=1
> gpgcheck=0
> multilib_policy=all
> EOF
 
[[email protected] ~]# yum clean all
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Cleaning repos: base
 
[[email protected] ~]# yum makecache
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
base                                                                                                    | 2.8 kB  00:00:00     
(1/5): base/group_gz                                                                                    | 103 kB  00:00:00     
(2/5): base/primary                                                                                     | 2.0 MB  00:00:00     
(3/5): base/filelists                                                                                   | 3.1 MB  00:00:00     
(4/5): base/other                                                                                       | 1.1 MB  00:00:00     
(5/5): base/productid                                                                                   | 1.6 kB  00:00:00     
base                                                                                                                 5229/5229
base                                                                                                                 5229/5229
base                                                                                                                 5229/5229
Metadata Cache Created

 

3.6.        安装桌面

 

[[email protected] ~]# yum groupinstall -y "Server with GUI"
[[email protected] ~]# cd /etc/systemd/system/
[[email protected] system]# ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target
[[email protected] system]# reboot

 

3.7.        创建用户和组

 

# 检查并创建用户组
[[email protected] ~]# grep 54[4,3] /etc/group
[[email protected] ~]# groupadd -g 54421 oinstall
[[email protected] ~]# groupadd -g 54322 dba
[[email protected] ~]# groupadd -g 54323 oper
[[email protected] ~]# groupadd -g 54324 backupdba
[[email protected] ~]# groupadd -g 54325 dgdba
[[email protected] ~]# groupadd -g 54326 kmdba
[[email protected] ~]# groupadd -g 54327 asmdba
[[email protected] ~]# groupadd -g 54328 asmoper
[[email protected] ~]# groupadd -g 54329 asmadmin
[[email protected] ~]# groupadd -g 54330 racdba
[[email protected] ~]# grep 54[4,3] /etc/group
oinstall:x:54421:
dba:x:54322:
oper:x:54323:
backupdba:x:54324:
dgdba:x:54325:
kmdba:x:54326:
asmdba:x:54327:
asmoper:x:54328:
asmadmin:x:54329:
racdba:x:54330:
 
# 检查并创建用户
[[email protected] ~]# grep oracle /etc/passwd
[[email protected] ~]# grep grid /etc/passwd
[[email protected] ~]# /usr/sbin/useradd -u 54322 -g oinstall -G asmadmin,asmdba,asmoper,racdba grid
[[email protected] ~]# /usr/sbin/useradd -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba,racdba,oper oracle
 
# 配置用户密码
[[email protected] ~]# echo "oracle" | passwd --stdin oracle
[[email protected] ~]#echo "oracle" | passwd --stdin grid
# 检查创建完成之后的用户信息
[[email protected] ~]# grep oracle /etc/passwd
oracle:x:54323:54421::/home/oracle:/bin/bash
[[email protected] ~]# grep grid /etc/passwd
grid:x:54322:54421::/home/grid:/bin/bash
[[email protected] ~]# id grid
uid=54322(grid) gid=54421(oinstall) groups=54421(oinstall),54327(asmdba),54329(asmadmin),54330(racdba)
[[email protected] ~]# id oracle
uid=54323(oracle) gid=54421(oinstall) groups=54421(oinstall),54322(dba),54323(oper),54324(backupdba),54325(dgdba),54326(kmdba),54327(asmdba),54330(racdba)

 

 

 

3.8.        创建目录

 

[[email protected] ~]# mkdir -p /u01/app/19.0.0/grid
[[email protected] ~]# mkdir -p /u01/app/grid
[[email protected] ~]# mkdir -p /u01/app/oracle

 

3.9.        给数据库安装目录授权

 

[[email protected] ~]# chown -R grid:oinstall /u01
[[email protected] ~]# chown oracle:oinstall /u01/app/oracle
[[email protected] ~]# chmod -R 775 /u01/

 

3.10.    安装软件包

 

# 需要安装的软件包信息
setarch binutils compat-libstdc++-33 compat-db compat-libstdc++ compat-gcc elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel libaio libaio-devel libgcc libstdc++ libstdc++-devel make ksh numactl sysstat libXp unixODBC unixODBC-devel udev
 
# 挂载光盘安装软件
[[email protected] ~]# mount /dev/sr0 /mnt/
mount: /dev/sr0 is write-protected, mounting read-only
[[email protected] ~]# yum install -y bc binutils compat-libcap1 compat-libstdc++ elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio libaio-devel libXrender libXrender-devel libX11 libXau libXi libXtst libgcc libstdc++ libstdc++-devel libxcb make net-tools  targetcli smartmontools sysstat gcc gcc-c++ gcc-info gcc-locale gcc48 gcc48-info gcc48-locale gcc48-c++
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
base                                                                                                    | 2.8 kB  00:00:00     
Package bc-1.06.95-13.el7.x86_64 already installed and latest version
Package binutils-2.27-41.base.el7.x86_64 already installed and latest version
No package compat-libstdc++ available.
Package elfutils-libelf-0.176-2.el7.x86_64 already installed and latest version
Package glibc-2.17-292.el7.x86_64 already installed and latest version
Package libaio-0.3.109-13.el7.x86_64 already installed and latest version
Package libXrender-0.9.10-1.el7.x86_64 already installed and latest version
Package libX11-1.6.7-2.el7.x86_64 already installed and latest version
Package libXau-1.0.8-2.1.el7.x86_64 already installed and latest version
Package libXi-1.7.9-1.el7.x86_64 already installed and latest version
Package libXtst-1.2.3-1.el7.x86_64 already installed and latest version
Package libgcc-4.8.5-39.el7.x86_64 already installed and latest version
Package libstdc++-4.8.5-39.el7.x86_64 already installed and latest version
Package libxcb-1.13-1.el7.x86_64 already installed and latest version
Package 1:make-3.82-24.el7.x86_64 already installed and latest version
Package net-tools-2.0-0.25.20131004git.el7.x86_64 already installed and latest version
Package 1:smartmontools-7.0-1.el7.x86_64 already installed and latest version
Package sysstat-10.1.5-18.el7.x86_64 already installed and latest version
No package gcc-info available.
No package gcc-locale available.
No package gcc48 available.
No package gcc48-info available.
No package gcc48-locale available.
No package gcc48-c++ available.
Resolving Dependencies
--> Running transaction check
---> Package compat-libcap1.x86_64 0:1.10-7.el7 will be installed
---> Package elfutils-libelf-devel.x86_64 0:0.176-2.el7 will be installed
--> Processing Dependency: pkgconfig(zlib) for package: elfutils-libelf-devel-0.176-2.el7.x86_64
---> Package fontconfig-devel.x86_64 0:2.13.0-4.3.el7 will be installed
--> Processing Dependency: pkgconfig(freetype2) >= 20.0.14 for package: fontconfig-devel-2.13.0-4.3.el7.x86_64
--> Processing Dependency: freetype-devel >= 2.8-7 for package: fontconfig-devel-2.13.0-4.3.el7.x86_64
--> Processing Dependency: pkgconfig(uuid) for package: fontconfig-devel-2.13.0-4.3.el7.x86_64
--> Processing Dependency: pkgconfig(expat) for package: fontconfig-devel-2.13.0-4.3.el7.x86_64
---> Package gcc.x86_64 0:4.8.5-39.el7 will be installed
--> Processing Dependency: cpp = 4.8.5-39.el7 for package: gcc-4.8.5-39.el7.x86_64
---> Package gcc-c++.x86_64 0:4.8.5-39.el7 will be installed
---> Package glibc-devel.x86_64 0:2.17-292.el7 will be installed
--> Processing Dependency: glibc-headers = 2.17-292.el7 for package: glibc-devel-2.17-292.el7.x86_64
--> Processing Dependency: glibc-headers for package: glibc-devel-2.17-292.el7.x86_64
---> Package ksh.x86_64 0:20120801-139.el7 will be installed
---> Package libXrender-devel.x86_64 0:0.9.10-1.el7 will be installed
---> Package libaio-devel.x86_64 0:0.3.109-13.el7 will be installed
---> Package libstdc++-devel.x86_64 0:4.8.5-39.el7 will be installed
---> Package targetcli.noarch 0:2.1.fb49-1.el7 will be installed
--> Processing Dependency: python-rtslib >= 2.1.fb41 for package: targetcli-2.1.fb49-1.el7.noarch
--> Processing Dependency: python-configshell for package: targetcli-2.1.fb49-1.el7.noarch
--> Running transaction check
---> Package cpp.x86_64 0:4.8.5-39.el7 will be installed
---> Package expat-devel.x86_64 0:2.1.0-10.el7_3 will be installed
---> Package freetype-devel.x86_64 0:2.8-14.el7 will be installed
--> Processing Dependency: pkgconfig(libpng) for package: freetype-devel-2.8-14.el7.x86_64
---> Package glibc-headers.x86_64 0:2.17-292.el7 will be installed
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.17-292.el7.x86_64
--> Processing Dependency: kernel-headers for package: glibc-headers-2.17-292.el7.x86_64
---> Package libuuid-devel.x86_64 0:2.23.2-61.el7 will be installed
---> Package python-configshell.noarch 1:1.1.fb25-1.el7 will be installed
--> Processing Dependency: python-urwid for package: 1:python-configshell-1.1.fb25-1.el7.noarch
--> Processing Dependency: pyparsing for package: 1:python-configshell-1.1.fb25-1.el7.noarch
---> Package python-rtslib.noarch 0:2.1.fb69-3.el7 will be installed
--> Processing Dependency: python-kmod for package: python-rtslib-2.1.fb69-3.el7.noarch
---> Package zlib-devel.x86_64 0:1.2.7-18.el7 will be installed
--> Running transaction check
---> Package kernel-headers.x86_64 0:3.10.0-1062.el7 will be installed
---> Package libpng-devel.x86_64 2:1.5.13-7.el7_2 will be installed
---> Package pyparsing.noarch 0:1.5.6-9.el7 will be installed
---> Package python-kmod.x86_64 0:0.9-4.el7 will be installed
---> Package python-urwid.x86_64 0:1.1.1-3.el7 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
===============================================================================================================================
 Package                                Arch                    Version                            Repository             Size
===============================================================================================================================
Installing:
 compat-libcap1                         x86_64                  1.10-7.el7                         base                   19 k
 elfutils-libelf-devel                  x86_64                  0.176-2.el7                        base                   39 k
 fontconfig-devel                       x86_64                  2.13.0-4.3.el7                     base                  138 k
 gcc                                    x86_64                  4.8.5-39.el7                       base                   16 M
 gcc-c++                                x86_64                  4.8.5-39.el7                       base                  7.2 M
 glibc-devel                            x86_64                  2.17-292.el7                       base                  1.1 M
 ksh                                    x86_64                  20120801-139.el7                   base                  885 k
 libXrender-devel                       x86_64                  0.9.10-1.el7                       base                   17 k
 libaio-devel                           x86_64                  0.3.109-13.el7                     base                   13 k
 libstdc++-devel                        x86_64                  4.8.5-39.el7                       base                  1.5 M
 targetcli                              noarch                  2.1.fb49-1.el7                     base                   68 k
Installing for dependencies:
 cpp                                    x86_64                  4.8.5-39.el7                       base                  6.0 M
 expat-devel                            x86_64                  2.1.0-10.el7_3                     base                   57 k
 freetype-devel                         x86_64                  2.8-14.el7                         base                  447 k
 glibc-headers                          x86_64                  2.17-292.el7                       base                  687 k
 kernel-headers                         x86_64                  3.10.0-1062.el7                    base                  8.7 M
 libpng-devel                           x86_64                  2:1.5.13-7.el7_2                   base                  122 k
 libuuid-devel                          x86_64                  2.23.2-61.el7                      base                   92 k
 pyparsing                              noarch                  1.5.6-9.el7                        base                   94 k
 python-configshell                     noarch                  1:1.1.fb25-1.el7                   base                   68 k
 python-kmod                            x86_64                  0.9-4.el7                          base                   57 k
 python-rtslib                          noarch                  2.1.fb69-3.el7                     base                  102 k
 python-urwid                           x86_64                  1.1.1-3.el7                        base                  654 k
 zlib-devel                             x86_64                  1.2.7-18.el7                       base                   50 k
 
Transaction Summary
===============================================================================================================================
Install  11 Packages (+13 Dependent packages)
 
Total download size: 44 M
Installed size: 95 M
Downloading packages:
-------------------------------------------------------------------------------------------------------------------------------
Total                                                                                           82 MB/s |  44 MB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : zlib-devel-1.2.7-18.el7.x86_64                                                                             1/24 
  Installing : 2:libpng-devel-1.5.13-7.el7_2.x86_64                                                                       2/24 
  Installing : freetype-devel-2.8-14.el7.x86_64                                                                           3/24 
  Installing : cpp-4.8.5-39.el7.x86_64                                                                                    4/24 
  Installing : python-kmod-0.9-4.el7.x86_64                                                                               5/24 
  Installing : python-rtslib-2.1.fb69-3.el7.noarch                                                                        6/24 
  Installing : python-urwid-1.1.1-3.el7.x86_64                                                                            7/24 
  Installing : libstdc++-devel-4.8.5-39.el7.x86_64                                                                        8/24 
  Installing : expat-devel-2.1.0-10.el7_3.x86_64                                                                          9/24 
  Installing : pyparsing-1.5.6-9.el7.noarch                                                                              10/24 
  Installing : 1:python-configshell-1.1.fb25-1.el7.noarch                                                                11/24 
  Installing : kernel-headers-3.10.0-1062.el7.x86_64                                                                     12/24 
  Installing : glibc-headers-2.17-292.el7.x86_64                                                                         13/24 
  Installing : glibc-devel-2.17-292.el7.x86_64                                                                           14/24 
  Installing : gcc-4.8.5-39.el7.x86_64                                                                                   15/24 
  Installing : libuuid-devel-2.23.2-61.el7.x86_64                                                                        16/24 
  Installing : fontconfig-devel-2.13.0-4.3.el7.x86_64                                                                    17/24 
  Installing : gcc-c++-4.8.5-39.el7.x86_64                                                                               18/24 
  Installing : targetcli-2.1.fb49-1.el7.noarch                                                                           19/24 
  Installing : elfutils-libelf-devel-0.176-2.el7.x86_64                                                                  20/24 
  Installing : libaio-devel-0.3.109-13.el7.x86_64                                                                        21/24 
  Installing : compat-libcap1-1.10-7.el7.x86_64                                                                          22/24 
  Installing : ksh-20120801-139.el7.x86_64                                                                               23/24 
  Installing : libXrender-devel-0.9.10-1.el7.x86_64                                                                      24/24 
  Verifying  : 2:libpng-devel-1.5.13-7.el7_2.x86_64                                                                       1/24 
  Verifying  : libuuid-devel-2.23.2-61.el7.x86_64                                                                         2/24 
  Verifying  : kernel-headers-3.10.0-1062.el7.x86_64                                                                      3/24 
  Verifying  : gcc-4.8.5-39.el7.x86_64                                                                                    4/24 
  Verifying  : pyparsing-1.5.6-9.el7.noarch                                                                               5/24 
  Verifying  : expat-devel-2.1.0-10.el7_3.x86_64                                                                          6/24 
  Verifying  : fontconfig-devel-2.13.0-4.3.el7.x86_64                                                                     7/24 
  Verifying  : zlib-devel-1.2.7-18.el7.x86_64                                                                             8/24 
  Verifying  : targetcli-2.1.fb49-1.el7.noarch                                                                            9/24 
  Verifying  : freetype-devel-2.8-14.el7.x86_64                                                                          10/24 
  Verifying  : libstdc++-devel-4.8.5-39.el7.x86_64                                                                       11/24 
  Verifying  : libXrender-devel-0.9.10-1.el7.x86_64                                                                      12/24 
  Verifying  : python-urwid-1.1.1-3.el7.x86_64                                                                           13/24 
  Verifying  : ksh-20120801-139.el7.x86_64                                                                               14/24 
  Verifying  : gcc-c++-4.8.5-39.el7.x86_64                                                                               15/24 
  Verifying  : elfutils-libelf-devel-0.176-2.el7.x86_64                                                                  16/24 
  Verifying  : compat-libcap1-1.10-7.el7.x86_64                                                                          17/24 
  Verifying  : libaio-devel-0.3.109-13.el7.x86_64                                                                        18/24 
  Verifying  : 1:python-configshell-1.1.fb25-1.el7.noarch                                                                19/24 
  Verifying  : python-kmod-0.9-4.el7.x86_64                                                                              20/24 
  Verifying  : glibc-devel-2.17-292.el7.x86_64                                                                           21/24 
  Verifying  : cpp-4.8.5-39.el7.x86_64                                                                                   22/24 
  Verifying  : python-rtslib-2.1.fb69-3.el7.noarch                                                                       23/24 
  Verifying  : glibc-headers-2.17-292.el7.x86_64                                                                         24/24 
 
Installed:
  compat-libcap1.x86_64 0:1.10-7.el7     elfutils-libelf-devel.x86_64 0:0.176-2.el7  fontconfig-devel.x86_64 0:2.13.0-4.3.el7 
  gcc.x86_64 0:4.8.5-39.el7              gcc-c++.x86_64 0:4.8.5-39.el7               glibc-devel.x86_64 0:2.17-292.el7        
  ksh.x86_64 0:20120801-139.el7          libXrender-devel.x86_64 0:0.9.10-1.el7      libaio-devel.x86_64 0:0.3.109-13.el7     
  libstdc++-devel.x86_64 0:4.8.5-39.el7  targetcli.noarch 0:2.1.fb49-1.el7          
 
Dependency Installed:
  cpp.x86_64 0:4.8.5-39.el7              expat-devel.x86_64 0:2.1.0-10.el7_3       freetype-devel.x86_64 0:2.8-14.el7          
  glibc-headers.x86_64 0:2.17-292.el7    kernel-headers.x86_64 0:3.10.0-1062.el7   libpng-devel.x86_64 2:1.5.13-7.el7_2        
  libuuid-devel.x86_64 0:2.23.2-61.el7   pyparsing.noarch 0:1.5.6-9.el7            python-configshell.noarch 1:1.1.fb25-1.el7  
  python-kmod.x86_64 0:0.9-4.el7         python-rtslib.noarch 0:2.1.fb69-3.el7     python-urwid.x86_64 0:1.1.1-3.el7           
  zlib-devel.x86_64 0:1.2.7-18.el7      
 
Complete!

 

3.11.    单独手工安装compat-libstdc++

 

[[email protected] ~]# ls
compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm
 
[[email protected] ~]# rpm -ivh compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm 
warning: compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:compat-libstdc++-33-3.2.3-69.el6 ################################# [100%]
 
[[email protected] ~]# rpm -ivh compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm 
warning: compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:compat-libstdc++-33-3.2.3-69.el6 ################################# [100%]

 

3.12.    检查已安装的软件包

 

[[email protected] ~]# rpm -qa bc binutils compat-libcap1 compat-libstdc++ elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio libaio-devel libXrender libXrender-devel libX11 libXau libXi libXtst libgcc libstdc++ libstdc++-devel libxcb make net-tools  targetcli smartmontools sysstat gcc gcc-c++ gcc-info gcc-locale gcc48 gcc48-info gcc48-locale gcc48-c++
libXtst-1.2.3-1.el7.x86_64
net-tools-2.0-0.25.20131004git.el7.x86_64
targetcli-2.1.fb49-1.el7.noarch
binutils-2.27-41.base.el7.x86_64
libaio-0.3.109-13.el7.x86_64
libXrender-0.9.10-1.el7.x86_64
libstdc++-devel-4.8.5-39.el7.x86_64
libXau-1.0.8-2.1.el7.x86_64
libXrender-devel-0.9.10-1.el7.x86_64
glibc-2.17-292.el7.x86_64
elfutils-libelf-0.176-2.el7.x86_64
libxcb-1.13-1.el7.x86_64
libX11-1.6.7-2.el7.x86_64
libXi-1.7.9-1.el7.x86_64
fontconfig-devel-2.13.0-4.3.el7.x86_64
libaio-devel-0.3.109-13.el7.x86_64
libgcc-4.8.5-39.el7.x86_64
libstdc++-4.8.5-39.el7.x86_64
bc-1.06.95-13.el7.x86_64
glibc-devel-2.17-292.el7.x86_64
gcc-c++-4.8.5-39.el7.x86_64
compat-libcap1-1.10-7.el7.x86_64
sysstat-10.1.5-18.el7.x86_64
make-3.82-24.el7.x86_64
gcc-4.8.5-39.el7.x86_64
ksh-20120801-139.el7.x86_64
smartmontools-7.0-1.el7.x86_64
elfutils-libelf-devel-0.176-2.el7.x86_64
[[email protected] ~]# rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n"  bc binutils compat-libcap1 compat-libstdc++ elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio libaio-devel libXrender libXrender-devel libX11 libXau libXi libXtst libgcc libstdc++ libstdc++-devel libxcb make net-tools  targetcli smartmontools sysstat gcc gcc-c++ gcc-info gcc-locale gcc48 gcc48-info gcc48-locale gcc48-c++
libXtst-1.2.3-1.el7 (x86_64)
net-tools-2.0-0.25.20131004git.el7 (x86_64)
targetcli-2.1.fb49-1.el7 (noarch)
binutils-2.27-41.base.el7 (x86_64)
libaio-0.3.109-13.el7 (x86_64)
libXrender-0.9.10-1.el7 (x86_64)
libstdc++-devel-4.8.5-39.el7 (x86_64)
libXau-1.0.8-2.1.el7 (x86_64)
libXrender-devel-0.9.10-1.el7 (x86_64)
glibc-2.17-292.el7 (x86_64)
elfutils-libelf-0.176-2.el7 (x86_64)
libxcb-1.13-1.el7 (x86_64)
libX11-1.6.7-2.el7 (x86_64)
libXi-1.7.9-1.el7 (x86_64)
fontconfig-devel-2.13.0-4.3.el7 (x86_64)
libaio-devel-0.3.109-13.el7 (x86_64)
libgcc-4.8.5-39.el7 (x86_64)
libstdc++-4.8.5-39.el7 (x86_64)
bc-1.06.95-13.el7 (x86_64)
glibc-devel-2.17-292.el7 (x86_64)
gcc-c++-4.8.5-39.el7 (x86_64)
compat-libcap1-1.10-7.el7 (x86_64)
sysstat-10.1.5-18.el7 (x86_64)
make-3.82-24.el7 (x86_64)
gcc-4.8.5-39.el7 (x86_64)
ksh-20120801-139.el7 (x86_64)
smartmontools-7.0-1.el7 (x86_64)
elfutils-libelf-devel-0.176-2.el7 (x86_64)

 

3.13.    编辑hosts文件

 

cat >> /etc/hosts <<EOF
 
#public
192.168.84.91      ora19crac1
192.168.84.92      ora19crac2
 
#public-vip
192.168.84.93      ora19crac1-vip
192.168.84.94      ora19crac2-vip
 
#prive-ip
90.90.90.1         ora19crac1-priv
90.90.90.2         ora19crac2-priv
 
#scan-ip
192.168.90.15      scan-ora19cracdb
EOF

 

3.14. 配置ZEROCONF

cat "NOZEROCONF=yes" >> /etc/sysconfig/network

 

3.15. 修改系统内核参数

 

[[email protected] ~]# cat >> /etc/sysctl.conf <<EOF
> kernel.shmall = 4294967296
> kernel.sem = 510 65280 510 128
> kernel.shmmni = 4096
> kernel.shmmax = 137438953472
> net.ipv4.ip_local_port_range = 9000 65500
> net.core.rmem_default = 1048576
> net.core.rmem_max = 4194304
> net.core.wmem_default = 262144
> net.core.wmem_max = 1048576
> fs.file-max = 6815744
> fs.aio-max-nr = 1048576
> vm.swappiness = 0
> vm.dirty_background_ratio = 3
> vm.dirty_ratio = 80
> vm.dirty_expire_centisecs = 500
> vm.dirty_writeback_centisecs = 100
> net.ipv4.tcp_sack = 0
> net.ipv4.tcp_timestamps = 0
> net.ipv4.conf.default.rp_filter = 0
> net.ipv4.tcp_wmem = 262144
> net.ipv4.tcp_rmem = 4194304
> EOF

3.16. 配置LIMITS限制参数

 

[[email protected] ~]# cat >> /etc/security/limits.conf <<EOF
> oracle          soft    nproc           2047
> oracle          hard    nproc           16384
> oracle          soft    nofile          65536
> oracle          hard    nofile          65536
> oracle          soft    memlock         3145728
> oracle          hard    memlock         3145728
> oracle          soft    stack           10240
> oracle          hard    stack           32768
 
> grid          soft    nproc           2047
> grid          hard    nproc           16384
> grid          soft    nofile          65536
> grid          hard    nofile          65536
> grid          soft    memlock         3145728
> grid          hard    memlock         3145728
> grid          soft    stack           10240
> grid          hard    stack           32768
> #signaturelevin
> EOF

3.17. 配置系统环境变量

 

[[email protected] ~]# cat >> /etc/profile <<EOF
if [ \$USER = "oracle" ]||[ \$USER = "grid" ] ; then    
    if [ \$SHELL = "/bin/ksh" ]; then
        ulimit -p 16384
        ulimit -n 65536
    else
        ulimit -u 16384 -n 65536
    fi
fi
EOF

 

3.18. 配置root用户环境变量

 

cat >> /root/.bash_profile <<EOF
export
export CVUQDISK_GRP=oinstall
EOF
source .bash_profile

 

3.19.    配置grid用户环境变量

 

cat >> /home/grid/.bash_profile <<EOF
export TMP=/tmp
export TMPDIR=\$TMP
export EDIT=vi
alias  vi=vim
export ORACLE_SID=+ASM1
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/19.3.0/grid
export PATH=\$ORACLE_HOME/bin:\$PATH
export NLS_LANG=AMERICAN_AMERICA AL32UTF16
umask 022
EOF

 

3.20.    配置oracle用户环境变量

 

cat >> /home/oracle/.bash_profile <<EOF
export TMP=/tmp
export TMPDIR=\$TMP
export EDIT=vi
alias  vi=vim
export ORACLE_HOSTNAME=$HOSTNAME
export ORACLE_UNQNAME=woo19c
export ORACLE_BASE=/u01/app/oracle/
export ORACLE_HOME=\$ORACLE_BASE/product/19.3.0/dbhome_1
export ORACLE_SID=woo19c1
export ORACLE_TERM=xterm
export PATH=/usr/sbin:\$PATH
export PATH=\$ORACLE_HOME/bin:\$PATH
export LD_LIBRARY_PATH=\$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=\$ORACLE_HOME/JRE:\$ORACLE_HOME/jlib:\$ORACLE_HOME/rdbms/jlib
export NLS_LANG=AMERICAN_AMERICA AL32UTF16
umask 022
EOF

 

3.21. 关闭THP和NUMA

 

[[email protected] ~]# echo "transparent_hugepage=never numa=off" >> /etc/default/grub 
[[email protected] ~]# grub2-mkconfig -o /boot/grub2/grub.cfg 
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-1062.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-1062.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-7f68dbd79736467598cec06d8045a487
Found initrd image: /boot/initramfs-0-rescue-7f68dbd79736467598cec06d8045a487.img
done
[[email protected] ~]# grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-1062.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-1062.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-7f68dbd79736467598cec06d8045a487
Found initrd image: /boot/initramfs-0-rescue-7f68dbd79736467598cec06d8045a487.img
done

3.22. 禁用avahi

 

[[email protected] ~]# systemctl stop avahi-dnsconfd
[[email protected] ~]# systemctl stop avahi-daemon
[[email protected] ~]# systemctl disable avahi-dnsconfd
[[email protected] ~]# systemctl disable avahi-daemon

 

3.23.    磁盘规划

3.23.1.    创建分区

 

[[email protected] ~]# echo -e "n\np\n1\n\n\nw" | fdisk /dev/sdb
[[email protected] ~]# echo -e "n\np\n1\n\n\nw" | fdisk /dev/sdc
[[email protected] ~]# echo -e "n\np\n1\n\n\nw" | fdisk /dev/sdd
[[email protected] ~]# echo -e "n\np\n1\n\n\nw" | fdisk /dev/sde
[[email protected] ~]# fdisk -l |grep "/dev/sd" |grep -v sda |sort
/dev/sdb1            2048     2097151     1047552   83  Linux
/dev/sdc1            2048     2097151     1047552   83  Linux
/dev/sdd1            2048     2097151     1047552   83  Linux
/dev/sde1            2048     6291455     3144704   83  Linux
/dev/sdf1            2048    10485759     5241856   83  Linux
Disk /dev/sdb: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/sdc: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/sdd: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/sde: 3221 MB, 3221225472 bytes, 6291456 sectors
Disk /dev/sdf: 5368 MB, 5368709120 bytes, 10485760 sectors
 
[[email protected] ~]# fdisk -l |grep "/dev/sd" |grep -v sda |sort
/dev/sdb1            2048     2097151     1047552   83  Linux
/dev/sdc1            2048     2097151     1047552   83  Linux
/dev/sdd1            2048     2097151     1047552   83  Linux
/dev/sde1            2048     6291455     3144704   83  Linux
/dev/sdf1            2048    10485759     5241856   83  Linux
Disk /dev/sdb: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/sdc: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/sdd: 1073 MB, 1073741824 bytes, 2097152 sectors
Disk /dev/sde: 3221 MB, 3221225472 bytes, 6291456 sectors
Disk /dev/sdf: 5368 MB, 5368709120 bytes, 10485760 sectors

 

3.23.2.  UDEV RedHat 6手工方法(通用):

 

cat >> /etc/udev/rules.d/99-oracle-asmdevices.rules <<EOF
KERNEL=="sdb1", NAME="asm_ocr_1", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sdc1", NAME="asm_ocr_2", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sdd1", NAME="asm_ocr_3", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sde1", NAME="asm_mgmt", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sdf1", NAME="asm_data01", OWNER="grid", GROUP="asmadmin", MODE="0660"
EOF
 
cat >> /etc/udev/rules.d/99-oracle-asmdevices.rules <<EOF
> KERNEL=="sdb1", NAME="asm_ocr_1", OWNER="grid", GROUP="asmadmin", MODE="0660"
> KERNEL=="sdc1", NAME="asm_ocr_2", OWNER="grid", GROUP="asmadmin", MODE="0660"
> KERNEL=="sdd1", NAME="asm_ocr_3", OWNER="grid", GROUP="asmadmin", MODE="0660"
> KERNEL=="sde1", NAME="asm_mgmt", OWNER="grid", GROUP="asmadmin", MODE="0660"
> KERNEL=="sdf1", NAME="asm_data01", OWNER="grid", GROUP="asmadmin", MODE="0660"
> EOF
 
[[email protected] ~]# start_udev 
Starting udev: [  OK  ]

 

3.23.3.  UDEV RedHat 7手工方法

 

[[email protected] ~]# cat >> /etc/udev/rules.d/99-oracle-asmdevices.rules <<EOF
KERNEL=="sdb1", SYMLINK+="asm_ocr_1", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sdc1", SYMLINK+="asm_ocr_2", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sdd1", SYMLINK+="asm_ocr_3", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sde1", SYMLINK+="asm_mgmt", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sdf1", SYMLINK+="asm_data01", OWNER="grid", GROUP="asmadmin", MODE="0660"
EOF
 
[[email protected] ~]# cat >> /etc/udev/rules.d/99-oracle-asmdevices.rules <<EOF
KERNEL=="sdb1", SYMLINK+="asm_ocr_1", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sdc1", SYMLINK+="asm_ocr_2", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sdd1", SYMLINK+="asm_ocr_3", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sde1", SYMLINK+="asm_mgmt", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sdf1", SYMLINK+="asm_data01", OWNER="grid", GROUP="asmadmin", MODE="0660"
EOF
 
[[email protected] ~]# /sbin/udevadm trigger --type=devices --action=change
[[email protected] ~]# /sbin/udevadm control --reload-rules
[[email protected] ~]# systemctl enable systemd-udevd.service
[[email protected] ~]# systemctl restart systemd-udevd.service
[[email protected] ~]# systemctl status systemd-udevd.service
* systemd-udevd.service - udev Kernel Device Manager
   Loaded: loaded (/usr/lib/systemd/system/systemd-udevd.service; static; vendor preset: disabled)
   Active: active (running) since Fri 2020-02-28 01:32:10 CST; 9s ago
     Docs: man:systemd-udevd.service(8)
           man:udev(7)
 Main PID: 2414 (systemd-udevd)
   Status: "Processing with 16 children at max"
    Tasks: 1
   CGroup: /system.slice/systemd-udevd.service
           `-2414 /usr/lib/systemd/systemd-udevd
 
Feb 28 01:32:10 ora19crac1 systemd[1]: Starting udev Kernel Device Manager...
Feb 28 01:32:10 ora19crac1 systemd-udevd[2414]: starting version 219
Feb 28 01:32:10 ora19crac1 systemd[1]: Started udev Kernel Device Manager.
[[email protected] ~]# ls -rtl /dev/asm_* |sort
lrwxrwxrwx 1 root root 4 Feb 28 01:16 /dev/asm_data01 -> sdf1
lrwxrwxrwx 1 root root 4 Feb 28 01:16 /dev/asm_mgmt -> sde1
lrwxrwxrwx 1 root root 4 Feb 28 01:16 /dev/asm_ocr_1 -> sdb1
lrwxrwxrwx 1 root root 4 Feb 28 01:16 /dev/asm_ocr_2 -> sdc1
lrwxrwxrwx 1 root root 4 Feb 28 01:16 /dev/asm_ocr_3 -> sdd1
[[email protected] ~]# ls -rtl /dev/sd[b,c,d,e,f]1 |sort
brw-rw---- 1 grid asmadmin 8, 17 Feb 28 01:29 /dev/sdb1
brw-rw---- 1 grid asmadmin 8, 33 Feb 28 01:29 /dev/sdc1
brw-rw---- 1 grid asmadmin 8, 49 Feb 28 01:29 /dev/sdd1
brw-rw---- 1 grid asmadmin 8, 65 Feb 28 01:29 /dev/sde1
brw-rw---- 1 grid asmadmin 8, 81 Feb 28 01:29 /dev/sdf

 

 

3.23.4.  UDEV 配置脚本,RedHat 5及之前版本

for i in b c d e f g h i j k ; 
do 
echo "KERNEL==\"sd*\", BUS==\"scsi\", PROGRAM==\"/sbin/scsi_id -g -u -s %p\", RESULT==\"`scsi_id -g -u -s /block/sd$i`\", NAME=\"asm-disk$i\", OWNER=\"grid\", GROUP=\"asmadmin\", MODE=\"0660\"" 
done

 

以上脚本在Linux 5上都是通用的, 但是有人反映在redhat/Oracle Linux 6以上版本中该脚本失效了。

这是因为:

在OEL6或者RHEL6中,这一切都有所变化。

主要的变化是:
1. scsi_id的命令语法发生了变化,scsi_id -g -u -s这样的命令不再有效。
2. udevtest命令已经没有了,整合到了udevadm中。
How to use udev for Oracle ASM in Oracle Linux 6  

 

下面我提供改良后的脚本,可以在redhat/Oracle Linux 6上生成正确的udev rule 规则文件:

 

3.23.5.   RedHat 6环境配置

 

echo "options=--whitelisted --replace-whitespace"  >> /etc/scsi_id.config
for i in b c d e f ; 
    do 
    echo "KERNEL==\"sd*\", BUS==\"scsi\", PROGRAM==\"/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/\$name\", RESULT==\"`/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/sd$i`\", NAME=\"asm-disk$i\", OWNER=\"grid\", GROUP=\"asmadmin\", MODE=\"0660\""      >> /etc/udev/rules.d/99-oracle-asmdevices.rules 
done

for i in b c d e f ;
 do
 echo "KERNEL==\"sd*\", BUS==\"scsi\", PROGRAM==\"/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/\$name\", RESULT==\"`/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/sd$i`\", NAME=\"asm-disk$i\", OWNER=\"grid\", GROUP=\"asmadmin\", MODE=\"0660\""      >> /etc/udev/rules.d/99-oracle-asmdevices.rules
 done

 

3.23.6.   IBM 多路径的配置

for i in b c d e f g h i j k ;
 do
     echo "ENV{DM_NAME}=="mpath$i\", OWNER:=\"grid\", GROUP:=\"asmadmin\", MODE:=\"0660\",SYMLINK+=\"iscsi/asm-$env{DM-NAME}\""      >> /etc/udev/rules.d/12-dm-permissions.rules
done

 

3.23.7.   EMC多路径的配置

for i in  c d e f g h i
 do  
 echo "KERNEL==\"emcpower*\", BUS==\"scsi\", PROGRAM==\"/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/\$name\", RESULT==\"`/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/emcpower$i`\", NAME=\"asm-disk$i\", OWNER=\"grid\", GROUP=\"asmadmin\", MODE=\"0660\""  
done

 

3.23.8.  让UDEV配置生效:

 

RedHat 5 and RedHat 6
[[email protected] ~]# start_udev 
Starting udev: [  OK  ]
 
RedHat 7 
[[email protected] ~]# /sbin/udevadm trigger --type=devices --action=change
[[email protected] ~]# /sbin/udevadm control --reload
[[email protected] ~]# ls -rtl /dev/asm*

 

 

3.24. 配置DHCP

 

[[email protected] ~]# yum install -y dhcp
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Resolving Dependencies
--> Running transaction check
---> Package dhcp.x86_64 12:4.2.5-77.el7 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
============================================================================================================================
 Package                   Arch                        Version                              Repository                 Size
============================================================================================================================
Installing:
 dhcp                      x86_64                      12:4.2.5-77.el7                      base                      515 k
 
Transaction Summary
============================================================================================================================
Install  1 Package
 
Total download size: 515 k
Installed size: 1.4 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 12:dhcp-4.2.5-77.el7.x86_64                                                                              1/1 
  Verifying  : 12:dhcp-4.2.5-77.el7.x86_64                                                                              1/1 
 
Installed:
  dhcp.x86_64 12:4.2.5-77.el7                                                                                               
 
Complete!
 
编辑/etc/dhcp/dhcpd.conf配置文件,添加如下内容:
[[email protected] ~]# cat /etc/dhcp/dhcpd.conf 
#
# DHCP Server Configuration file.
#   see /usr/share/doc/dhcp*/dhcpd.conf.example
#   see dhcpd.conf(5) man page
#
 
ddns-update-stylenone;
ignoreclient-updates;
subnet 192.168.84.0 netmask 255.255.255.0 {
        range 192.168.84.100 192.168.84.110;
        option subnet-mask 255.255.255.0;
        option routers 192.168.10.1;
        default-lease-time 21600;
        max-lease-time 43200;
}
 
[[email protected] ~]# systemctl enable dhcpd
[[email protected] ~]# systemctl start dhcpd
[[email protected] ~]# systemctl status dhcpd
* dhcpd.service - DHCPv4 Server Daemon
   Loaded: loaded (/usr/lib/systemd/system/dhcpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2020-02-28 06:21:20 CST; 3min 49s ago
     Docs: man:dhcpd(8)
           man:dhcpd.conf(5)
 Main PID: 2099 (dhcpd)
   Status: "Dispatching packets..."
   CGroup: /system.slice/dhcpd.service
           `-2099 /usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf -user dhcpd -group dhcpd --no-pid
 
Feb 28 06:21:20 adg19c dhcpd[2099]: Internet Systems Consortium DHCP Server 4.2.5
Feb 28 06:21:20 adg19c dhcpd[2099]: Copyright 2004-2013 Internet Systems Consortium.
Feb 28 06:21:20 adg19c dhcpd[2099]: All rights reserved.
Feb 28 06:21:20 adg19c dhcpd[2099]: For info, please visit https://www.isc.org/software/dhcp/
Feb 28 06:21:20 adg19c dhcpd[2099]: Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in ...ig file
Feb 28 06:21:20 adg19c dhcpd[2099]: Wrote 0 leases to leases file.
Feb 28 06:21:20 adg19c dhcpd[2099]: Listening on LPF/ens32/00:0c:29:3d:67:76/192.168.84.0/24
Feb 28 06:21:20 adg19c dhcpd[2099]: Sending on   LPF/ens32/00:0c:29:3d:67:76/192.168.84.0/24
Feb 28 06:21:20 adg19c dhcpd[2099]: Sending on   Socket/fallback/fallback-net
Feb 28 06:21:20 adg19c systemd[1]: Started DHCPv4 Server Daemon.
Hint: Some lines were ellipsized, use -l to show in full.

 

3.25. 配置DNS

       参考文档: https://www.cnblogs.com/kawashibara/p/8881499.html

 

3.25.1.  安装DNS包

 

[[email protected] ~]# yum list|grep bind-chroot
bind-chroot.x86_64                      32:9.11.4-9.P2.el7         base         
[[email protected] ~]# yum install -y  bind-chroot
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Resolving Dependencies
--> Running transaction check
---> Package bind-chroot.x86_64 32:9.11.4-9.P2.el7 will be installed
--> Processing Dependency: bind(x86-64) = 32:9.11.4-9.P2.el7 for package: 32:bind-chroot-9.11.4-9.P2.el7.x86_64
--> Running transaction check
---> Package bind.x86_64 32:9.11.4-9.P2.el7 will be installed
--> Processing Dependency: bind-libs-lite(x86-64) = 32:9.11.4-9.P2.el7 for package: 32:bind-9.11.4-9.P2.el7.x86_64
--> Processing Dependency: bind-libs(x86-64) = 32:9.11.4-9.P2.el7 for package: 32:bind-9.11.4-9.P2.el7.x86_64
--> Processing Dependency: python-ply for package: 32:bind-9.11.4-9.P2.el7.x86_64
--> Processing Dependency: policycoreutils-python for package: 32:bind-9.11.4-9.P2.el7.x86_64
--> Processing Dependency: policycoreutils-python for package: 32:bind-9.11.4-9.P2.el7.x86_64
--> Processing Dependency: liblwres.so.160()(64bit) for package: 32:bind-9.11.4-9.P2.el7.x86_64
--> Processing Dependency: libisccfg.so.160()(64bit) for package: 32:bind-9.11.4-9.P2.el7.x86_64
--> Processing Dependency: libisccc.so.160()(64bit) for package: 32:bind-9.11.4-9.P2.el7.x86_64
--> Processing Dependency: libisc.so.169()(64bit) for package: 32:bind-9.11.4-9.P2.el7.x86_64
--> Processing Dependency: libdns.so.1102()(64bit) for package: 32:bind-9.11.4-9.P2.el7.x86_64
--> Processing Dependency: libbind9.so.160()(64bit) for package: 32:bind-9.11.4-9.P2.el7.x86_64
--> Processing Dependency: libGeoIP.so.1()(64bit) for package: 32:bind-9.11.4-9.P2.el7.x86_64
--> Running transaction check
---> Package GeoIP.x86_64 0:1.5.0-14.el7 will be installed
--> Processing Dependency: geoipupdate for package: GeoIP-1.5.0-14.el7.x86_64
---> Package bind-libs.x86_64 32:9.11.4-9.P2.el7 will be installed
--> Processing Dependency: bind-license = 32:9.11.4-9.P2.el7 for package: 32:bind-libs-9.11.4-9.P2.el7.x86_64
---> Package bind-libs-lite.x86_64 32:9.11.4-9.P2.el7 will be installed
---> Package policycoreutils-python.x86_64 0:2.5-33.el7 will be installed
--> Processing Dependency: setools-libs >= 3.3.8-4 for package: policycoreutils-python-2.5-33.el7.x86_64
--> Processing Dependency: libsemanage-python >= 2.5-14 for package: policycoreutils-python-2.5-33.el7.x86_64
--> Processing Dependency: audit-libs-python >= 2.1.3-4 for package: policycoreutils-python-2.5-33.el7.x86_64
--> Processing Dependency: python-IPy for package: policycoreutils-python-2.5-33.el7.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.4)(64bit) for package: policycoreutils-python-2.5-33.el7.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.2)(64bit) for package: policycoreutils-python-2.5-33.el7.x86_64
--> Processing Dependency: libcgroup for package: policycoreutils-python-2.5-33.el7.x86_64
--> Processing Dependency: libapol.so.4(VERS_4.0)(64bit) for package: policycoreutils-python-2.5-33.el7.x86_64
--> Processing Dependency: checkpolicy for package: policycoreutils-python-2.5-33.el7.x86_64
--> Processing Dependency: libqpol.so.1()(64bit) for package: policycoreutils-python-2.5-33.el7.x86_64
--> Processing Dependency: libapol.so.4()(64bit) for package: policycoreutils-python-2.5-33.el7.x86_64
---> Package python-ply.noarch 0:3.4-11.el7 will be installed
--> Running transaction check
---> Package audit-libs-python.x86_64 0:2.8.5-4.el7 will be installed
---> Package bind-license.noarch 32:9.11.4-9.P2.el7 will be installed
---> Package checkpolicy.x86_64 0:2.5-8.el7 will be installed
---> Package geoipupdate.x86_64 0:2.5.0-1.el7 will be installed
---> Package libcgroup.x86_64 0:0.41-21.el7 will be installed
---> Package libsemanage-python.x86_64 0:2.5-14.el7 will be installed
---> Package python-IPy.noarch 0:0.75-6.el7 will be installed
---> Package setools-libs.x86_64 0:3.3.8-4.el7 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
=====================================================================================================================================
 Package                                  Arch                     Version                              Repository              Size
=====================================================================================================================================
Installing:
 bind-chroot                              x86_64                   32:9.11.4-9.P2.el7                   base                    90 k
Installing for dependencies:
 GeoIP                                    x86_64                   1.5.0-14.el7                         base                   1.5 M
 audit-libs-python                        x86_64                   2.8.5-4.el7                          base                    77 k
 bind                                     x86_64                   32:9.11.4-9.P2.el7                   base                   2.3 M
 bind-libs                                x86_64                   32:9.11.4-9.P2.el7                   base                   154 k
 bind-libs-lite                           x86_64                   32:9.11.4-9.P2.el7                   base                   1.1 M
 bind-license                             noarch                   32:9.11.4-9.P2.el7                   base                    88 k
 checkpolicy                              x86_64                   2.5-8.el7                            base                   295 k
 geoipupdate                              x86_64                   2.5.0-1.el7                          base                    35 k
 libcgroup                                x86_64                   0.41-21.el7                          base                    66 k
 libsemanage-python                       x86_64                   2.5-14.el7                           base                   113 k
 policycoreutils-python                   x86_64                   2.5-33.el7                           base                   457 k
 python-IPy                               noarch                   0.75-6.el7                           base                    32 k
 python-ply                               noarch                   3.4-11.el7                           base                   123 k
 setools-libs                             x86_64                   3.3.8-4.el7                          base                   620 k
 
Transaction Summary
=====================================================================================================================================
Install  1 Package (+14 Dependent packages)
 
Total download size: 7.0 M
Installed size: 18 M
Downloading packages:
-------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                113 MB/s | 7.0 MB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 32:bind-license-9.11.4-9.P2.el7.noarch                                                                           1/15 
  Installing : setools-libs-3.3.8-4.el7.x86_64                                                                                  2/15 
  Installing : libcgroup-0.41-21.el7.x86_64                                                                                     3/15 
  Installing : audit-libs-python-2.8.5-4.el7.x86_64                                                                             4/15 
  Installing : checkpolicy-2.5-8.el7.x86_64                                                                                     5/15 
  Installing : python-IPy-0.75-6.el7.noarch                                                                                     6/15 
  Installing : libsemanage-python-2.5-14.el7.x86_64                                                                             7/15 
  Installing : policycoreutils-python-2.5-33.el7.x86_64                                                                         8/15 
  Installing : geoipupdate-2.5.0-1.el7.x86_64                                                                                   9/15 
  Installing : GeoIP-1.5.0-14.el7.x86_64                                                                                       10/15 
  Installing : 32:bind-libs-lite-9.11.4-9.P2.el7.x86_64                                                                        11/15 
  Installing : 32:bind-libs-9.11.4-9.P2.el7.x86_64                                                                             12/15 
  Installing : python-ply-3.4-11.el7.noarch                                                                                    13/15 
  Installing : 32:bind-9.11.4-9.P2.el7.x86_64                                                                                  14/15 
  Installing : 32:bind-chroot-9.11.4-9.P2.el7.x86_64                                                                           15/15 
  Verifying  : GeoIP-1.5.0-14.el7.x86_64                                                                                        1/15 
  Verifying  : python-ply-3.4-11.el7.noarch                                                                                     2/15 
  Verifying  : policycoreutils-python-2.5-33.el7.x86_64                                                                         3/15 
  Verifying  : geoipupdate-2.5.0-1.el7.x86_64                                                                                   4/15 
  Verifying  : 32:bind-chroot-9.11.4-9.P2.el7.x86_64                                                                            5/15 
  Verifying  : libsemanage-python-2.5-14.el7.x86_64                                                                             6/15 
  Verifying  : 32:bind-license-9.11.4-9.P2.el7.noarch                                                                           7/15 
  Verifying  : python-IPy-0.75-6.el7.noarch                                                                                     8/15 
  Verifying  : checkpolicy-2.5-8.el7.x86_64                                                                                     9/15 
  Verifying  : 32:bind-libs-9.11.4-9.P2.el7.x86_64                                                                             10/15 
  Verifying  : 32:bind-libs-lite-9.11.4-9.P2.el7.x86_64                                                                        11/15 
  Verifying  : audit-libs-python-2.8.5-4.el7.x86_64                                                                            12/15 
  Verifying  : libcgroup-0.41-21.el7.x86_64                                                                                    13/15 
  Verifying  : 32:bind-9.11.4-9.P2.el7.x86_64                                                                                  14/15 
  Verifying  : setools-libs-3.3.8-4.el7.x86_64                                                                                 15/15 
 
Installed:
  bind-chroot.x86_64 32:9.11.4-9.P2.el7                                                                                              
 
Dependency Installed:
  GeoIP.x86_64 0:1.5.0-14.el7               audit-libs-python.x86_64 0:2.8.5-4.el7        bind.x86_64 32:9.11.4-9.P2.el7           
  bind-libs.x86_64 32:9.11.4-9.P2.el7       bind-libs-lite.x86_64 32:9.11.4-9.P2.el7      bind-license.noarch 32:9.11.4-9.P2.el7   
  checkpolicy.x86_64 0:2.5-8.el7            geoipupdate.x86_64 0:2.5.0-1.el7              libcgroup.x86_64 0:0.41-21.el7           
  libsemanage-python.x86_64 0:2.5-14.el7    policycoreutils-python.x86_64 0:2.5-33.el7    python-IPy.noarch 0:0.75-6.el7           
  python-ply.noarch 0:3.4-11.el7            setools-libs.x86_64 0:3.3.8-4.el7            
 
Complete!
 
[[email protected] ~]# rpm -qa|grep bind
bind-license-9.11.4-9.P2.el7.noarch
bind-export-libs-9.11.4-9.P2.el7.x86_64
bind-libs-9.11.4-9.P2.el7.x86_64
bind-9.11.4-9.P2.el7.x86_64
bind-libs-lite-9.11.4-9.P2.el7.x86_64
bind-chroot-9.11.4-9.P2.el7.x86_64

 

3.25.2.        配置named.conf文件

 

[[email protected] named]# cat > /etc/named.conf <<EOF
 
options {
        listen-on port 53 { any; };
        listen-on-v6 port 53 { any; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
 
        recursion yes;
 
        dnssec-enable yes;
        dnssec-validation yes;
 
        /* Path to ISC DLV key */
        bindkeys-file "/etc/named.root.key";
 
        managed-keys-directory "/var/named/dynamic";
 
        pid-file "/run/named/named.pid";
        session-keyfile "/run/named/session.key";
        allow-query     { any; };
        allow-query-cache { any; };
};
 
logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};
 
zone "." IN {
        type hint;
        file "named.ca";
};
 
include "/etc/named.rfc1912.zones";;
include "/etc/named.root.key";
EOF

3.25.3.  配置rfc1912.zone文件

 

[[email protected] named]# cat >>/etc/named.rfc1912.zones <<EOF
zone "woo.cn" IN{
        type master;
        file "woo.cn.zone";
        allow-update { none; };
};
 
zone "84.168.192.in-addr.arpa" IN{
        type master;
        file "84.168.192.zone";
        allow-update { none; };
}
EOF

 

3.25.4.  编辑正向区域文件

 

[[email protected] named]# cat /var/named/woo.cn.zone 
$TTL 86400
@                       IN SOA  dns.woo.cn.     root.woo.cn.    (
                                                42              ; serial (d,adams)
                                                3H              ; refresh 
                                               15M              ; retry
                                                1W              ; expiry
                                                1D)             ; minimum
                        IN NS           dns.woo.cn.
cluster-scan            IN A            192.168.84.95
cluster-scan            IN A            192.168.84.96
cluster-scan            IN A            192.168.84.97
dns.woo.cn.             IN A            192.168.84.99

 

3.25.5.  编辑反向区域文件

 

[[email protected] named]# cat /var/named/84.168.192.zone 
$TTL 86400
@                       IN SOA  dns.woo.cn.     root.woo.cn.    (
                                        1997022700 ; Serial                        
                                        28800      ; Refresh
                                        14400      ; Retry                        
                                        3600000    ; Expire                        
                                        86400)     ; Minimum                        
 
                        IN NS           dns.woo.cn.
95                      IN PTR            cluster-scan.
96                      IN PTR            cluster-scan.
97                      IN PTR            cluster-scan.

 

3.25.6.  禁用DNS 解析IPv6

 

[[email protected] named]# cat >> /etc/sysconfig/named <<EOF
> OPTIONS="-4"
> EOF

 

3.25.7.  RAC各节点配置DNS客户端

 

[[email protected] ~]# cat >> /etc/resolv.conf <<EOF
> search woo.cn
> nameserver 192.168.84.99
> EOF
 
[[email protected] ~]# cat >> /etc/resolv.conf <<EOF
> search woo.cn
> nameserver 192.168.84.99
> EOF

 

3.25.8.  验证DNS有效性

 

[[email protected] ~]# nslookup cluster-scan.woo.cn
Server:         192.168.84.99
Address:        192.168.84.99#53
 
Name:   cluster-scan.woo.cn
Address: 192.168.84.97
Name:   cluster-scan.woo.cn
Address: 192.168.84.96
Name:   cluster-scan.woo.cn
Address: 192.168.84.95
 
[[email protected] ~]# nslookup cluster-scan.woo.cn
Server:         192.168.84.99
Address:        192.168.84.99#53
 
Name:   cluster-scan.woo.cn
Address: 192.168.84.96
Name:   cluster-scan.woo.cn
Address: 192.168.84.97
Name:   cluster-scan.woo.cn
Address: 192.168.84.95

 

3.26. 配置SSH

 

[[email protected] ~]# cat >> /etc/ssh/sshd_config <<EOF
 
UseDNS no
LoginGraceTime 0
TCPKeepAlive yes
EOF
[[email protected] ~]# systemctl restart sshd

 

四、          安装集群软件

4.1.   解压grid软件

 

[[email protected] ora19crac1 ~]$ su – grid
[[email protected] ~]$ ls
LINUX.X64_193000_grid_home.zip 
[[email protected] ~]$ unzip -q LINUX.X64_193000_grid_home.zip -d $ORACLE_HOME

 

4.2.   安装CVU

 

[[email protected] ~]# export CVUQDISK_GRP=oinstall; 
[[email protected] ~]# rpm -ivh /u01/app/19.3.0/grid/cv/rpm/cvuqdisk-1.0.10-1.rpm   
Preparing...                          ################################# [100%]
Using default group oinstall to install package
Updating / installing...
   1:cvuqdisk-1.0.10-1                ################################# [100%] 
[[email protected] ~]# scp /u01/app/19.3.0/grid/cv/rpm/cvuqdisk-1.0.10-1.rpm ora19crac2:~ 
The authenticity of host 'ora19crac2 (192.168.84.92)' can't be established.
ECDSA key fingerprint is SHA256:uROvAVicwRVvUmvP5M7/PBlCRSaXy6ZsoV1kRhqDPuw.
ECDSA key fingerprint is MD5:04:9a:af:8c:da:5b:bb:3c:8a:31:30:cb:0c:52:2c:6e.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'ora19crac2,192.168.84.92' (ECDSA) to the list of known hosts.
[email protected]'s password: 
cvuqdisk-1.0.10-1.rpm                                                                        100%   11KB   7.8MB/s   00:00                                    
                                  
[[email protected] ~]# export CVUQDISK_GRP=oinstall;
[[email protected] ~]# 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%]

 

 

4.3.   配置SSH信任

 

# grid users:
[[email protected] ~]# /u01/app/19.3.0/grid/oui/prov/resources/scripts/sshUserSetup.sh -user grid  -hosts "ora19crac1 ora19crac2" -advanced exverify 
 
# oracle users:
[[email protected] ~]# /u01/app/19.3.0/grid/oui/prov/resources/scripts/sshUserSetup.sh -user oracle  -hosts "ora19crac1 ora19crac2" -advanced exverify -confirm

 

4.4.   验证SSH有效性

 

# ora19crac1
[[email protected] ~]# su - oracle
Last login: Fri Feb 28 18:57:27 CST 2020 on pts/1
[[email protected] ~]$ ssh ora19crac2 date
Sat Feb 29 19:58:14 CST 2020
[[email protected] ~]$ exit
Logout
[[email protected] ~]# su - grid
Last login: Sat Feb 29 19:57:48 CST 2020 on pts/0
[[email protected] ~]$ ssh ora19crac2 date
Sat Feb 29 19:58:21 CST 2020
 
# ora19crac2
[[email protected] ~]# su - oracle
Last login: Fri Feb 28 18:50:26 CST 2020 on pts/0
[[email protected] ~]$ ssh ora19crac1 date
Sat Feb 29 19:59:02 CST 2020
[[email protected] ~]$ exit
Logout
[[email protected] ~]# su - grid
Last login: Fri Feb 28 18:50:06 CST 2020 on pts/0
[[email protected] ~]$ 
[[email protected] ~]$ ssh ora19crac1 date
Sat Feb 29 19:59:12 CST 2020

 

4.5.   安装前环境检查GI

 

[[email protected] ~]$ $ORACLE_HOME/runcluvfy.sh  stage -pre crsinst -n  "ora19crac1,ora19crac2"  -fixup -verbose
 
……
PRVF-5636 : The DNS response time for an unreachable node exceeded "15000" ms on following nodes: ora11grac2,ora11grac1
 
File "/etc/resolv.conf" is not consistent across nodes
 
Check: Time zone consistency 
Result: Time zone consistency check passed
Fixup information has been generated for following node(s):
ora11grac1,ora11grac2
Please run the following script on each node as "root" user to execute the fixups:
'/tmp/CVU_19.0.0_grid/runfixup.sh'
 
Pre-check for cluster services setup was unsuccessful on all the nodes.

4.6.   根据提示修复检查的问题

 

[[email protected] ~]$ /tmp/CVU_11.2.0.4.0_grid/runfixup.sh
Response file being used is :/tmp/CVU_11.2.0.4.0_grid/fixup.response
Enable file being used is :/tmp/CVU_11.2.0.4.0_grid/fixup.enable
Log file location: /tmp/CVU_11.2.0.4.0_grid/orarun.log
uid=510(grid) gid=501(oinstall) groups=501(oinstall),502(dba),503(asmadmin),504(asmdba),505(asmoper)

 

4.7.   开始安装GI

 

[[email protected] ~]$ cd $ORACLE_HOME
[[email protected] grid]$ gridSetup.sh

 RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

 

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

 

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

 

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

 

4.8.   节点一 执行root脚本

 

[[email protected] ~]# /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.
 
[[email protected] ~]# /u01/app/19.3.0/grid/root.sh
Performing root user operation.
 
The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/19.3.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/19.3.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/grid/crsdata/ora19crac1/crsconfig/rootcrs_ora19crac1_2020-03-01_00-27-15AM.log
2020/03/01 00:27:27 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'.
2020/03/01 00:27:27 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'.
2020/03/01 00:27:27 CLSRSC-363: User ignored prerequisites during installation
2020/03/01 00:27:27 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'.
2020/03/01 00:27:32 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'.
2020/03/01 00:27:33 CLSRSC-594: Executing installation step 5 of 19: 'SetupOSD'.
2020/03/01 00:27:33 CLSRSC-594: Executing installation step 6 of 19: 'CheckCRSConfig'.
2020/03/01 00:27:34 CLSRSC-594: Executing installation step 7 of 19: 'SetupLocalGPNP'.
2020/03/01 00:28:11 CLSRSC-594: Executing installation step 8 of 19: 'CreateRootCert'.
2020/03/01 00:28:12 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2020/03/01 00:28:16 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'.
2020/03/01 00:28:31 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'.
2020/03/01 00:28:31 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'.
2020/03/01 00:28:37 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'.
2020/03/01 00:28:37 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
2020/03/01 00:30:02 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'.
2020/03/01 00:31:08 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'.
2020/03/01 00:32:18 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'.
2020/03/01 00:32:24 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'.
 
[INFO] [DBT-30161] Disk label(s) created successfully. Check /u01/app/grid/cfgtoollogs/asmca/asmca-200301AM123258.log for details.
 
 
2020/03/01 00:39:40 CLSRSC-482: Running command: '/u01/app/19.3.0/grid/bin/ocrconfig -upgrade grid oinstall'
CRS-4256: Updating the profile
Successful addition of voting disk cbcea46f7b764fccbfd884da8c453995.
Successful addition of voting disk e8c22109d62c4fb9bfd3f3e3e36413c8.
Successful addition of voting disk 67f8dc6671954fe9bf7b802eeb63f8ca.
Successfully replaced voting disk group with +OCR_VOT_GP1.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   cbcea46f7b764fccbfd884da8c453995 (AFD:OCR_VOT_GP11) [OCR_VOT_GP1]
 2. ONLINE   e8c22109d62c4fb9bfd3f3e3e36413c8 (AFD:OCR_VOT_GP12) [OCR_VOT_GP1]
 3. ONLINE   67f8dc6671954fe9bf7b802eeb63f8ca (AFD:OCR_VOT_GP13) [OCR_VOT_GP1]
Located 3 voting disk(s).
2020/03/01 00:41:33 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.
2020/03/01 00:47:10 CLSRSC-343: Successfully started Oracle Clusterware stack
2020/03/01 00:47:10 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.
2020/03/01 01:11:14 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.
2020/03/01 01:12:47 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded

 

4.9.   节点二执行root脚本

 

[[email protected] ~]# /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.
 
[[email protected] ~]# /u01/app/19.3.0/grid/root.sh
[[email protected] ~]# /u01/app/19.3.0/grid/root.sh
Performing root user operation.
 
The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/19.3.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/19.3.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/grid/crsdata/ora19crac2/crsconfig/rootcrs_ora19crac2_2020-03-01_01-17-59AM.log
2020/03/01 01:18:05 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'.
2020/03/01 01:18:05 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'.
2020/03/01 01:18:05 CLSRSC-363: User ignored prerequisites during installation
2020/03/01 01:18:05 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'.
2020/03/01 01:18:08 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'.
2020/03/01 01:18:08 CLSRSC-594: Executing installation step 5 of 19: 'SetupOSD'.
2020/03/01 01:18:08 CLSRSC-594: Executing installation step 6 of 19: 'CheckCRSConfig'.
2020/03/01 01:18:09 CLSRSC-594: Executing installation step 7 of 19: 'SetupLocalGPNP'.
2020/03/01 01:18:12 CLSRSC-594: Executing installation step 8 of 19: 'CreateRootCert'.
2020/03/01 01:18:12 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'.
2020/03/01 01:18:23 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'.
2020/03/01 01:18:24 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'.
2020/03/01 01:18:27 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'.
2020/03/01 01:18:28 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
2020/03/01 01:18:44 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2020/03/01 01:19:54 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'.
2020/03/01 01:20:57 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'.
2020/03/01 01:22:23 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'.
2020/03/01 01:22:25 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'.
2020/03/01 01:22:36 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.
2020/03/01 01:23:45 CLSRSC-343: Successfully started Oracle Clusterware stack
2020/03/01 01:23:45 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.
2020/03/01 01:24:21 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.
2020/03/01 01:25:03 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded
Error 4 opening dom ASM/Self in 0xb2ac810
Domain name to open is ASM/Self 
Error 4 opening dom ASM/Self in 0xb2ac810

 

4.10. 创建ASM磁盘组

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

 

 

五、      安装数据库软件

5.1.   解压 DB

[[email protected] grid]# su - oracle

Last login: Fri Feb 28 18:46:58 CST 2020 on pts/0

[[email protected] ~]$ ls

LINUX.X64_193000_db_home.zip

[[email protected] ~]$ unzip -q LINUX.X64_193000_db_home.zip -d $ORACLE_HOME

checkdir:  cannot create extraction directory: /u01/app/oracle//product/19.3.0/dbhome_1

           No such file or directory

 

[[email protected] ~]$ mkdir -p /u01/app/oracle//product/19.3.0/dbhome_1

[[email protected] ~]$ unzip -q LINUX.X64_193000_db_home.zip -d $ORACLE_HOME

5.2.   安装数据库

 

[[email protected] ~]$ cd $ORACLE_HOME/ 
[[email protected] dbhome_1]$ ./runInstaller

 

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

 

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

 

 

5.3.   执行root.sh脚本

 

[[email protected] ~]# /u01/app/oracle/product/19.3.0/dbhome_1/root.sh
Performing root user operation.
 
The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/19.3.0/dbhome_1
 
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. 
 
[[email protected] ~]# /u01/app/oracle/product/19.3.0/dbhome_1/root.sh
Performing root user operation.
 
The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/19.3.0/dbhome_1
 
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.

 

 

 六、     创建数据库

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

 

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

 

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程

 

 

RedHat 7.7 平台安装19c(19.3) RAC 详细操作过程


 

 

七、     完成安装

7.1.        检查集群状态

 

[[email protected] ~]$ crsctl status res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
               ONLINE  ONLINE       ora19crac1               STABLE
               ONLINE  ONLINE       ora19crac2               STABLE
ora.chad
               ONLINE  ONLINE       ora19crac1               STABLE
               ONLINE  ONLINE       ora19crac2               STABLE
ora.net1.network
               ONLINE  ONLINE       ora19crac1               STABLE
               ONLINE  ONLINE       ora19crac2               STABLE
ora.ons
               ONLINE  ONLINE       ora19crac1               STABLE
               ONLINE  ONLINE       ora19crac2               STABLE
ora.proxy_advm
               OFFLINE OFFLINE      ora19crac1               STABLE
               OFFLINE OFFLINE      ora19crac2               STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
      1        ONLINE  ONLINE       ora19crac1               STABLE
      2        ONLINE  ONLINE       ora19crac2               STABLE
      3        ONLINE  OFFLINE                               STABLE
ora.DATA_GP01.dg(ora.asmgroup)
      1        ONLINE  ONLINE       ora19crac1               STABLE
      2        ONLINE  ONLINE       ora19crac2               STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.FRA_GP01.dg(ora.asmgroup)
      1        ONLINE  ONLINE       ora19crac1               STABLE
      2        ONLINE  ONLINE       ora19crac2               STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       ora19crac1               STABLE
ora.OCR_VOT_GP1.dg(ora.asmgroup)
      1        ONLINE  ONLINE       ora19crac1               STABLE
      2        ONLINE  ONLINE       ora19crac2               STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.asm(ora.asmgroup)
      1        ONLINE  ONLINE       ora19crac1               Started,STABLE
      2        ONLINE  ONLINE       ora19crac2               Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
      1        ONLINE  ONLINE       ora19crac1               STABLE
      2        ONLINE  ONLINE       ora19crac2               STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       ora19crac1               STABLE
ora.ora19crac1.vip
      1        ONLINE  ONLINE       ora19crac1               STABLE
ora.ora19crac2.vip
      1        ONLINE  ONLINE       ora19crac2               STABLE
ora.qosmserver
      1        ONLINE  ONLINE       ora19crac1               STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       ora19crac1               STABLE
ora.woo.db
      1        ONLINE  ONLINE       ora19crac1               Open,HOME=/u01/app/o
                                                             racle/product/19.3.0
                                                             /dbhome_1,STABLE
      2        ONLINE  ONLINE       ora19crac2               Open,HOME=/u01/app/o
                                                             racle/product/19.3.0
                                                             /dbhome_1,STABLE
--------------------------------------------------------------------------------