首页 > 数据库 >Oracle 19c Rac环境部署

Oracle 19c Rac环境部署

时间:2024-11-07 15:20:04浏览次数:3  
标签:Rac 19 oracle grid ORACLE install Oracle yum 19c

Oracle 19c Rac环境部署


前言

搭建Oracle 19c Rac环境部署,使用dns进行解析。

一、软件包

linuxx64_193000_grid_home.zip

linuxx64_193000_db_home.zip

二、配置信息

1.IP地址规划

编辑/etc/hosts

#public ip
10.1.50.213   kezcc1   kezcc1.zcc.com
10.1.50.214   kezcc2   kezcc2.zcc.com

#vip ip
10.1.50.215   kezcc1-vip  kezcc1-vip.zcc.com
10.1.50.216   kezcc2-vip  kezcc2-vip.zcc.com

#priv ip
10.10.10.213  kezcc1-priv kezcc1-priv.zcc.com
10.10.10.214  kezcc2-priv kezcc2-priv.zcc.com

#scan ip
10.1.50.217  kezcc-scan  kezcc-scan.zcc.com
10.1.50.218  kezcc-scan  kezcc-scan.zcc.com
10.1.50.219  kezcc-scan  kezcc-scan.zcc.com

2.配置dns服务端

一般情况下都是采用windows server作为dns服务器

2.1 安装dns服务

管理》添加角色和功能

在这里插入图片描述

2.2 管理工具》dns

正向查找区域》新建
在这里插入图片描述
反向查找区域》新建
在这里插入图片描述

2.3 添加解析ip和地址

根据hosts对应的名称进行添加

3、配置DNS客户端

3.1 配置/etc/hosts文件

在主机名称后面加上域名

3.2 配置/etc/resolv.conf

search zcc.com zccdns.zcc.com localdomain
nameserver 10.1.50.212
options timeout:2
options attempts:5

3.3 配置解析顺序/etc/host.conf

orderbind,hosts
multion

3.4 配置网卡上的DNS

PEERDNS=NO
DNS1=10.1.50.212

3.5 停止NetworkManager影响

systemctl stop NetworkManager.service
systemctl disable NetworkManager.service 
systemctl status NetworkManager.service 

3.6 测试nslookup

systemctl restart network
nslookup

3.7 检查两个网卡配置信息

ONBOOT=yes

三、Linux操作系统的配置及参数修改

1、准备文件系统

pvcreate /dev/sdb /dev/sdc
vgcreate softvg /dev/sdb
vgcreate oravg /dev/sdc
lvcreate -n softlv -L 30000M softvg
lvcreate -n oralv -L 50000M oravg
mkfs.xfs /dev/softvg/softlv
mkfs.xfs /dev/oravg/oralv
​
vi /etc/fstab
/dev/oravg/oralv     /oracle   xfs  defaults 0 0
/dev/softvg/softlv   /soft     xfs  defaults 0 0
​
mkdir /oracle
mkdir /soft
​
mount /oracle
mount /soft
/oracle   #存放集群安装的目录
/soft     #存放软件的目录

2、创建用户、组、目录

/usr/sbin/groupadd -g 60001 oinstall
/usr/sbin/groupadd -g 60002 dba
/usr/sbin/groupadd -g 60003 oper
/usr/sbin/groupadd -g 60004 backupdba 
/usr/sbin/groupadd -g 60005 dgdba
/usr/sbin/groupadd -g 60006 kmdba
/usr/sbin/groupadd -g 60007 asmdba
/usr/sbin/groupadd -g 60008 asmoper
/usr/sbin/groupadd -g 60009 asmadmin 
/usr/sbin/groupadd -g 60010 racdba
​
useradd -u 61001 -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba,racdba,oper oracle 
useradd -u 61002 -g oinstall -G asmadmin,asmdba,asmoper,dba grid
​
id oracle
id grid
​
passwd oracle
passwd grid
​
mkdir -p /oracle/app/grid
mkdir -p /oracle/app/19.3/grid
chown -R grid:oinstall /oracle
​
mkdir -p /oracle/app/oracle
chown -R oracle:oinstall /oracle/app/oracle
​
mkdir -p /oracle/app/oraInventory
chown -R grid:oinstall /oracle/app/oraInventory 
chmod -R 775 /oracle

