Oracle Linux 7.1 Install Oracle 19C RAC

安装环境为Oracle Linux 7.1,Oracle版本为19C,下面是RAC环境的IP配置

ip地址          主机名                   类型     解析方式 
10.10.10.190  19c1                    public   DNS或etc/hosts 
10.10.10.191  19c2                    public   DNS或etc/hosts 
88.88.88.1    19c1-priv               private  DNS或etc/hosts 
88.88.88.2    19c2-priv               private  DNS或etc/hosts 
10.10.10.192  19c1-vip                virtual  DNS或etc/hosts 
10.10.10.193  19c2-vip                virtual  DNS或etc/hosts
10.10.10.194  hy-scan                 scan     DNS或etc/hosts
10.10.10.195  hy-scan                 scan     DNS或etc/hosts
10.10.10.196  hy-scan                 scan     DNS或etc/hosts

[root@19c1 /]# vi /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

10.10.10.190 19c1
10.10.10.191 19c2
88.88.88.1 19c1-priv
88.88.88.2 19c2-priv
10.10.10.192 19c1-vip
10.10.10.193 19c2-vip

10.10.10.194 hy-scan
10.10.10.195 hy-scan
10.10.10.196 hy-scan


[root@19c2 /]# vi /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
10.10.10.190 19c1
10.10.10.191 19c2
88.88.88.1 19c1-priv
88.88.88.2 19c2-priv
10.10.10.192 19c1-vip
10.10.10.193 19c2-vip

10.10.10.194 hy-scan
10.10.10.195 hy-scan
10.10.10.196 hy-scan

创建用户组

[root@19c1 /]# groupadd -g 1006 asmadmin
[root@19c1 /]# groupadd -g 1007 asmdba
[root@19c1 /]# groupadd -g 1008 asmoper
[root@19c1 /]# groupadd -g 1009 dba
[root@19c1 /]# groupadd -g 1010 oper
[root@19c1 /]# groupadd -g 1011 oinstall
[root@19c1 /]# groupadd -g 1012 backupdba
[root@19c1 /]# groupadd -g 1013 dgdba
[root@19c1 /]# groupadd -g 1014 kmdba
[root@19c1 /]# groupadd -g 1015 racdba

[root@19c2 /]# groupadd -g 1006 asmadmin
[root@19c2 /]# groupadd -g 1007 asmdba
[root@19c2 /]# groupadd -g 1008 asmoper
[root@19c2 /]# groupadd -g 1009 dba
[root@19c2 /]# groupadd -g 1010 oper
[root@19c2 /]# groupadd -g 1011 oinstall
[root@19c2 /]# groupadd -g 1012 backupdba
[root@19c2 /]# groupadd -g 1013 dgdba
[root@19c2 /]# groupadd -g 1014 kmdba
[root@19c2 /]# groupadd -g 1015 racdba

创建用户

[root@19c1 /]# useradd  -u 1001 -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba,racdba,oper,asmadmin oracle
[root@19c1 /]# useradd  -u 1002 -g oinstall -G asmadmin,asmdba,asmoper,dba grid


[root@19c2 /]# useradd  -u 1001 -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba,racdba,oper,asmadmin oracle
[root@19c2 /]# useradd  -u 1002 -g oinstall -G asmadmin,asmdba,asmoper,dba grid

[root@19c1 /]# passwd grid
Changing password for user grid.
New password: 
Retype new password: 
passwd: all authentication tokens updated successfully.

[root@19c1 /]# passwd oracle
Changing password for user grid.
New password: 
Retype new password: 
passwd: all authentication tokens updated successfully.

[root@19c2 /]# passwd grid
Changing password for user grid.
New password: 
Retype new password: 
passwd: all authentication tokens updated successfully.

[root@19c2 /]# passwd oracle
Changing password for user grid.
New password: 
Retype new password: 
passwd: all authentication tokens updated successfully.

配置ASM所需磁盘,编辑/etc/udev/rules.d/99-my-asmdevices.rules配置文件

[root@19c1 /]# cd /etc/udev/rules.d/
[root@19c1 rules.d]# ls -lrt
总用量 4
-rw-r--r--. 1 root root 709 3月   6 2015 70-persistent-ipoib.rules
[root@19c1 rules.d]# vi 99-my-asmdevices.rules
KERNEL=="sd*[!0-9]", ENV{DEVTYPE}=="disk", SUBSYSTEM=="block",  PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",  RESULT=="36000c29e40b943ae6772ffb254910685", RUN+="/bin/sh -c 'mknod /dev/asmdisk01 b  $major $minor; chown grid:asmadmin /dev/asmdisk01; chmod 0660 /dev/asmdisk01'"

