作者:吴伟龙(PrudentWoo)
项目 |
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 |
共享磁盘路径 |
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即可。
虚拟机软件 |
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 |
在节点一添加硬盘à选择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:
[root@localhost ~]# cat /etc/hostname ora19crac1 [root@localhost ~]# 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 [root@localhost ~]# 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
备注:该过程均在两台主机上同时操作
# ora19crac1 # 修改主机名 [root@localhost ~]# hostnamectl --static set-hostname ora19crac1 [root@localhost ~]# hostnamectl --static set-hostname ora19crac2 # 修改私网IP地址 [root@localhost ~]# 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地址 [root@localhost ~]# 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
[root@ora19crac1 ~]# systemctl stop chronyd [root@ora19crac1 ~]# systemctl disable chronyd [root@ora19crac1 ~]# mv /etc/chrony.conf /etc/chrony.conf.bak
[root@ora11grac1 ~]# chkconfig iptables off [root@ora11grac1 ~]# chkconfig ip6tables off [root@ora11grac1 ~]# setenforce Permissive [root@ora11grac1 ~]# setenforce 0 [root@ora11grac1 ~]#sed -i "/^SELINUX=/s#enforcing#disabled#" /etc/selinux/config [root@ora11grac1 ~]# vi /etc/selinux/config SELINUX=disabled [root@ora11grac1 ~]# service iptables stop iptables: Setting chains to policy ACCEPT: filter [ OK ] iptables: Flushing firewall rules: [ OK ] iptables: Unloading modules: [ OK ] [root@ora11grac1 ~]# service ip6tables stop ip6tables: Setting chains to policy ACCEPT: filter [ OK ] ip6tables: Flushing firewall rules: [ OK ] ip6tables: Unloading modules: [ OK ]
[root@ora19crac1 ~]# systemctl list-unit-files|grep firewalld firewalld.service enabled [root@ora19crac1 ~]# systemctl stop firewalld.service [root@ora19crac1 ~]# 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.
[root@ora19crac1 ~]# mount /dev/sr0 /mnt/ mount: /dev/sr0 is write-protected, mounting read-only [root@ora19crac1 ~]# cat > /etc/yum.repos.d/local.repo <[base] > name=base > baseurl=file:///mnt > enabled=1 > gpgcheck=0 > multilib_policy=all > EOF [root@ora19crac1 ~]# 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 [root@ora19crac1 ~]# 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
[root@ora19crac1 ~]# yum groupinstall -y "Server with GUI" [root@ora19crac1 ~]# cd /etc/systemd/system/ [root@ora19crac1 system]# ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target [root@ora19crac1 system]# reboot
# 检查并创建用户组 [root@ora19crac1 ~]# grep 54[4,3] /etc/group [root@ora19crac1 ~]# groupadd -g 54421 oinstall [root@ora19crac1 ~]# groupadd -g 54322 dba [root@ora19crac1 ~]# groupadd -g 54323 oper [root@ora19crac1 ~]# groupadd -g 54324 backupdba [root@ora19crac1 ~]# groupadd -g 54325 dgdba [root@ora19crac1 ~]# groupadd -g 54326 kmdba [root@ora19crac1 ~]# groupadd -g 54327 asmdba [root@ora19crac1 ~]# groupadd -g 54328 asmoper [root@ora19crac1 ~]# groupadd -g 54329 asmadmin [root@ora19crac1 ~]# groupadd -g 54330 racdba [root@ora19crac1 ~]# 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: # 检查并创建用户 [root@ora19crac1 ~]# grep oracle /etc/passwd [root@ora19crac1 ~]# grep grid /etc/passwd [root@ora19crac1 ~]# /usr/sbin/useradd -u 54322 -g oinstall -G asmadmin,asmdba,asmoper,racdba grid [root@ora19crac1 ~]# /usr/sbin/useradd -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba,racdba,oper oracle # 配置用户密码 [root@ora19crac1 ~]# echo "oracle" | passwd --stdin oracle [root@ora19crac1 ~]#echo "oracle" | passwd --stdin grid # 检查创建完成之后的用户信息 [root@ora19crac1 ~]# grep oracle /etc/passwd oracle:x:54323:54421::/home/oracle:/bin/bash [root@ora19crac1 ~]# grep grid /etc/passwd grid:x:54322:54421::/home/grid:/bin/bash [root@ora19crac1 ~]# id grid uid=54322(grid) gid=54421(oinstall) groups=54421(oinstall),54327(asmdba),54329(asmadmin),54330(racdba) [root@ora19crac1 ~]# 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)
[root@ora19crac1 ~]# mkdir -p /u01/app/19.0.0/grid [root@ora19crac1 ~]# mkdir -p /u01/app/grid [root@ora19crac1 ~]# mkdir -p /u01/app/oracle
[root@ora19crac1 ~]# chown -R grid:oinstall /u01 [root@ora19crac1 ~]# chown oracle:oinstall /u01/app/oracle [root@ora19crac1 ~]# chmod -R 775 /u01/
# 需要安装的软件包信息 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 # 挂载光盘安装软件 [root@ora19crac1 ~]# mount /dev/sr0 /mnt/ mount: /dev/sr0 is write-protected, mounting read-only [root@ora19crac1 ~]# 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!
[root@ora19crac2 ~]# ls compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm [root@ora19crac2 ~]# 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%] [root@ora19crac1 ~]# 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%]
[root@ora19crac1 ~]# 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 [root@ora19crac1 ~]# 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)
cat >> /etc/hosts <
3.14. 配置ZEROCONF
cat “NOZEROCONF=yes” >> /etc/sysconfig/network
3.15. 修改系统内核参数
[root@ora19crac1 ~]# cat >> /etc/sysctl.conf <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限制参数
[root@ora19crac1 ~]# cat >> /etc/security/limits.conf <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. 配置系统环境变量
[root@ora19crac1 ~]# cat >> /etc/profile <
3.18. 配置root用户环境变量
cat >> /root/.bash_profile <
3.19. 配置grid用户环境变量
cat >> /home/grid/.bash_profile <
3.20. 配置oracle用户环境变量
cat >> /home/oracle/.bash_profile <
3.21. 关闭THP和NUMA
[root@ora19crac1 ~]# echo "transparent_hugepage=never numa=off" >> /etc/default/grub [root@ora19crac1 ~]# 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 [root@ora19crac1 ~]# 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 done3.22. 禁用avahi
[root@ora19crac1 ~]# systemctl stop avahi-dnsconfd [root@ora19crac1 ~]# systemctl stop avahi-daemon [root@ora19crac1 ~]# systemctl disable avahi-dnsconfd [root@ora19crac1 ~]# systemctl disable avahi-daemon
3.23. 磁盘规划
3.23.1. 创建分区
[root@ora19crac1 ~]# echo -e "n\np\n1\n\n\nw" | fdisk /dev/sdb [root@ora19crac1 ~]# echo -e "n\np\n1\n\n\nw" | fdisk /dev/sdc [root@ora19crac1 ~]# echo -e "n\np\n1\n\n\nw" | fdisk /dev/sdd [root@ora19crac1 ~]# echo -e "n\np\n1\n\n\nw" | fdisk /dev/sde [root@ora19crac1 ~]# 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 [root@ora19crac2 ~]# 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 <> /etc/udev/rules.d/99-oracle-asmdevices.rules < 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 [root@ora11grac1 ~]# start_udev Starting udev: [ OK ]
3.23.3. UDEV RedHat 7手工方法
[root@ora19crac1 ~]# cat >> /etc/udev/rules.d/99-oracle-asmdevices.rules <> /etc/udev/rules.d/99-oracle-asmdevices.rules < 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 [root@ora19crac1 ~]# 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方法
vi /etc/scsi_id.config options=-g [root@ydb01 ~]# /usr/lib/udev/scsi_id -g -u -d /dev/sdb1 36000c29a5fe67df9fac43441beb4280f [root@ydb01 ~]# /usr/lib/udev/scsi_id -g -u -d /dev/sdc1 36000c29474a249ab2c6f9b2977d040b3 [root@ydb01 ~]# /usr/lib/udev/scsi_id -g -u -d /dev/sdd 36000c2925df7736e997e8e6a89865539 [root@ydb01 ~]# /usr/lib/udev/scsi_id -g -u -d /dev/sdb1 36000c29a5fe67df9fac43441beb4280f [root@ydb01 ~]# /usr/lib/udev/scsi_id -g -u -d /dev/sdc1 36000c29474a249ab2c6f9b2977d040b3 [root@ydb01 ~]# /usr/lib/udev/scsi_id -g -u -d /dev/sdd 36000c2925df7736e997e8e6a89865539 vi /etc/udev/rules.d/99-oracle-asmdevices.rules KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/$parent", RESULT=="36000c29a5fe67df9fac43441beb4280f", SYMLINK+="asmdisks/asmdisk01", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/$parent", RESULT=="36000c29474a249ab2c6f9b2977d040b3", SYMLINK+="asmdisks/asmdisk02", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/$parent", RESULT=="36000c2925df7736e997e8e6a89865539", SYMLINK+="asmdisks/asmdisk03", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/$parent", RESULT=="36000c2930898d85d2050c12f7eb96ef9", SYMLINK+="asmdisks/asmdisk04", OWNER="grid", GROUP="asmadmin", MODE="0660" [root@ydb01 ~]# partprobe [root@ydb01 ~]# /sbin/partprobe /dev/sdb1 [root@ydb01 ~]# /sbin/partprobe /dev/sdc1 [root@ydb01 ~]# /sbin/partprobe /dev/sdd1 [root@ydb01 ~]# /sbin/partprobe /dev/sde1 [root@ydb01 ~]# ls -alrth /dev/asmdisks/* lrwxrwxrwx 1 root root 7 May 9 16:10 /dev/asmdisks/asmdisk01 -> ../sdb1 lrwxrwxrwx 1 root root 7 May 9 16:10 /dev/asmdisks/asmdisk02 -> ../sdc1 lrwxrwxrwx 1 root root 7 May 9 16:10 /dev/asmdisks/asmdisk03 -> ../sdd1 lrwxrwxrwx 1 root root 7 May 9 16:10 /dev/asmdisks/asmdisk04 -> ../sde1
3.23.5. 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.6. 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.7. 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.8. 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.9. 让UDEV配置生效:
RedHat 5 and RedHat 6 [root@ora11grac1 ~]# start_udev Starting udev: [ OK ] RedHat 7 [root@ora19crac2 ~]# /sbin/udevadm trigger --type=devices --action=change [root@ora19crac2 ~]# /sbin/udevadm control --reload [root@ora19crac2 ~]# ls -rtl /dev/asm*
3.1. 配置SSH
[root@ora19crac1 ~]# cat >> /etc/ssh/sshd_config <
一、 安装集群软件
4.1. 解压grid软件
[root@ ora19crac1 ~]$ su – grid [grid@ora19crac1 ~]$ ls LINUX.X64_193000_grid_home.zip [grid@ora19crac1 ~]$ unzip -q LINUX.X64_193000_grid_home.zip -d $ORACLE_HOME
4.2. 安装CVU
[root@ora19crac1 ~]# export CVUQDISK_GRP=oinstall; [root@ora19crac1 ~]# 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%] [root@ora19crac1 ~]# 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. root@ora19crac2's password: cvuqdisk-1.0.10-1.rpm 100% 11KB 7.8MB/s 00:00 [root@ora19crac1 ~]# export CVUQDISK_GRP=oinstall; [root@ora19crac2 ~]# 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: [root@ora19crac1 ~]# /u01/app/19.3.0/grid/oui/prov/resources/scripts/sshUserSetup.sh -user grid -hosts "ora19crac1 ora19crac2" -advanced exverify # oracle users: [root@ora19crac1 ~]# /u01/app/19.3.0/grid/oui/prov/resources/scripts/sshUserSetup.sh -user oracle -hosts "ora19crac1 ora19crac2" -advanced exverify -confirm
4.4. 验证SSH有效性
# ora19crac1 [root@ora19crac1 ~]# su - oracle Last login: Fri Feb 28 18:57:27 CST 2020 on pts/1 [oracle@ora19crac1 ~]$ ssh ora19crac2 date Sat Feb 29 19:58:14 CST 2020 [oracle@ora19crac1 ~]$ exit Logout [root@ora19crac1 ~]# su - grid Last login: Sat Feb 29 19:57:48 CST 2020 on pts/0 [grid@ora19crac1 ~]$ ssh ora19crac2 date Sat Feb 29 19:58:21 CST 2020 # ora19crac2 [root@ora19crac2 ~]# su - oracle Last login: Fri Feb 28 18:50:26 CST 2020 on pts/0 [oracle@ora19crac2 ~]$ ssh ora19crac1 date Sat Feb 29 19:59:02 CST 2020 [oracle@ora19crac2 ~]$ exit Logout [root@ora19crac2 ~]# su - grid Last login: Fri Feb 28 18:50:06 CST 2020 on pts/0 [grid@ora19crac2 ~]$ [grid@ora19crac2 ~]$ ssh ora19crac1 date Sat Feb 29 19:59:12 CST 2020
4.5. 安装前环境检查GI
[grid@ora19crac1 ~]$ $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. 根据提示修复检查的问题
[grid@ora19crac1 ~]$ /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
$ORACLE_HOME/gridSetup.sh -silent -force -noconfig -waitforcompletion -ignorePrereq \ INVENTORY_LOCATION=/u01/app/oraInventory \ SELECTED_LANGUAGES=en,en_GB \ oracle.install.option=CRS_CONFIG \ ORACLE_BASE=/u01/app/grid \ oracle.install.asm.OSDBA=asmdba \ oracle.install.asm.OSOPER=asmoper \ oracle.install.asm.OSASM=asmadmin \ oracle.install.crs.config.scanType=LOCAL_SCAN \ oracle.install.crs.config.gpnp.scanName=scan-ora19cracdb \ # oracle.install.crs.config.gpnp.scanPort=1521 \ # oracle.install.crs.config.ClusterConfiguration=STANDALONE \ oracle.install.crs.config.configureAsExtendedCluster=false \ oracle.install.crs.config.clusterName=woo-cluster \ # oracle.install.crs.config.gpnp.configureGNS=false \ oracle.install.crs.config.autoConfigureClusterNodeVIP=false \ oracle.install.crs.config.clusterNodes=ora19crac1:ora19crac1-vip:HUB,ora19crac2:ora19crac2-vip:HUB \ # oracle.install.crs.config.networkInterfaceList=ens33:90.90.90.0:5,ens34:192.168.84.0:1 \ # oracle.install.asm.configureGIMRDataDG=false \ oracle.install.crs.config.useIPMI=false \ oracle.install.asm.storageOption=ASM \ oracle.install.asmOnNAS.configureGIMRDataDG=false \ oracle.install.asm.SYSASMPassword=oracle \ oracle.install.asm.diskGroup.name=OCR_VOT_GP1 \ # oracle.install.asm.diskGroup.redundancy=normal \ # oracle.install.asm.diskGroup.AUSize=4 \ oracle.install.asm.diskGroup.disksWithFailureGroupNames=/dev/asmdisks/asm_ocr_1,,/dev/asmdisks/asm_ocr_2,,/dev/asmdisks/asm_ocr_3, \ # oracle.install.asm.diskGroup.disks=/dev/asmdisks/asm_ocr_1,/dev/asmdisks/asm_ocr_2,/dev/asmdisks/asm_ocr_3 \ # oracle.install.asm.diskGroup.diskDiscoveryString=/dev/asmdisks/asm_* \ # oracle.install.asm.configureAFD=false \ oracle.install.asm.monitorPassword=oracle \ oracle.install.crs.configureRHPS=false \ oracle.install.crs.config.ignoreDownNodes=false \ oracle.install.config.managementOption=NONE \ oracle.install.config.omsPort=0 \ oracle.install.crs.rootconfig.executeRootScript=false
4.8. 节点一 执行root脚本
[root@ora19crac1 ~]# /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@ora19crac1 ~]# /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脚本
[root@ora19crac2 ~]# /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@ora19crac1 ~]# /u01/app/19.3.0/grid/root.sh [root@ora19crac2 ~]# /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磁盘组
create diskgroup DATA_GP01 external redundancy disk '/dev/asmdisks/asm_data01' ATTRIBUTE 'compatible.rdbms' = '19.0', 'compatible.asm' = '19.0'; create diskgroup FRA_GP01 external redundancy disk '/dev/asmdisks/asm_fra01' ATTRIBUTE 'compatible.rdbms' = '19.0', 'compatible.asm' = '19.0'; srvctl start diskgroup -diskgroup data srvctl start diskgroup -diskgroup fra alter diskgroup all mount;
二、 安装数据库软件
5.1. 解压 DB
[root@ora19crac1 grid]# su - oracle Last login: Fri Feb 28 18:46:58 CST 2020 on pts/0 [oracle@ora19crac1 ~]$ ls LINUX.X64_193000_db_home.zip [oracle@ora19crac1 ~]$ 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 [oracle@ora19crac2 ~]$ mkdir -p /u01/app/oracle//product/19.3.0/dbhome_1 [oracle@ora19crac1 ~]$ unzip -q LINUX.X64_193000_db_home.zip -d $ORACLE_HOME5.2. 安装数据库
$ORACLE_HOME/runInstaller -silent -force -noconfig -ignorePrereq \ oracle.install.option=INSTALL_DB_SWONLY \ UNIX_GROUP_NAME=oinstall \ INVENTORY_LOCATION=/u01/app/oraInventory \ ORACLE_BASE=/u01/app/oracle \ ORACLE_HOME=/u01/app/oracle/product/19.3.0/dbhome_1 \ oracle.install.db.InstallEdition=EE \ oracle.install.db.OSDBA_GROUP=dba \ oracle.install.db.OSOPER_GROUP=oper \ oracle.install.db.OSBACKUPDBA_GROUP=backupdba \ oracle.install.db.OSDGDBA_GROUP=dgdba \ oracle.install.db.OSKMDBA_GROUP=kmdba \ oracle.install.db.OSRACDBA_GROUP=racdba \ oracle.install.db.CLUSTER_NODES=ora19crac1,ora19crac2 \ oracle.install.db.config.starterdb.type=GENERAL_PURPOSE $ORACLE_HOME/runInstaller -silent -force -noconfig -ignorePrereq oracle.install.option=INSTALL_DB_SWONLY UNIX_GROUP_NAME=oinstall INVENTORY_LOCATION=/u01/app/oraInventory ORACLE_BASE=/u01/app/oracle ORACLE_HOME=/u01/app/oracle/product/19.3.0/dbhome_1 oracle.install.db.InstallEdition=EE oracle.install.db.OSDBA_GROUP=dba oracle.install.db.OSOPER_GROUP=oper oracle.install.db.OSBACKUPDBA_GROUP=backupdba oracle.install.db.OSDGDBA_GROUP=dgdba oracle.install.db.OSKMDBA_GROUP=kmdba oracle.install.db.OSRACDBA_GROUP=racdba oracle.install.db.CLUSTER_NODES=ora19crac1,ora19crac2 oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
5.3. 执行root.sh脚本
[root@ora19crac1 ~]# /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. [root@ora19crac2 ~]# /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.三、 完成安装
6.1. 检查集群状态
[grid@ora19crac1 ~]$ 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 -------------------------------------------------------------------------