3、安装相关软件包

#配置yum源
mount /dev/cdrom /mnt
​
cd /etc/yum.repos.d
mkdir bk
mv public-yum-ol7.repo bk/
vi dvd.repo
​
[EL]
name=Linux7.3DVD 
baseurl=file:///mnt
gpgcheck=0
enabled=1
​
yum clean all
yum makecache
​
yum -y install autoconf
yum -y install automake
yum -y install binutils
yum -y install binutils-devel 
yum -y install bison
yum -y install cpp
yum -y install dos2unix
yum -y install ftp
yum -y install gcc
yum -y install gcc-c++
yum -y install lrzsz
yum -y install python-devel
yum -y install compat-db*
yum -y install compat-gcc-34
yum -y install compat-gcc-34-c++
yum -y install compat-libcap1
yum -y install compat-libstdc++-33
yum -y install compat-libstdc++-33.i686 
yum -y install glibc-*
yum -y install glibc-*.i686
yum -y install libXpm-*.i686
yum -y install libXp.so.6
yum -y install libXt.so.6
yum -y install libXtst.so.6
yum -y install libXext
yum -y install libXext.i686
yum -y install libXtst
yum -y install libXtst.i686
yum -y install libX11
yum -y install libX11.i686
yum -y install libXau
yum -y install libXau.i686
yum -y install libxcb
yum -y install libxcb.i686
yum -y install libXi
yum -y install libXi.i686
yum -y install libgcc_s.so.1
yum -y install libstdc++.i686
yum -y install libstdc++-devel
yum -y install libstdc++-devel.i686
yum -y install libaio
yum -y install libaio.i686
yum -y install libaio-devel
yum -y install libaio-devel.i686
yum -y install ksh
yum -y install libXp
yum -y install libaio-devel
yum -y install numactl
yum -y install numactl-devel
yum -y install make-y
yum -y install sysstat-y
yum -y install unixODBC
yum -y install unixODBC-devel
yum -y install elfutils-libelf-devel-0.97 
yum -y install elfutils-libelf-devel
yum -y install redhat-lsb-core
yum -y install *vnc*

4、修改系统相关参数

4.1 修改资源限制参数

vi /etc/security/limits.conf

oracle   soft    nofile   1024   
oracle   hard    nofile   65536   
oracle   soft    nproc    16384   
oracle   hard    nproc    16384   
oracle   soft    stack    10240   
oracle   hard    stack    32768  
  
grid     soft    nofile   1024   
grid     hard    nofile   65536   
grid     soft    nproc    16384   
grid     hard    nproc    16384   
grid     soft    stack    10240  
grid     hard    stack    32768  
​
#Oracle recommended value for memlock is set to 3145728 for user oracle
oracle  hard  memlock  576716800
#Oracle recommended value for memlock is set to 3145728 for user oracle
oracle  soft  memlock  576716800
ulimit -a

vi /etc/security/limits.d/90-nproc.conf
* - nproc 16384
​
vi /etc/pam.d/login
session required pam_limits.so

4.2 修改内核参数

vi /etc/sysctl.conf

fs.file-max = 6815744  
kernel.sem = 250 32000 100 128  
kernel.shmmni = 4096  
kernel.shmall = 4194304  
kernel.shmmax = 17179869184  
kernel.panic_on_oops = 1    
net.core.rmem_default = 262144  
net.core.rmem_max = 4194304  
net.core.wmem_default = 262144  
net.core.wmem_max = 1048576  
net.ipv4.conf.all.rp_filter = 2  
net.ipv4.conf.default.rp_filter = 2  
fs.aio-max-nr = 1048576  
net.ipv4.ip_local_port_range = 9000 65500
vm.nr_hugepages=2500