KERNEL=="sd*[!0-9]", ENV{DEVTYPE}=="disk", SUBSYSTEM=="block",  PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",  RESULT=="36000c29a2bcbd0e7f1843df54da0baa6", RUN+="/bin/sh -c 'mknod /dev/asmdisk02 b  $major $minor; chown grid:asmadmin /dev/asmdisk02; chmod 0660 /dev/asmdisk02'"


[root@19c2 rules.d]# vi 99-my-asmdevices.rules
KERNEL=="sd*[!0-9]", ENV{DEVTYPE}=="disk", SUBSYSTEM=="block",  PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",  RESULT=="36000c29e40b943ae6772ffb254910685", RUN+="/bin/sh -c 'mknod /dev/asmdisk01 b  $major $minor; chown grid:asmadmin /dev/asmdisk01; chmod 0660 /dev/asmdisk01'"

KERNEL=="sd*[!0-9]", ENV{DEVTYPE}=="disk", SUBSYSTEM=="block",  PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",  RESULT=="36000c29a2bcbd0e7f1843df54da0baa6", RUN+="/bin/sh -c 'mknod /dev/asmdisk02 b  $major $minor; chown grid:asmadmin /dev/asmdisk02; chmod 0660 /dev/asmdisk02'" 

[root@19c1 rules.d]# /sbin/udevadm trigger --type=devices --action=change 
[root@19c2 rules.d]# /sbin/udevadm trigger --type=devices --action=change

[root@19c1 rules.d]#  ls -lrt /dev/asm*
brw-rw----. 1 grid asmadmin 8, 32 3月  16 19:16 /dev/asmdisk02
brw-rw----. 1 grid asmadmin 8, 16 3月  16 19:16 /dev/asmdisk01


[root@19c2 rules.d]#  ls -lrt /dev/asm*
brw-rw----. 1 grid asmadmin 8, 32 Mar 16 19:15 /dev/asmdisk02
brw-rw----. 1 grid asmadmin 8, 16 Mar 16 19:15 /dev/asmdisk01


以root用户创建“Oracle inventory 目录”

[root@19c1 /]# mkdir -p /u01/app/oraInventory
[root@19c2 /]# mkdir -p /u01/app/oraInventory

以root用户创建“Grid Infrastructure BASE 目录”

[root@19c1 /]#  mkdir -p /u01/app/grid
[root@19c2 /]#  mkdir -p /u01/app/grid

以root用户创建“Grid Infrastructure Home 目录”

[root@19c1 /]# mkdir -p /u01/app/19.0.0/grid
[root@19c2 /]# mkdir -p /u01/app/19.0.0/grid
[root@19c1 /]# chown -R grid:oinstall /u01
[root@19c1 /]# chmod -R 775 /u01
[root@19c2 /]# chown -R grid:oinstall /u01
[root@19c2 /]# chmod -R 775 /u01

以root用户创建“Oracle Base 目录”

[root@19c1 /]#  mkdir -p /u01/app/oracle
[root@19c2 /]#  mkdir -p /u01/app/oracle

以root用户创建“Oracle RDBMS Home 目录”

[root@19c1 /]# mkdir -p /u01/app/oracle/19.0.0/db
[root@19c2 /]# mkdir -p /u01/app/oracle/19.0.0/db
[root@19c1 /]# chown -R oracle:oinstall /u01/app/oracle
[root@19c1 /]# chmod -R 775 /u01/app/oracle
[root@19c2 /]# chown -R oracle:oinstall /u01/app/oracle
[root@19c2 /]# chmod -R 775 /u01/app/oracle

创建一个tmp目录

[root@19c1 /]#  mkdir /u01/tmp
[root@19c1 /]# chmod a+wr /u01/tmp

[root@19c2 /]#  mkdir /u01/tmp
[root@19c2 /]# chmod a+wr /u01/tmp

设置环境变量

[grid@19c1 ~]$ vi .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

TEMP=/u01/tmp
TMPDIR=/u01/tmp
export TEMP TMPDIR
export LD_ASSUME_KERNEL=3.8.13
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/19.0.0/grid
export ORACLE_SID=+ASM1
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
export PATH=$PATH:$ORACLE_HOME/bin
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
export CLASSPATH
umask=022 

[grid@19c2 ~]$ vi .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