hugepages大页,内存超过8G就需要使用,计算方法:SGA/2M

kernel.shmmax设置为物理内存的75%,kernel.shmall为kernel.shmmax/4096,可以通过下面参数计算

MEMORY=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
SHMMAX=`expr $MEMORY \* 1024 \* 3 / 4`
SHMALL=`expr $MEMORY \* 1024 / 4 / 1024`

使内核参数生效

sysctl -p 或者 /sbin/sysctl --system

关闭透明页

vi /etc/rc.local
​
if test -f /sys/kernel/mm/transparent_hugepage/enabled; then
echo never > /sys/kernel/mm/transparent_hugepage/enabled
fi
if test -f /sys/kernel/mm/transparent_hugepage/defrag; then
echo never > /sys/kernel/mm/transparent_hugepage/defrag
fi
​
chmod +x /etc/rc.d/rc.local

4.3 配置安全

#关闭防火墙

systemctl status firewalld.service
systemctl stop firewalld.service
systemctl disable firewalld.service

#关闭selinux

vi/etc/selinux/config
SELINUX=disabled
或者
sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config
​
setenforce 0

4.4 关闭NTP服务

systemctl stop ntpd.service
systemctl disable ntpd.service 
systemctl status ntpd.service
​
mv /etc/ntp.conf /etc/ntp.conf.bak
rm /var/run/ntpd.pid

4.5 配置NOZEROCONF

vi /etc/sysconfig/network
NOZEROCONF=yes

4.6 修改nsswitch.conf

vi /etc/nsswitch.conf
host:files dns myhostname nis

4.7 关闭avahi-daemon和avahi-dnsconfd

systemctl stop avahi-daemon
systemctl disable avahi-daemon
systemctl stop avahi-dnsconfd
systemctl disable avahi-dnsconfd

4.8 关闭chrondy服务

systemctl stop chronyd
systemctl disable chronyd
cp /etc/chrony.conf /etc/chrony.conf.bak
rm -rf /etc/chrony.conf

4.9 添加shm

vim /etc/fstab
tmpfs   /dev/shm      tmpfs    defaults,size=16G  0 0
​
mount -o remount /dev/shm

size大小设置跟PGA最大值一致或者更高

5、配置用户环境变量

节点1:

su - grid

PS1="[`whoami`@`hostname`:"'$PWD]$'
export PS1
umask022
#aliassqlplus="rlwrap sqlplus"
export TMP=/tmp
export LANG=en_US
export TMPDIR=$TMP
ORACLE_SID=+ASM1; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
ORACLE_BASE=/oracle/app/grid; export ORACLE_BASE
ORACLE_HOME=/oracle/app/19.3/grid; export ORACLE_HOME
NLS_DATE_FORMAT="yyyy-mm-ddHH24:MI:SS"; export NLS_DATE_FORMAT
PATH=$PATH:$HOME/.local/bin:$HOME/bin:$ORACLE_HOME/bin; export PATH 
THREADS_FLAG=native; export THREADS_FLAG
if[$USER="oracle"]||[$USER="grid"];then
  if[$SHELL="/bin/ksh"];then
    ulimit -p 16384
    ulimit -n 65536
  else
    ulimit -u 16384 -n 65536
  fi
  umask 022
fi

su - oracle

PS1="[`whoami`@`hostname`:"'$PWD]$'
#alias sqlplus="rlwrap sqlplus"
#alias rman="rlwrap rman"
expor tPS1
export TMP=/tmp
export LANG=en_US
export TMPDIR=$TMP
export ORACLE_HOSTNAME=kezcc1
export ORACLE_UNQNAME=kezcc
ORACLE_SID=kezcc1; export ORACLE_SID
ORACLE_BASE=/oracle/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/19.3/db_1; export ORACLE_HOME
ORACLE_TERM=xterm; export ORACLE_TERM
NLS_DATE_FORMAT="yyyy-mm-ddHH24:MI:SS"; export NLS_DATE_FORMAT
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK; export NLS_LANG
PATH=.:$PATH:$HOME/.local/bin:$HOME/bin:$ORACLE_BASE/product/19.3/db_1/bin:$ORACLE_HOME/bin; export PATH
THREADS_FLAG=native; export THREADS_FLAG
if[$USER="oracle"]||[$USER="grid"];then
  if[$SHELL="/bin/ksh"];then
    ulimit -p 16384
    ulimit -n 65536
  else
    ulimit -u 16384 -n 65536
  fi
  umask 022
fi

su - root

vi .bash_profile
export PATH=/oracle/app/12.2/grid/bin:$PATH

节点2:

su - grid

PS1="[`whoami`@`hostname`:"'$PWD]$'
export PS1
umask022
#aliassqlplus="rlwrap sqlplus"
export TMP=/tmp
export LANG=en_US
export TMPDIR=$TMP
ORACLE_SID=+ASM2; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
ORACLE_BASE=/oracle/app/grid; export ORACLE_BASE
ORACLE_HOME=/oracle/app/19.3/grid; export ORACLE_HOME
NLS_DATE_FORMAT="yyyy-mm-ddHH24:MI:SS"; export NLS_DATE_FORMAT
PATH=$PATH:$HOME/.local/bin:$HOME/bin:$ORACLE_HOME/bin; export PATH 
THREADS_FLAG=native; export THREADS_FLAG
if[$USER="oracle"]||[$USER="grid"];then
  if[$SHELL="/bin/ksh"];then
    ulimit -p 16384
    ulimit -n 65536
  else
    ulimit -u 16384 -n 65536
  fi
  umask 022
fi

su - oracle

PS1="[`whoami`@`hostname`:"'$PWD]$'
#alias sqlplus="rlwrap sqlplus"
#alias rman="rlwrap rman"
expor tPS1
export TMP=/tmp
export LANG=en_US
export TMPDIR=$TMP
export ORACLE_HOSTNAME=kezcc2
export ORACLE_UNQNAME=kezcc
ORACLE_SID=kezcc2; export ORACLE_SID
ORACLE_BASE=/oracle/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/19.3/db_1; export ORACLE_HOME
ORACLE_TERM=xterm; export ORACLE_TERM
NLS_DATE_FORMAT="yyyy-mm-ddHH24:MI:SS"; export NLS_DATE_FORMAT
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK; export NLS_LANG
PATH=.:$PATH:$HOME/.local/bin:$HOME/bin:$ORACLE_BASE/product/19.3/db_1/bin:$ORACLE_HOME/bin; export PATH
THREADS_FLAG=native; export THREADS_FLAG
if[$USER="oracle"]||[$USER="grid"];then
  if[$SHELL="/bin/ksh"];then
    ulimit -p 16384
    ulimit -n 65536
  else
    ulimit -u 16384 -n 65536
  fi
  umask 022
fi

su - root

vi ~/.bash_profile
export PATH=/oracle/app/19.3/grid/bin:$PATH

四、配置共享存储及ASM磁盘

查看磁盘的uuid

for i in b c d e
do 
echo "sd$i" "`/usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/sd$i`";
done

1、配置multipath

mpathconf --enable
systemctl restart multipathd.service
multipath -ll
vi /etc/multipath.conf
​
blacklist {
        devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
        devnode "^hd[a-z][[0-9]*]"
        devnode "^cciss!c[0-9]d[0-9]*"
        devnode "^sda[0-9]"
}
​
multipaths {
       multipath {
               wwid                    14f504e46494c4552444143376e542d7a6f67332d49303855
               alias                   file_data
       }
       multipath {
               wwid                    14f504e46494c4552316868436c592d695345312d43333778
               alias                   file_ocr
       }
       multipath {
               wwid                    14f504e46494c455278504a486f6d2d564d324a2d54676d36
               alias                   file_arch
       }
       multipath {
               wwid                    14f504e46494c45526630673473412d577049592d33377372
               alias                   file_mgmt
       }
}