TEMP=/u01/tmp
TMPDIR=/u01/tmp
export TEMP TMPDIR
export LD_ASSUME_KERNEL=3.8.13
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/19.0.0/grid
export ORACLE_SID=+ASM2
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
export PATH=$PATH:$ORACLE_HOME/bin
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
export CLASSPATH
umask=022


[root@19c1 /]# su - oracle
[oracle@19c1 ~]$ vi .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

TEMP=/u01/tmp
TMPDIR=/u01/tmp
export TEMP TMPDIR
export LD_ASSUME_KERNEL=3.8.13
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/19.0.0/db
export ORACLE_SID=hy1
export ORACLE_UNQNAME=hy
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
export PATH=$PATH:$ORACLE_HOME/bin
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
export CLASSPATH
umask=022

[root@19c2 /]# su - oracle
-bash: /home/oracle: 是一个目录
[oracle@19c2 ~]$ vi .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

TEMP=/u01/tmp
TMPDIR=/u01/tmp
export TEMP TMPDIR
export LD_ASSUME_KERNEL=3.8.13
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/19.0.0/db
export ORACLE_SID=hy2
export ORACLE_UNQNAME=hy
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
export PATH=$PATH:$ORACLE_HOME/bin
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
export CLASSPATH
umask=022

修改内核参数编辑/etc/sysctl.conf文件

[root@19c1 /]# vi /etc/sysctl.conf
# System default settings live in /usr/lib/sysctl.d/00-system.conf.
# To override those settings, enter new settings here, or in an /etc/sysctl.d/.conf file
#
# For more information, see sysctl.conf(5) and sysctl.d(5).

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.tcp_rmem = 4096 87380 4194304
net.ipv4.tcp_wmem = 4096 16384 4194304

[root@19c1 /]# sysctl -p
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.tcp_rmem = 4096 87380 4194304
net.ipv4.tcp_wmem = 4096 16384 4194304

[root@19c2 /]# vi /etc/sysctl.conf
# System default settings live in /usr/lib/sysctl.d/00-system.conf.
# To override those settings, enter new settings here, or in an /etc/sysctl.d/.conf file
#
# For more information, see sysctl.conf(5) and sysctl.d(5).

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.tcp_rmem = 4096 87380 4194304
net.ipv4.tcp_wmem = 4096 16384 4194304

[root@19c2 /]# sysctl -p
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.tcp_rmem = 4096 87380 4194304
net.ipv4.tcp_wmem = 4096 16384 4194304

修改oarcle参数的shell限制,在所有节点的/etc/security/limits.conf文件中添加以下参数

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

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

修改shell的默认参数文件,在所有节点的/etc/profile文件中添加以下内容

if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi


if [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

对C shell(csh or tcsh) 在所有节点的/etc/csh.login文件中增加以下代码

if ( $USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536
endif

if ( $USER == "grid" ) then
limit maxproc 16384
limit descriptors 65536
endif

解压GI安装压缩包:

[grid@jytest1 soft]cd /soft/
[grid@19c1 soft]$ unzip Oracle_Database_Grid_Infrastructure_19_2_0_0_0_for_Linux_x86-64.zip -d /u01/app/19.0.0/grid/

这里使用xshell与xmanager来执行安装

[root@19c1 ~]# xhost +
access control disabled, clients can connect from any host
[root@19c1 ~]# su - grid
??′ε??£o? 3? 16 19:55:59 CST 2020pts/0 ?
[grid@19c1 ~]$ cd $ORACLE_HOME
[grid@19c1 grid]$ export DISPLAY=10.138.130.242:0.0
[grid@19c1 grid]$ ./gridSetup.sh
 




















以root用户分别在两个节点上执行以下脚本,先在主节点执行。

[[root@19c1 /]# ./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@19c2 /]# ./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@19c1 /]# ./u01/app/19.0.0/grid/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/19.0.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.0.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/grid/crsdata/19c1/crsconfig/rootcrs_19c1_2020-03-16_10-18-52PM.log
2020/03/16 22:19:07 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'.
2020/03/16 22:19:08 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'.
2020/03/16 22:19:08 CLSRSC-363: User ignored prerequisites during installation
2020/03/16 22:19:08 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'.
2020/03/16 22:19:11 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'.
2020/03/16 22:19:13 CLSRSC-594: Executing installation step 5 of 19: 'SetupOSD'.
2020/03/16 22:19:13 CLSRSC-594: Executing installation step 6 of 19: 'CheckCRSConfig'.
2020/03/16 22:19:13 CLSRSC-594: Executing installation step 7 of 19: 'SetupLocalGPNP'.
2020/03/16 22:19:44 CLSRSC-594: Executing installation step 8 of 19: 'CreateRootCert'.
2020/03/16 22:19:45 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2020/03/16 22:19:51 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'.
2020/03/16 22:20:06 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'.
2020/03/16 22:20:06 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'.
2020/03/16 22:20:15 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'.
2020/03/16 22:20:16 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
2020/03/16 22:20:46 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'.
2020/03/16 22:20:56 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'.
2020/03/16 22:21:06 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'.
2020/03/16 22:21:16 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'.

ASM has been created and started successfully.

[DBT-30001] Disk groups created successfully. Check /u01/app/grid/cfgtoollogs/asmca/asmca-200316PM102150.log for details.

2020/03/16 22:22:41 CLSRSC-482: Running command: '/u01/app/19.0.0/grid/bin/ocrconfig -upgrade grid oinstall'
CRS-4256: Updating the profile
Successful addition of voting disk dda88fad4f094f1cbf686f6a903d8f9c.
Successfully replaced voting disk group with +CRS.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   dda88fad4f094f1cbf686f6a903d8f9c (/dev/asmdisk01) [CRS]
Located 1 voting disk(s).
2020/03/16 22:24:13 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.
2020/03/16 22:25:23 CLSRSC-343: Successfully started Oracle Clusterware stack
2020/03/16 22:25:23 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.
2020/03/16 22:27:29 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.
2020/03/16 22:28:06 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded

[root@19c2 /]# ./u01/app/19.0.0/grid/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/19.0.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.0.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/grid/crsdata/19c2/crsconfig/rootcrs_19c2_2020-03-16_10-28-54PM.log
2020/03/16 22:29:03 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'.
2020/03/16 22:29:03 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'.
2020/03/16 22:29:03 CLSRSC-363: User ignored prerequisites during installation
2020/03/16 22:29:03 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'.
2020/03/16 22:29:05 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'.
2020/03/16 22:29:05 CLSRSC-594: Executing installation step 5 of 19: 'SetupOSD'.
2020/03/16 22:29:05 CLSRSC-594: Executing installation step 6 of 19: 'CheckCRSConfig'.
2020/03/16 22:29:06 CLSRSC-594: Executing installation step 7 of 19: 'SetupLocalGPNP'.
2020/03/16 22:29:08 CLSRSC-594: Executing installation step 8 of 19: 'CreateRootCert'.
2020/03/16 22:29:09 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'.
2020/03/16 22:29:13 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'.
2020/03/16 22:29:13 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'.
2020/03/16 22:29:17 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'.
2020/03/16 22:29:17 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
2020/03/16 22:29:36 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2020/03/16 22:29:44 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'.
2020/03/16 22:29:47 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'.
2020/03/16 22:29:50 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'.
2020/03/16 22:29:52 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'.
2020/03/16 22:30:02 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.
2020/03/16 22:31:34 CLSRSC-343: Successfully started Oracle Clusterware stack
2020/03/16 22:31:34 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.
2020/03/16 22:31:57 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.
2020/03/16 22:32:06 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded



检查集群信息

[grid@19c1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
               ONLINE  ONLINE       19c1                     STABLE
               ONLINE  ONLINE       19c2                     STABLE
ora.chad
               ONLINE  ONLINE       19c1                     STABLE
               ONLINE  ONLINE       19c2                     STABLE
ora.net1.network
               ONLINE  ONLINE       19c1                     STABLE
               ONLINE  ONLINE       19c2                     STABLE
ora.ons
               ONLINE  ONLINE       19c1                     STABLE
               ONLINE  ONLINE       19c2                     STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.19c1.vip
      1        ONLINE  ONLINE       19c1                     STABLE
ora.19c2.vip
      1        ONLINE  ONLINE       19c2                     STABLE
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
      1        ONLINE  ONLINE       19c1                     STABLE
      2        ONLINE  ONLINE       19c2                     STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.CRS.dg(ora.asmgroup)
      1        ONLINE  ONLINE       19c1                     STABLE
      2        ONLINE  ONLINE       19c2                     STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       19c2                     STABLE
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       19c1                     STABLE
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       19c1                     STABLE
ora.asm(ora.asmgroup)
      1        ONLINE  ONLINE       19c1                     Started,STABLE
      2        ONLINE  ONLINE       19c2                     Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
      1        ONLINE  ONLINE       19c1                     STABLE
      2        ONLINE  ONLINE       19c2                     STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       19c1                     STABLE
ora.qosmserver
      1        ONLINE  ONLINE       19c1                     STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       19c2                     STABLE
ora.scan2.vip
      1        ONLINE  ONLINE       19c1                     STABLE
ora.scan3.vip
      1        ONLINE  ONLINE       19c1                     STABLE
--------------------------------------------------------------------------------




[oracle@19c1 db]$ cd /soft
[oracle@19c1 soft]$ unzip -q Oracle_Database_19_2_0_0_0_for_Linux_x86-64.zip -d /u01/app/oracle/19.0.0/db

[root@19c1 ~]# xhost +
access control disabled, clients can connect from any host
[root@19c1 ~]# su – oracle
Last login: Mon Mar 16 22:51:15 CST 2020 on pts/3
[oracle@19c1 ~]$ cd $ORACLE_HOME
[oracle@19c1 db]$ export DISPLAY=10.138.130.242:0.0
[oracle@19c1 db]$ ./runInstaller











以 root用户在所有节点上执行以下脚本,先在主节点执行

[root@19c1 /]# ./u01/app/oracle/19.0.0/db/root.sh
Performing root user operation.

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

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

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

[root@19c2 /]# ./u01/app/oracle/19.0.0/db/root.sh
Performing root user operation.

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

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

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


创建磁盘组

[root@19c1 ~]# su - grid
Last login: Tue Mar 17 10:30:57 CST 2020
[grid@19c1 ~]$ export DISPLAY=10.138.130.242:0.0
[grid@19c1 ~]$ asmca



创建数据库hy

[root@19c1 ~]# xhost +
access control disabled, clients can connect from any host
[root@19c1 ~]# su - oracle
Last login: Mon Mar 16 23:09:23 CST 2020
[oracle@19c1 ~]$ export DISPLAY=10.138.130.242:0.0
[oracle@19c1 ~]$ dbca
 
















检查集群信息

[grid@jytest1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
               ONLINE  ONLINE       jytest1                  STABLE
               ONLINE  ONLINE       jytest2                  STABLE
ora.CRS.dg
               ONLINE  ONLINE       jytest1                  STABLE
               ONLINE  ONLINE       jytest2                  STABLE
ora.DATA.dg
               ONLINE  ONLINE       jytest1                  STABLE
               ONLINE  ONLINE       jytest2                  STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       jytest1                  STABLE
               ONLINE  ONLINE       jytest2                  STABLE
ora.TEST.dg
               ONLINE  ONLINE       jytest1                  STABLE
               ONLINE  ONLINE       jytest2                  STABLE
ora.chad
               ONLINE  ONLINE       jytest1                  STABLE
               ONLINE  ONLINE       jytest2                  STABLE
ora.net1.network
               ONLINE  ONLINE       jytest1                  STABLE
               ONLINE  ONLINE       jytest2                  STABLE
ora.ons
               ONLINE  ONLINE       jytest1                  STABLE
               ONLINE  ONLINE       jytest2                  STABLE
ora.proxy_advm
               OFFLINE OFFLINE      jytest1                  STABLE
               OFFLINE OFFLINE      jytest2                  STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       jytest2                  STABLE
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       jytest1                  STABLE
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       jytest1                  STABLE
ora.MGMTLSNR
      1        ONLINE  ONLINE       jytest1                  169.254.123.145 88.8
                                                             8.88.1,STABLE
ora.asm
      1        ONLINE  ONLINE       jytest1                  Started,STABLE
      2        ONLINE  ONLINE       jytest2                  Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       jytest1                  STABLE
ora.jy.db
      1        ONLINE  ONLINE       jytest1                  Open,HOME=/u01/app/o
                                                             racle/product/12.2.0
                                                             /db,STABLE
      2        ONLINE  ONLINE       jytest2                  Open,HOME=/u01/app/o
                                                             racle/product/12.2.0
                                                             /db,STABLE
ora.jytest1.vip
      1        ONLINE  ONLINE       jytest1                  STABLE
ora.jytest2.vip
      1        ONLINE  ONLINE       jytest2                  STABLE
ora.mgmtdb
      1        ONLINE  ONLINE       jytest1                  Open,STABLE
ora.qosmserver
      1        ONLINE  ONLINE       jytest1                  STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       jytest2                  STABLE
ora.scan2.vip
      1        ONLINE  ONLINE       jytest1                  STABLE
ora.scan3.vip
      1        ONLINE  ONLINE       jytest1                  STABLE
--------------------------------------------------------------------------------

到此19C RAC for Oracle Linux 7.1的安装完成!

发表评论

电子邮件地址不会被公开。