重启生效

systemctl restart multipathd.service
multipath -ll

2、编写udev rules文件,生成文件内容的脚本:

for i in b c d e;
do
echo "KERNEL==\"sd?\",SUBSYSTEM==\"BLOCK\",PROGRAM==\"/usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/\$name\",RESULT==\"`/usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/sd$i`\",SYMLINK+=\"asm-disk$i\",OWNER=\"grid\",GROUP=\"asmadmin\",MODE=\"0660\""
done

将生成的内容保存在 99-oracle-asmdevices.rules 文件中。

重启 udev 设备

/sbin/udevadm trigger --type=devices --action=change

检查 udev设备

ls -lsa /dev/asm*
ls -lsa /dev/sd*

五、部署安装

1、准备文件

上传文件LINUX.X64_193000_db_home.zip LINUX.X64_193000_grid_home.zip

[root@kezcc1 u01]#chown grid.asmadmin LINUX.X64_193000_grid_home.zip
[root@kezcc1 u01]#mv LINUX.X64_193000_grid_home.zip /u01/app/19/grid
[root@kezcc1 u01]#su - grid
[grid@kezcc1 grid]$cd $ORACLE_HOME
[grid@kezcc1 grid]$ll
total 2821472
-rw-r--r--. 1 grid asmadmin 2889184573 Mar 30  2022 LINUX.X64_193000_grid_home.zip
[grid@kezcc1 grid]$ unzip LINUX.X64_193000_grid_home.zip

安装CVUDISK

[root@kezcc1 ~]# rpm -ivh /u01/app/19/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@kezcc1 ~]# scp /u01/app/19/grid/cv/rpm/cvuqdisk-1.0.10-1.rpm [email protected]:/root/
The authenticity of host '10.1.50.214 (10.1.50.214)' can't be established.
ECDSA key fingerprint is SHA256:4981la1ZpKQnst3bdHrXfbankjkHvCVMq8rO8i6luzI.
ECDSA key fingerprint is MD5:01:47:04:ad:b5:56:f9:11:15:8d:23:7c:7b:ad:ce:7b.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.1.50.214' (ECDSA) to the list of known hosts.
[email protected]'s password:
cvuqdisk-1.0.10-1.rpm  
[root@kezcc2 ~]# 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%]

配置互信(方法:使用sshUserSetup.sh快速创建互信)
下面两条命令在一个节点上执行即可(可以在root用户下执行):

[root@XAG01 scripts]# pwd
/u01/app/12.2.0/grid/oui/prov/resources/scripts
root@XAG01 scripts]# ./sshUserSetup.sh -user grid  -hosts "kezcc1 kezcc2" -advanced -exverify –confirm
root@XAG01 scripts]# ./sshUserSetup.sh -user oracle  -hosts "kezcc1 kezcc2" -advanced -exverify -confirm

2、验证

[grid@kezcc1 grid]$ ./runcluvfy.sh stage -pre crsinst -n kezcc1,kezcc2 -fixup -verbose

3、Grid安装

[grid@kezcc1 grid]./gridSetup.sh

在这里插入图片描述
在这里插入图片描述
cluster Name不能超过15个字符
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述在这里插入图片描述
在这里插入图片描述

1.、2节点root账号下分别依次执行

[root@kezcc1 ~]# /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@kezcc2 ~]# /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@kezcc1 ~]# /u01/app/19/grid/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/19/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/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/grid/crsdata/kezcc1/crsconfig/rootcrs_kezcc1_2024-07-15_11-34-09AM.log
2024/07/15 11:34:40 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'.
2024/07/15 11:34:40 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'.
2024/07/15 11:34:40 CLSRSC-363: User ignored prerequisites during installation
2024/07/15 11:34:40 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'.
2024/07/15 11:34:43 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'.
2024/07/15 11:34:45 CLSRSC-594: Executing installation step 5 of 19: 'SetupOSD'.
2024/07/15 11:34:45 CLSRSC-594: Executing installation step 6 of 19: 'CheckCRSConfig'.
2024/07/15 11:34:45 CLSRSC-594: Executing installation step 7 of 19: 'SetupLocalGPNP'.
2024/07/15 11:35:12 CLSRSC-594: Executing installation step 8 of 19: 'CreateRootCert'.
2024/07/15 11:35:14 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2024/07/15 11:35:20 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'.
2024/07/15 11:35:41 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'.
2024/07/15 11:35:42 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'.
2024/07/15 11:35:51 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'.
2024/07/15 11:35:52 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
2024/07/15 11:37:02 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'.
2024/07/15 11:37:13 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'.
2024/07/15 11:38:46 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'.
2024/07/15 11:38:56 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-240715AM113933.log for details.

2024/07/15 11:41:35 CLSRSC-482: Running command: '/u01/app/19/grid/bin/ocrconfig -upgrade grid oinstall'
CRS-4256: Updating the profile
Successful addition of voting disk 6d76289fd9454f10bff99f27e22b25a9.
Successfully replaced voting disk group with +OCR.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   6d76289fd9454f10bff99f27e22b25a9 (/dev/mapper/file_ocr) [OCR]
Located 1 voting disk(s).
2024/07/15 11:43:39 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.
2024/07/15 11:44:53 CLSRSC-343: Successfully started Oracle Clusterware stack
2024/07/15 11:44:53 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.
2024/07/15 11:47:19 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.

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


2024/07/15 11:49:37 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded
[root@kezcc2 ~]# /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@kezcc2 ~]# /u01/app/19/grid/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/19/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/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/grid/crsdata/kezcc2/crsconfig/rootcrs_kezcc2_2024-07-15_11-50-06AM.log
2024/07/15 11:50:34 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'.
2024/07/15 11:50:34 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'.
2024/07/15 11:50:35 CLSRSC-363: User ignored prerequisites during installation
2024/07/15 11:50:35 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'.
2024/07/15 11:50:37 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'.
2024/07/15 11:50:37 CLSRSC-594: Executing installation step 5 of 19: 'SetupOSD'.
2024/07/15 11:50:37 CLSRSC-594: Executing installation step 6 of 19: 'CheckCRSConfig'.
2024/07/15 11:50:38 CLSRSC-594: Executing installation step 7 of 19: 'SetupLocalGPNP'.
2024/07/15 11:50:40 CLSRSC-594: Executing installation step 8 of 19: 'CreateRootCert'.
2024/07/15 11:50:40 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'.
2024/07/15 11:50:51 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'.
2024/07/15 11:50:51 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'.
2024/07/15 11:50:53 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'.
2024/07/15 11:50:53 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
2024/07/15 11:51:08 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2024/07/15 11:51:58 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'.
2024/07/15 11:52:00 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'.
2024/07/15 11:53:25 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'.
2024/07/15 11:53:27 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'.
2024/07/15 11:53:39 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.
2024/07/15 11:54:36 CLSRSC-343: Successfully started Oracle Clusterware stack
2024/07/15 11:54:36 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.
2024/07/15 11:55:03 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.
2024/07/15 11:55:13 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded

执行均成功后,点击OK,程序继续运行
在这里插入图片描述

在这里插入图片描述

4、配置ASM磁盘组

[grid@kezcc1 grid]$ asmca

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

5、安装oracle数据库软件

[root@kezcc1 ~]# chown oracle.oinstall LINUX.X64_193000_db_home.zip
[root@kezcc1 ~]# mv LINUX.X64_193000_db_home.zip /tmp
[root@kezcc1 ~]# su - oracle
Last login: Fri Jul 12 17:21:02 CST 2024 on pts/2
[oracle@kezcc1 ~]$ mv /tmp/LINUX.X64_193000_db_home.zip $ORACLE_HOME
[oracle@kezcc1 ~]$ cd $ORACLE_HOME
[oracle@kezcc1 db_1]$ unzip LINUX.X64_193000_db_home.zip
[oracle@kezcc1 db_1]$ ./runInstaller

在这里插入图片描述
在这里插入图片描述在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
两个节点root用户下运行脚本

[root@kezcc1 ~]# /u01/app/oracle/product/19/db_1/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/19/db_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@kezcc2 ~]# /u01/app/oracle/product/19/db_1/root.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/19/db_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、安装数据库

dbca
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
prcoess一般生产环境设置3000
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在生产环境中,点击Customize Storage Locatons进行配置:

#Control Files
Maximum Datafiles: 8192

#Tablespaces
USERS 5G  
其余20G 关闭自动扩展

Redo Log Groups
10组 512M

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

7、修改rman参数

[oracle@node1 admin]$ rman target /
Recovery Manager: Release 19.0.0.0.0 - Production on Sat Jul 20 09:59:14 2024
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

connected to target database: KEZCC (DBID=461961208)

RMAN> show all;
RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+data/snapcf_kezcc.f';

六、配置RAC环境下的归档和闪回

1、启动

首先要关闭另一个实例

alter system set db_recovery_file_dest_size=1G scope=both;
alter systen set db_recovery_file_dest='+dgrecovery' scope=both;

alter system set cluster_database=false scope=spfile;

shutdown immediate;
startup mount;
alter database archivelog;
alter database flashback on;  --如果需要开闪回,就多执行本条命令,没必要就不要开

alter system set cluster_database=true scope=spfile;
shutdown immediate;
startup mount;
archive log list;
alter system  switch logfile;

打开另外一个实例

2、关闭

首先关闭另一个实例

lter system set cluster_database=false scope=spfile;

shutdown immediate;
startup mount;
alter database flashback off;
alter database noarchivelog;

alter system set cluster_database=true scope=spfile;

shutdown immediate;
startup mount;
archive log list;

打开另一个实例

七、集群测试(负载均衡、故障切换)

1、测试环境

win client

oracle client 32/64bit

plsql 32/64bit

2、负载均衡测试

在客户端tns配置

kezcc =
	(DESCRIPTION =
		(ADDRESS = (PROTOCOL = TCP)(HOST = rac-scan.zcc.com)(PORT = 1521))
		(CONNECT_DATA =
			(SERVER = DEDICATED)
			(SERVICE_NAME = kezcc)
		)
	)

3、负载均衡+故障透明切换测试

–session

kezcc =
	(DESCRIPTION =
		(ADDRESS = (PROTOCOL = TCP)(HOST = rac-scan.zcc.com)(PORT = 1521))
		(LOAD_BALANCE = yes)
		(FAILOVER = ON)
		(CONNECT_DATA =
			(SERVER = DEDICATED)
			(SERVICE_NAME = kezcc)
			(FAILOVER_MODE =
				(TYPE = SESSION)
				(METHOD = BASIC)
			)
		)
	)

–select(建议)

kezcc =
	(DESCRIPTION =
		(ADDRESS = (PROTOCOL = TCP)(HOST = rac-scan.zcc.com)(PORT = 1521))
		(LOAD_BALANCE = yes)
		(FAILOVER = ON)
		(CONNECT_DATA =
			(SERVER = DEDICATED)
			(SERVICE_NAME = kezcc)
			(FAILOVER_MODE =
				(TYPE = SELECT)
				(METHOD = BASIC)
			)
		)
	)

总结

目前安装19c rac基本上没有什么bug,只要在检查环境的时候解决相对应的问题即可完成。

标签:Rac,19,oracle,grid,ORACLE,install,Oracle,yum,19c
From: https://blog.csdn.net/qq_15168159/article/details/143587069

相关文章

  • oracle11g 常用基本参数优化设置
    1、进程及会话数进程默认150,会话默认是247;查看进程及会话数showparameterprocess;showparametersessions;2、修改进程及会话数altersystemsetprocesses=1250scope=spfile;altersystemsetsessions=1380scope=spfile;SQL>altersystemsetprocesses=1250......
  • Centos7.8静默安装企业版Oracle11g和创建实例
    1、安装环境准备:A、系统版本和oracle11g企业版安装软件压缩包:[root@dbprimary07~]#cat/etc/redhat-releaseCentOSLinuxrelease7.8.2003(Core)[root@dbprimary07~]#uname-aLinuxdbprimary073.10.0-1127.el7.x86_64#1SMPTueMar3123:36:51UTC2020x86_64x......
  • Oracle之ORA-32001错误分析
    具体报错场景说明:oracle11g启动时采用的是指定pfile文件进行启动SQL>startuppfile='/u01/oracle/interlib/initorcl.ora'mount;ORACLEinstancestarted.TotalSystemGlobalArea1586708480bytesFixedSize2213736bytesVariableSize......
  • oracle11g启动过程中加载配置文件
    oracle指定配置文件启动,要是不指定配置文件启动的话默认找的参数文件顺序如下:在oracle11g中oracle启动过程中默认会加载相应的配置文件来启动oracle服务。检查参数文件有两个,一个是spfile<ORACLE_SID>.ora文件,另一个是inti<ORACLE_SID>.ora文件。oracle软件服务安装完成后......
  • 【Oracle】How Do Indexes Become Unusable
    遇到的场景:Oracle数据库的分区表出现UNUSABLEINDEX,下述文档用于解决相关问题。SymptomsDescriptionofwhichoperationsmarkindexpartitionsasINDEXUNUSABLE.描述那些操作使得索引不可用CauseTherearesixtypesofmaintenanceoperationsandaddingapartition......
  • IOI 2011 Race
    [IOI2011]Race题目描述给一棵树,每条边有权。求一条简单路径,权值和等于\(k\),且边的数量最小。输入格式第一行包含两个整数\(n,k\),表示树的大小与要求找到的路径的边权和。接下来\(n-1\)行,每行三个整数\(u_i,v_i,w_i\),代表有一条连接\(u_i\)与\(v_i\),边权为\(w_i\)......
  • yolov8目标跟踪与行人车辆计数+YOLOv8 Object Detection with DeepSORT Tracking(ID +
    YOLOv8目标检测与DeepSORT跟踪技术简介在计算机视觉领域,目标检测和跟踪是两个至关重要的任务。目标检测旨在识别图像或视频中的特定对象,并确定它们的位置;而目标跟踪则是在连续的帧之间保持对这些对象的身份和位置的一致性跟踪。本文将详细介绍YOLOv8作为先进的目标检测算法......
  • 【Java SE语法】抽象类(abstract class)和接口(interface)有什么异同?
    目录1.抽象类与接口的基本概念1.1 抽象类1.2接口2.抽象类与接口的异同2.1相同点2.2不同点3.拓展知识:多态与设计模式3.1多态3.2设计模式4.结论        在软件工程中,设计模式和代码结构的选择对于构建可维护、可扩展的系统至关重要。抽象类(Abstrac......
  • 毕业设计-课程设计-Cisco paket tracert校园网网络设计
    文章目录1.前言2.详细设计3.文档参考绪论3.1课题背景3.2校园网建设的目的和意义3.3系统设计思想3.4本章小结4.获取源码1.前言......
  • 刘艳兵-DBA024-关于oracle实例说法正确的是?
    关于oracle实例说法正确的是?A   ORACLE_SID和实例名可以相同,也可以不同B   使用pfile参数文件启动实例时,至少要配置两个参数C   oracle在同一个$ORACLE_HOME下,可以有两个同名的实例D   实例名和数据库名必须相同答:A   ORACLE_SID和实例名可以相同,也......