Oracle Database 19c(19.9) RAC On RedHat 8.3 Using VirtualBox and MacBook
Oracle Database 19c(19.9) RAC On RedHat 8.3 Using VirtualBox and MacBook
導讀:
1.一篇oracle 19c rac安裝並應用19.9 ru的文章.
2.一篇手把手一步一步教你在MacBook筆記本玩轉19c RAC的文章.
為什麼寫這篇文章?
隨著19c越來越普遍,patch也逐步完善,銀行和金融客戶也在使用這個穩定的版本,我決定把公司的11g,12.1,12.2也逐步升至19c,所以就有寫這篇文章的初衷,想帶領大家升級先得自己對這個版本有一定的瞭解,不多說接下來直接乾貨。
1.虛擬環境準備
1.1 硬體環境與軟體版本
MacBook電腦系統:macOS Big. Sur 11.6 虛擬化軟體:VirtualBox 6.1 作業系統軟體包:rhel-8.3-x86_64-dvd.iso 資料庫基礎包:Gi :LINUX.X64_193000_grid_home.zip 和 Db :LINUX.X64_193000_db_home.zip 資料庫RU軟體包: Database Release Update 19.9.0.0.201020 Patch 31771877 Grid Infrastructure Release Update 19.9.0.0.201020 Patch 31750108
1.2 建立虛擬機器
1.2.1 rac1伺服器環境簡介 網路:內部網路+host-only網路|本地磁碟:動態60g|記憶體:3g #備註:rac1配置完成後,使用rac1為模版克隆rac2和rac3,然後配置共享磁碟 1.2.2 VirtualBox安裝redhat 8.3作業系統 作業系統自動安裝即可(光碟機選擇:rhel-8.3-x86_64-dvd.iso) 網路配置 ifcfg-enp0s3 內部網路 公有網路(混雜模式:全部允許) ifcfg-enp0s8 host-only網路 私有網路(混雜模式:全部允許) #備註:若需連線外網,可選擇 橋接模式 上傳軟體,使用MacBook中的終端軟體,直接scp即可 scp p6880880_190000_Linux-x86-64.zip root@192.168.56.201:/tmp
2.安裝前環境準備
2.1 規劃
2.1.1 Oracle Rac硬體架構圖
2.1.2 軟體
Gi:LINUX.X64_193000_grid_home.zip DB:LINUX.X64_193000_db_home.zip GI ru:p31750108_190000_Linux-x86-64.zip DB ru:p31771877_190000_Linux-x86-64.zip Opath:p6880880_190000_Linux-x86-64.zip Os:Red Hat Enterprise Linux release 8.3 (Ootpa)
2.1.3 網路
原則:優先雙網路卡/優先私有網路卡萬兆/避免使用169.254.*.*地址段 /etc/hosts規劃如下 #3個public ip 10.0.0.101 rac1 10.0.0.102 rac2 10.0.0.103 rac3 #3個vip ip 10.0.0.104 rac1vip 10.0.0.105 rac2vip 10.0.0.106 rac3vip #1個scan ip 10.0.0.107 racscanip #3個private ip 192.168.56.201 rac1priv 192.168.56.202 rac2priv 192.168.56.203 rac3priv #若是生產請遵循以上建議,本文是測試環境以上均可忽略。
2.1.4 許可權,使用者,安裝目錄
/usr/sbin/useradd -u 54321 -g oinstall -G dba,oper,asmdba,asmadmin,racdba,backupdba,dgdba,kmdba oracle passwd oracle /usr/sbin/useradd -u 54331 -g oinstall -G dba,asmadmin,asmdba,asmoper,racdba grid passwd grid soft ORACLE_BASE ORACLE_HOME gi /u01/app/grid /u01/app/19.0.0/grid oracle /u01/app/oracle /u01/app/oracle/product/19.0.0/db_1
2.1.5 儲存
OCR /dev/sdb grid:asmadmin 660 2G /dev/sdc grid:asmadmin 660 2G Normal 2G /dev/sdd grid:asmadmin 660 2G DATA /dev/sde grid:asmadmin 660 40G External 40G ARCH /dev/sdf grid:asmadmin 660 10G External 10G
2.2 檢驗與配置Oracle RAC所有叢集節點
2.2.1 作業系統關閉防火牆和selinux
# 優先關閉防火牆,因我們需要透過ssh到虛擬機器執行檢驗,若有防火牆無法使用ssh,為提升效果優先關閉防火牆 # 關閉防火牆 systemctl status firewalld systemctl start firewalld.service systemctl stop firewalld.service systemctl disable firewalld.service systemctl status firewalld # 永久關閉selinux cat /etc/sysconfig/selinux SELINUX=disabled
2.2.2 硬體檢驗
2.2.2.1 作業系統基礎環境檢驗
# 作業系統發行版 cat /etc/redhat-release # 核心版本 uname -a # Memory total grep MemTotal /proc/meminfo # SWAP Total grep SwapTotal /proc/meminfo # tmp目錄大小 df -h /tmp # 當前記憶體和swap使用狀態 free -g # 共享記憶體大小 df -h /dev/shm # CPU 型號,物理個數,核數,邏輯個數 cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l cat /proc/cpuinfo| grep "cpu cores"| uniq cat /proc/cpuinfo| grep "processor"| wc -l # 節點資訊收集省略
2.2.2.2 網路檢驗
ifconfig | grep inet # 省略(本文為測試環境,單網路卡即可,所以雙網路卡繫結省略) # 真實雙網路卡繫結請參考: http://blog.itpub.net/26442936/viewspace-2654393/
2.2.3 作業系統配置與最佳化
2.2.3.1 安裝rpm包(使用yum安裝),軟體包最低需求
bc binutils elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio libaio-devel libXrender libX11 libXau libXi libXtst libgcc libnsl librdmacm libstdc++ libstdc++-devel libxcb libibverbs make smartmontools sysstat ipmiutil (for Intelligent Platform Management Interface) libnsl2 (for Oracle Database Client only) libnsl2-devel (for Oracle Database Client only) net-tools (for Oracle RAC and Oracle Clusterware) nfs-utils (for Oracle ACFS) 使用指令碼批次檢驗rpm包所需(反覆執行當指令碼,當無輸出後,即rpm已滿足安裝所需) for i in \ bc binutils elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio libaio-devel \ libgcc libstdc++ libstdc++-devel libxcb libX11 libXau libXi libXtst libXrender libXrender-devel libnsl librdmacm libstdc++ \ libstdc++-devel libxcb libibverbs make smartmontools sysstat net-tools nfs-utils smartmontools sysstat ipmiutil libnsl2 libnsl2-devel do rpm -q $i &>/dev/null || F="$F $i" done ;echo $F;unset F 配置yum # 請參考附表:centos的yum代替redhat的yum的配置方法 yum批次安裝rpm包 yum install bc binutils elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio libaio-devel \ libgcc libstdc++ libstdc++-devel libxcb libX11 libXau libXi libXtst libXrender libXrender-devel libnsl librdmacm libstdc++ \ libstdc++-devel libxcb libibverbs make smartmontools sysstat net-tools nfs-utils smartmontools sysstat ipmiutil libnsl2 libnsl2-devel
2.2.3.2 作業系統建立軟體安裝組及使用者(grid,oracle)
groupadd -g 54421 oinstall groupadd -g 54322 dba groupadd -g 54323 oper groupadd -g 54324 backupdba groupadd -g 54325 dgdba groupadd -g 54326 kmdba groupadd -g 54327 asmdba groupadd -g 54328 asmoper groupadd -g 54329 asmadmin groupadd -g 54330 racdba /usr/sbin/useradd -u 54321 -g oinstall -G dba,oper,asmdba,asmadmin,racdba,backupdba,dgdba,kmdba oracle passwd oracle /usr/sbin/useradd -u 54331 -g oinstall -G dba,asmadmin,asmdba,asmoper,racdba grid passwd grid
2.2.3.3 作業系統建立軟體安裝目錄
vi /etc/oraInst.loc inventory_loc=/u01/app/oraInventory inst_group=oinstall # Create the Oracle Inventory Directory # To create the Oracle Inventory directory, enter the following commands as the root user: mkdir -p /u01/app/oraInventory chown -R grid:oinstall /u01/app/oraInventory chmod -R 775 /u01/app/oraInventory # Creating the Grid Infrastructure Base Directory mkdir -p /u01/app/grid chown -R grid:oinstall /u01/app/grid chmod -R 775 /u01/app/grid # Creating the Oracle Grid Infrastructure Home Directory mkdir -p /u01/app/19.0.0/grid chown -R grid:oinstall /u01/app/19.0.0/grid chmod -R 775 /u01/app/19.0.0/grid # Creating the Oracle Base Directory mkdir -p /u01/app/oracle mkdir -p /u01/app/oracle/cfgtoollogs # needed to ensure that dbca is able to run after the rdbms installation. chown -R oracle:oinstall /u01/app/oracle chmod -R 775 /u01/app/oracle # Creating the Oracle RDBMS Home Directory mkdir -p /u01/app/oracle/product/19.0.0/db_1 chown -R oracle:oinstall /u01/app/oracle/product/19.0.0/db_1 chmod -R 775 /u01/app/oracle/product/19.0.0/db_1
2.2.3.4 作業系統軟體安裝使用者環境變數(grid,oracle)
# grid,僅顯示環境變數增加部分 [grid@rac1:/home/grid]$cat .bash_profile export PS1="[`whoami`@`hostname`:"'$PWD]$' export JAVA_HOME=/usr/local/java; export JAVA_HOME export ORACLE_BASE=/u01/app/grid export ORACLE_HOME=/u01/app/19.0.0/grid export ORACLE_SID=+ASM1 export ORACLE_PATH=/u01/app/oracle/common/oracle/sql; export ORACLE_TERM=xterm; export NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"; export NLS_LANG=american_america.ZHS16GBK ; export TNS_ADMIN=$ORACLE_HOME/network/admin; export ORA_NLS11=$ORACLE_HOME/nls/data; export PATH=$ORACLE_HOME/bin:$PATH export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib export TEMP=/tmp export TMPDIR=/tmp umask=022 # oracle,僅顯示環境變數增加部分 [oracle@rac1:/home/oracle]$cat .bash_profile export PS1="[`whoami`@`hostname`:"'$PWD]$' export JAVA_HOME=/usr/local/java; export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/19.0.0/db_1 export ORACLE_SID=racdb1; export ORACLE_UNQNAME=racdb; export ORACLE_PATH=/u01/app/common/oracle/sql; export ORACLE_TERM=xterm; export NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"; export NLS_LANG=american_america.ZHS16GBK ; export TNS_ADMIN=$ORACLE_HOME/network/admin; export ORA_NLS11=$ORACLE_HOME/nls/data; export PATH=$ORACLE_HOME/bin:$PATH export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib export THREADS_FLAG=native; export TEMP=/tmp export TMPDIR=/tmp umask=022
2.2.3.5 作業系統使用者(oracle,grid)硬性限制最佳化
提升使用者硬性限制(Oracle、grid使用者預設的硬性限制不滿足GI安裝和配置) # limits.conf為PAM模板配置檔案;所以應先配置PAM,即配置如下: echo "session required pam_limits.so" >> /etc/pam.d/login # RAC未執行之前,無法實際測量vm.nr_hugepages大小。 # 原則:Number Hugepages * Hugepagesize = minimum Memlock < RAM cat /etc/security/limits.conf 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 134144000 oracle hard memlock 134144000 grid soft nproc 2047 grid hard nproc 16384 grid soft nofile 1024 grid hard nofile 65536 grid soft stack 10240 grid hard stack 32768 # NOTE:What is Memlock and How to Calculate the Values for Memlock (文件 ID 2511230.1) # shell開始檔案限制提升 cat /etc/profile if [ $USER = "oracle" ] || [ $USER = "grid" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi umask 022 fi
2.2.3.6 核心引數最佳化
# 虛擬機器記憶體為3G,設定kernel.shmmax=2G,SGA=1G and PGA=1G # kernel.shmmni該引數是系統共享記憶體段最大個數 # kernel.shmmax該引數是一個程式共享記憶體段最大尺度 # SHMMAX應略大於SGA尺寸 # kernel.shmall該引數是共享記憶體頁面的總數 # kernel.shmall大於shmmax/PAGE_SIZE cat /etc/sysctl.conf kernel.shmmni = 4096 kernel.shmmax = 2147483648 kernel.shmall = 524288 kernel.sem = 250 32000 100 128 fs.file-max = 7553600 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 # 安裝資料庫例項後算出並新增此引數 vm.nr_hugepages = 待計算 # 立即生效(root) /sbin/sysctl -p # NOTE: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/5/html/tuning_and_optimizing_red_hat_enterprise_linux_for_oracle_9i_and_10g_databases/index # NOTE: The latest information on kernel parameter settings for Linux can be found in My Oracle Support ExtNote:169706.1.#
2.2.3.7 記憶體最佳化
a)Oracle一直建議關閉Transparent HugePages來最佳化記憶體的使用, # 故關閉Transparent HugePages,增加transparent_hugepage=never cat /etc/default/grub GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)" GRUB_DEFAULT=saved GRUB_DISABLE_SUBMENU=true GRUB_TERMINAL_OUTPUT="console" GRUB_CMDLINE_LINUX="crashkernel=auto rhgb quiet numa=off transparent_hugepage=never" GRUB_DISABLE_RECOVERY="true" # 生成有效檔案 grub2-mkconfig -o /boot/grub2/grub.cfg # 重啟生效 reboot # 檢查是否生效,若輸出為[never]則生效 cat /sys/kernel/mm/transparent_hugepage/enabled always madvise [never] # never表示已禁用 grep AnonHugePages /proc/meminfo AnonHugePages: 0 kB <=表示禁用 b)共享記憶體最佳化 # Redhat 7.2以後systemd-logind service引入了新的功能,使用者登出時,刪除所有IPC物件 # 避免使用者中斷時系統刪除共享SGA記憶體, # 導致ASM和database instance down機,故設定RemoveIPC=no echo "RemoveIPC=no" >> /etc/systemd/logind.conf systemctl restart systemd-logind # ALERT: Setting RemoveIPC=yes on Redhat 7.2 and higher Crashes ASM and Database Instances as Well as Any Application That Uses a Shared Memory Segment (SHM) or Semaphores (SEM) (文件 ID 2081410.1) # 設定共享記憶體 # 透過/etc/fstab設定共享記憶體 [root@racdb1 ~]# cat /etc/fstab shm /dev/shm tmpfs defaults,size=3G 0
2.2.3.8 網路服務最佳化
停止avahi-daemon服務 #Avahi-daemon 可能會帶來網路問題和bug,尤其是對於RAC系統,Oracle建議直接關閉。 systemctl disable avahi-daemon.socket systemctl disable avahi-daemon.service 新增NOZEROCONF=yes引數 cat /etc/sysconfig/network NOZEROCONF=yes
2.2.3.9 作業系統使用/etc/hosts解析
# /etc/hosts解析地址如下 [oracle@racdb1 ~]$ cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 # PUBLIC-IP rac1 10.0.0.101 rac2 10.0.0.102 rac3 10.0.0.103 # VIP-IP rac1vip 10.0.0.104 rac2vip 10.0.0.105 rac3vip 10.0.0.106 # SCAN-IP racscanip 10.0.0.107 # PRIVATE-IP rac1priv 192.168.108.201 rac2priv 192.168.108.202 rac3priv 192.168.108.203 # 優先使用/etc/hosts,故files在dns前 [root@rac1 ~]# cat /etc/nsswitch.conf | grep hosts # hosts: db files nisplus nis dns hosts: files dns myhostname
2.2.3.10 禁用chronyd,採用ctss同步
redhat8關閉chronyd時間同步(redhat8已淘汰ntp) systemctl status chronyd systemctl stop chronyd systemctl status chronyd systemctl disable chronyd mv /etc/chrony.conf /etc/chrony.conf_20211220_bk
2.3 VirtualBox使用rac1為模版克隆rac2和rac3伺服器
注意: 修改ip地址與mac地址 修改oracle_sid
2.4 VirtualBox建立共享磁碟與許可權配置
共享配置結果如下: [root@rac1 ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 60.9G 0 disk ├─sda1 8:1 0 1G 0 part /boot └─sda2 8:2 0 59.9G 0 part ├─rhel-root 253:0 0 38.2G 0 lvm / ├─rhel-swap 253:1 0 3G 0 lvm [SWAP] └─rhel-home 253:2 0 18.7G 0 lvm /home sdb 8:16 0 2G 0 disk sdc 8:32 0 10.3G 0 disk sdd 8:48 0 2G 0 disk sde 8:64 0 2G 0 disk sdf 8:80 0 40.1G 0 disk udev繫結磁碟許可權 --裸盤作為asm磁碟 for i in b c d e f ; do echo "KERNEL==\"sd?\", SUBSYSTEM==\"block\", PROGRAM==\"/usr/lib/udev/scsi_id -g -u -d /dev/\$name\", RESULT==\"`/usr/lib/udev/scsi_id -g -u -d /dev/sd\$i`\", SYMLINK+=\"asm-disk$i\", OWNER=\"grid\", GROUP=\"asmadmin\", MODE=\"0660\"" >> /etc/udev/rules.d/99-oracle-asmdevices.rules done --啟動udev /sbin/udevadm trigger --type=devices --action=change --udevadm配置過載生效: udevadm control --reload udevadm trigger —展示繫結後結果 [root@rac1 ~]# ls -l /dev/asm* lrwxrwxrwx 1 root root 3 12月 23 04:35 /dev/asm-diskb -> sdb lrwxrwxrwx 1 root root 3 12月 23 04:35 /dev/asm-diskc -> sdc lrwxrwxrwx 1 root root 3 12月 23 04:35 /dev/asm-diskd -> sdd lrwxrwxrwx 1 root root 3 12月 23 04:35 /dev/asm-diske -> sde lrwxrwxrwx 1 root root 3 12月 23 04:35 /dev/asm-diskf -> sdf
3.安裝
3.1 gi安裝
3.1.1 節點RAC1上傳GI軟體包並解壓到$ORACLE_HOME下,僅節點rac1即可
$ORACLE_HOME=/u01/app/19.0.0/grid su - grid unzip -d $ORACLE_HOME /soft/LINUX.X64_193000_grid_home.zip # 因macos環境下安裝,下載的介質直接被解壓成目錄形式,僅把目錄下的內容上傳至$ORACLE_HOME下即可
3.1.2 所有節點安裝cvuqdisk
[root@rac1 ~]# rpm -ivh /u01/app/19.0.0/grid/cv/rpm/cvuqdisk-1.0.10-1.rpm Verifying... ################################# [100%] 準備中... ################################# [100%] 正在升級/安裝... 1:cvuqdisk-1.0.10-1 ################################# [100%] # 其他節點安裝過程省略
3.1.3 節點rac1升級OPatch,新版本直接覆蓋老版,僅節點rac1即可
[root@racdb1 soft]# chmod 775 p6880880_190000_Linux-x86-64.zip [grid@racdb1:/home/grid]$unzip -d /u01/app/19.0.0/grid/ /soft/p6880880_190000_Linux-x86-64.zip Archive: /soft/p6880880_190000_Linux-x86-64.zip inflating: /u01/app/19.0.0/grid/OPatch/emdpatch.pl replace /u01/app/19.0.0/grid/OPatch/oplan/oplan [y]es, [n]o, [A]ll, [N]one, [r]ename: A [grid@rac1:/home/grid]$/u01/app/19.0.0/grid/OPatch/opatch version OPatch Version: 12.2.0.1.28 OPatch succeeded.
3.1.4 配置grid互信
# 解壓gi軟體包後,使用sshUserSetup.sh工具進行互信配置 # root使用者節點1配置ssh互信,步驟如下: # 此指令碼適合多節點安裝優先使用 /u01/app/19.0.0/grid/oui/prov/resources/scripts/sshUserSetup.sh -user grid -hosts "rac1 rac2 rac3" -advanced -noPromptPassphrase # 檢驗互信,grid使用者 # 節點1, grid使用者執行檢驗操作 $ ssh rac1 date;ssh rac2 date;ssh rac2 date;ssh rac1priv date;ssh rac2priv date;ssh rac3priv date # 節點2, grid使用者執行檢驗操作 $ ssh rac1 date;ssh rac2 date;ssh rac2 date;ssh rac1priv date;ssh rac2priv date;ssh rac3priv date # 節點3, grid使用者執行檢驗操作 $ ssh rac1 date;ssh rac2 date;ssh rac2 date;ssh rac1priv date;ssh rac2priv date;ssh rac3priv date
3.1.5 gi安裝前檢查
export CV_ASSUME_DISTID=RHEL7 # 19c的gi base包在redhat8環境中,執行runcluvfy.sh是無結果的,所以設定export CV_ASSUME_DISTID=RHEL7是必須的 # grid使用者執行runcluvfy.sh檢驗系統環境(先解壓GI包,後才有runcluvfy.sh指令碼) [grid@rac1:/u01/app/19.0.0/grid]$./runcluvfy.sh stage -pre crsinst -n rac1,rac2,rac3 -verbose Verifying Physical Memory ...FAILED rac2: PRVF-7530 : Sufficient physical memory is not available on node "rac2" [Required physical memory = 8GB (8388608.0KB)] …… # 以上實體記憶體不足,測試環境忽略 Verifying Package: compat-libcap1-1.10 ...FAILED rac2: PRVF-7532 : Package "compat-libcap1" is missing on node "rac2" …… Verifying Package: gcc-c++-4.8.2 ...FAILED rac2: PRVF-7532 : Package "gcc-c++" is missing on node "rac2" …… Verifying Package: compat-libstdc++-33-3.2.3 (x86_64) ...FAILED rac2: PRVF-7532 : Package "compat-libstdc++-33(x86_64)" is missing on node "rac2" …… # 以上缺少rpm,安裝即可 Verifying Node Connectivity ...FAILED PRVG-1172 : The IP address "192.168.122.1" is on multiple interfaces "virbr0" on nodes "rac1,rac3,rac2" …… # virbr0網路不使用,故忽略 Verifying resolv.conf Integrity ...FAILED rac2: PRVG-2002 : Encountered error in copying file "/etc/resolv.conf" from node "rac2" to node "rac1" protocol error: filename does not match request …… Verifying DNS/NIS name service ...FAILED rac2: PRVG-2002 : Encountered error in copying file "/etc/nsswitch.conf" from node "rac2" to node "rac1" protocol error: filename does not match request …… Verifying User Equivalence ...FAILED rac2: PRVF-5311 : File "/tmp/rac2.getFileInfo57728.out" either does not exist or is not accessible on node "rac2". …… # 以上均為openssh升級OpenSSH_8.0p1後問題,scp發出的命令若是雙引號中單有單引號則觸發bug # 解決辦法:參考(Doc ID 2555697.1)
3.1.6 圖形化安裝gi並應用RU
# 上傳RU軟體包並解壓 hewenyu@hewenyudeMacBook-Pro Downloads % scp p31750108_190000_Linux-x86-64.zip grid@192.168.56.201:/home/grid [grid@rac1:/home/grid]$unzip p31750108_190000_Linux-x86-64.zip # grid使用者圖形化安裝gi並應用RU [grid@rac1:/home/grid]$unzip p31750108_190000_Linux-x86-64.zip [grid@rac1:/home/grid]$chmod -R a+x 31750108/ [grid@rac1:/home/grid]$export CV_ASSUME_DISTID=RHEL7 [grid@rac1:/u01/app/19.0.0/grid]$./gridSetup.sh -applyPSU /home/grid/31750108/ # gridSetup.sh -applyPSU是12.2.0.1的安裝gi並應用RU的方法,我在19c也執行成功了,顯然是向下相容了12.2.0.1版本。更多請參考(Doc ID 1410202.1) # 圖形化安裝省略 # 節點1執行root.sh指令碼,共計19步。(所有節點均需執行) [root@rac1 ~]# /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/rac1/crsconfig/rootcrs_rac1_2021-12-27_05-48-17PM.log 2021/12/27 17:48:32 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'. 2021/12/27 17:48:32 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'. 2021/12/27 17:48:32 CLSRSC-363: User ignored prerequisites during installation 2021/12/27 17:48:32 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'. 2021/12/27 17:48:35 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'. 2021/12/27 17:48:39 CLSRSC-594: Executing installation step 5 of 19: 'SetupOSD'. 2021/12/27 17:48:40 CLSRSC-594: Executing installation step 6 of 19: 'CheckCRSConfig'. 2021/12/27 17:48:41 CLSRSC-594: Executing installation step 7 of 19: 'SetupLocalGPNP'. 2021/12/27 17:49:02 CLSRSC-594: Executing installation step 8 of 19: 'CreateRootCert'. 2021/12/27 17:49:18 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'. 2021/12/27 17:49:50 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'. 2021/12/27 17:49:50 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'. 2021/12/27 17:50:00 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'. 2021/12/27 17:50:00 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service' 2021/12/27 17:50:03 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector. 2021/12/27 17:50:27 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'. 2021/12/27 17:50:27 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'. 2021/12/27 17:50:40 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'. 2021/12/27 17:50:54 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'. Redirecting to /bin/systemctl restart rsyslog.service 已成功建立並啟動 ASM。 [DBT-30001] 已成功建立磁碟組。有關詳細資訊, 請檢視 /u01/app/grid/cfgtoollogs/asmca/asmca-211227下午055129.log。 2021/12/27 17:52:31 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 6087f66c75654faabf89f43fa89ddfc9. Successful addition of voting disk d6bf2d8b2eff4f60bf36d431d224a73c. Successful addition of voting disk dc1625ac5a304f3ebf649efd5ea673ed. 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 6087f66c75654faabf89f43fa89ddfc9 (/dev/asm-diskb) [OCR] 2. ONLINE d6bf2d8b2eff4f60bf36d431d224a73c (/dev/asm-diskd) [OCR] 3. ONLINE dc1625ac5a304f3ebf649efd5ea673ed (/dev/asm-diske) [OCR] Located 3 voting disk(s). 2021/12/27 17:54:12 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'. 2021/12/27 17:55:27 CLSRSC-343: Successfully started Oracle Clusterware stack 2021/12/27 17:55:27 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'. 2021/12/27 17:57:20 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'. 2021/12/27 17:57:58 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded # rac2節點執行指令碼結果如下 [root@rac2 ~]# /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/rac2/crsconfig/rootcrs_rac2_2021-12-27_06-00-23PM.log 2021/12/27 18:00:33 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'. 2021/12/27 18:00:33 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'. 2021/12/27 18:00:34 CLSRSC-363: User ignored prerequisites during installation 2021/12/27 18:00:34 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'. 2021/12/27 18:00:39 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'. 2021/12/27 18:00:39 CLSRSC-594: Executing installation step 5 of 19: 'SetupOSD'. 2021/12/27 18:00:39 CLSRSC-594: Executing installation step 6 of 19: 'CheckCRSConfig'. 2021/12/27 18:00:43 CLSRSC-594: Executing installation step 7 of 19: 'SetupLocalGPNP'. 2021/12/27 18:00:49 CLSRSC-594: Executing installation step 8 of 19: 'CreateRootCert'. 2021/12/27 18:00:50 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'. 2021/12/27 18:01:29 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'. 2021/12/27 18:01:29 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'. 2021/12/27 18:01:35 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'. 2021/12/27 18:01:35 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service' 2021/12/27 18:02:22 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'. 2021/12/27 18:02:23 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'. 2021/12/27 18:02:33 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'. 2021/12/27 18:02:41 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'. Redirecting to /bin/systemctl restart rsyslog.service 2021/12/27 18:03:15 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'. 2021/12/27 18:04:46 CLSRSC-343: Successfully started Oracle Clusterware stack 2021/12/27 18:04:47 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'. 2021/12/27 18:05:53 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'. 2021/12/27 18:06:00 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector. 2021/12/27 18:06:25 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded # 節點3執行指令碼過程與節點2相同,故省略如下: 2021/12/27 18:14:35 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'. 2021/12/27 18:15:22 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded
3.1.7 gi安裝成功後,叢集服務與RU升級檢查
[grid@rac3:/home/grid]$crsctl stat res -t -------------------------------------------------------------------------------- Name Target State Server State details -------------------------------------------------------------------------------- Local Resources -------------------------------------------------------------------------------- ora.LISTENER.lsnr ONLINE ONLINE rac1 STABLE ONLINE ONLINE rac2 STABLE ONLINE ONLINE rac3 STABLE ora.chad ONLINE ONLINE rac1 STABLE ONLINE ONLINE rac2 STABLE ONLINE ONLINE rac3 STABLE ora.net1.network ONLINE ONLINE rac1 STABLE ONLINE ONLINE rac2 STABLE ONLINE ONLINE rac3 STABLE ora.ons ONLINE ONLINE rac1 STABLE ONLINE ONLINE rac2 STABLE ONLINE ONLINE rac3 STABLE -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup) 1 ONLINE ONLINE rac1 STABLE 2 ONLINE ONLINE rac2 STABLE 3 ONLINE ONLINE rac3 STABLE ora.LISTENER_SCAN1.lsnr 1 ONLINE ONLINE rac1 STABLE ora.OCR.dg(ora.asmgroup) 1 ONLINE ONLINE rac1 STABLE 2 ONLINE ONLINE rac2 STABLE 3 ONLINE ONLINE rac3 STABLE ora.asm(ora.asmgroup) 1 ONLINE ONLINE rac1 Started,STABLE 2 ONLINE ONLINE rac2 Started,STABLE 3 ONLINE ONLINE rac3 Started,STABLE ora.asmnet1.asmnetwork(ora.asmgroup) 1 ONLINE ONLINE rac1 STABLE 2 ONLINE ONLINE rac2 STABLE 3 ONLINE ONLINE rac3 STABLE ora.cvu 1 ONLINE ONLINE rac1 STABLE ora.qosmserver 1 ONLINE ONLINE rac1 STABLE ora.rac1.vip 1 ONLINE ONLINE rac1 STABLE ora.rac2.vip 1 ONLINE ONLINE rac2 STABLE ora.rac3.vip 1 ONLINE ONLINE rac3 STABLE ora.scan1.vip 1 ONLINE ONLINE rac1 STABLE -------------------------------------------------------------------------------- # RU升級檢驗 [grid@rac3:/u01/app/19.0.0/grid/OPatch]$./opatch lspatches 31780966;TOMCAT RELEASE UPDATE 19.0.0.0.0 (31780966) 31773437;ACFS RELEASE UPDATE 19.9.0.0.0 (31773437) 31772784;OCW RELEASE UPDATE 19.9.0.0.0 (31772784) 31771877;Database Release Update : 19.9.0.0.201020 (31771877) OPatch succeeded.
3.2 db軟體安裝
3.2.1 節點RAC1上傳rdbms軟體包並解壓到$ORACLE_HOME下,僅節點rac1即可
hewenyu@hewenyudeMacBook-Pro 19c-db % scp -r * oracle@192.168.56.201:/u01/app/oracle/product/19.0.0/db_1
3.2.2 節點rac1升級OPatch,新版本直接覆蓋老版,僅節點rac1即可
# 上傳軟體直接覆蓋$ORACLE_HOME下的OPatch目錄 hewenyu@hewenyudeMacBook-Pro Downloads % scp p6880880_190000_Linux-x86-64.zip oracle@192.168.56.201:/home/oracle [oracle@rac1:/home/oracle]$unzip -d /u01/app/oracle/product/19.0.0/db_1 p6880880_190000_Linux-x86-64.zip Archive: p6880880_190000_Linux-x86-64.zip replace /u01/app/oracle/product/19.0.0/db_1/OPatch/README.txt? [y]es, [n]o, [A]ll, [N]one, [r]ename: A …… # 檢驗OPatch版本 [oracle@rac1:/u01/app/oracle/product/19.0.0/db_1/OPatch]$./opatch version OPatch Version: 12.2.0.1.28 OPatch succeeded.
3.2.3 oracle使用者互信配置
# 解壓rdbms軟體包後,使用sshUserSetup.sh工具進行互信配置 # root使用者節點1配置ssh互信,步驟如下: # 此指令碼適合多節點安裝優先使用 /u01/app/oracle/product/19.0.0/db_1/oui/prov/resources/scripts/sshUserSetup.sh -user oracle -hosts "rac1 rac2 rac3" -advanced -noPromptPassphrase # 檢驗互信,oracle使用者 # 節點1, oracle使用者執行檢驗操作 $ ssh rac1 date;ssh rac2 date;ssh rac2 date;ssh rac1priv date;ssh rac2priv date;ssh rac3priv date # 節點2, oracle使用者執行檢驗操作 $ ssh rac1 date;ssh rac2 date;ssh rac2 date;ssh rac1priv date;ssh rac2priv date;ssh rac3priv date # 節點3, oracle使用者執行檢驗操作 $ ssh rac1 date;ssh rac2 date;ssh rac2 date;ssh rac1priv date;ssh rac2priv date;ssh rac3priv date
3.2.4 圖形化安裝db軟體並應用RU
oracle使用者圖形化安裝 # 上傳軟體至/home/oracle,解壓並修改許可權 hewenyu@hewenyudeMacBook-Pro Downloads % scp p31771877_190000_Linux-x86-64.zip oracle@192.168.56.201:/home/oracle [oracle@rac1:/home/oracle]$unzip p31771877_190000_Linux-x86-64.zip [oracle@rac1:/home/oracle]$chmod -R a+x 31771877/ [oracle@rac1:/home/oracle]$export CV_ASSUME_DISTID=RHEL7 [oracle@rac1:/u01/app/oracle/product/19.0.0/db_1]$./runInstaller -applyPSU /home/oracle/31771877/ # runInstaller -applyPSU是12.2.0.1的安裝rdbms並應用RU的方法,我在19c也執行成功了,顯然是向下相容了12.2.0.1版本。更多請參考(Doc ID 1410202.1) # 19c請參照:GI_HOME/gridSetup.sh -applyRU <downloaded patch location> root使用者節點2和3執行orainstRoot.sh [root@rac2 ~]# /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. # 節點3省略,輸出結果同節點2 root使用者節點1和節點2和節點3執行root.sh [root@rac1 opt]# /u01/app/oracle/product/19.0.0/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.0.0/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. # 節點2和3省略,輸出結果同節點1 root執行root.sh指令碼成功(所有節點) 3.2.5 rdbms安裝成功,RU升級檢查 [oracle@rac3:/u01/app/oracle/product/19.0.0/db_1/OPatch]$./opatch lspatches 31771877;Database Release Update : 19.9.0.0.201020 (31771877) <=ru已安裝 29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399) OPatch succeeded.
3.3 asmca建立磁碟組
# grid使用者圖形化安裝 asmca [grid@rac3:/home/grid]$asmcmd ASMCMD> lsdg State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name MOUNTED EXTERN N 512 512 4096 1048576 10582 10435 0 10435 0 N ARCH/ MOUNTED EXTERN N 512 512 4096 1048576 41044 40897 0 40897 0 N DATA/ MOUNTED NORMAL N 512 512 4096 1048576 6144 5266 2048 1609 0 Y OCR/
3.4 dbca建立database
# oracle使用者圖形化安裝 3.4.1 dbca建立庫前,需要解決INS-06006問題 # 為了解決INS-06006問題,可參考mos 2555697.1 # 安裝前修改(root使用者所有節點) mv /usr/bin/scp /usr/bin/scp.orig echo "/usr/bin/scp.orig -T \$*" >/usr/bin/scp chmod 555 /usr/bin/scp # 檢查後,安裝前需修復scp。因為安裝過程中需要把節點1的軟體copy到其他節點,需用scp mv /usr/bin/scp.orig /usr/bin/scp 3.4.2 dbca建立庫,並設定CV_ASSUME_DISTID=RHEL7 export CV_ASSUME_DISTID=RHEL7 dbca 3.4.3 dbca建立庫完成後,檢視crs資源狀態 [grid@rac1:/home/grid]$crsctl stat res -t -------------------------------------------------------------------------------- Name Target State Server State details -------------------------------------------------------------------------------- Local Resources -------------------------------------------------------------------------------- ora.LISTENER.lsnr ONLINE ONLINE rac1 STABLE ONLINE ONLINE rac2 STABLE ONLINE ONLINE rac3 STABLE ora.chad ONLINE ONLINE rac1 STABLE ONLINE ONLINE rac2 STABLE ONLINE ONLINE rac3 STABLE ora.net1.network ONLINE ONLINE rac1 STABLE ONLINE ONLINE rac2 STABLE ONLINE ONLINE rac3 STABLE ora.ons ONLINE ONLINE rac1 STABLE ONLINE ONLINE rac2 STABLE ONLINE ONLINE rac3 STABLE -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- ora.ARCH.dg(ora.asmgroup) 1 ONLINE ONLINE rac1 STABLE 2 ONLINE ONLINE rac2 STABLE 3 ONLINE ONLINE rac3 STABLE ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup) 1 ONLINE ONLINE rac1 STABLE 2 ONLINE ONLINE rac2 STABLE 3 ONLINE ONLINE rac3 STABLE ora.DATA.dg(ora.asmgroup) 1 ONLINE ONLINE rac1 STABLE 2 ONLINE ONLINE rac2 STABLE 3 ONLINE ONLINE rac3 STABLE ora.LISTENER_SCAN1.lsnr 1 ONLINE ONLINE rac3 STABLE ora.OCR.dg(ora.asmgroup) 1 ONLINE ONLINE rac1 STABLE 2 ONLINE ONLINE rac2 STABLE 3 ONLINE ONLINE rac3 STABLE ora.asm(ora.asmgroup) 1 ONLINE ONLINE rac1 Started,STABLE 2 ONLINE ONLINE rac2 Started,STABLE 3 ONLINE ONLINE rac3 Started,STABLE ora.asmnet1.asmnetwork(ora.asmgroup) 1 ONLINE ONLINE rac1 STABLE 2 ONLINE ONLINE rac2 STABLE 3 ONLINE ONLINE rac3 STABLE ora.cvu 1 ONLINE ONLINE rac3 STABLE ora.qosmserver 1 ONLINE ONLINE rac3 STABLE ora.rac1.vip 1 ONLINE ONLINE rac1 STABLE ora.rac2.vip 1 ONLINE ONLINE rac2 STABLE ora.rac3.vip 1 ONLINE ONLINE rac3 STABLE ora.racdb.db 1 ONLINE ONLINE rac1 Open,HOME=/u01/app/o racle/product/19.0.0 /db_1,STABLE 2 ONLINE ONLINE rac2 Open,HOME=/u01/app/o racle/product/19.0.0 /db_1,STABLE 3 ONLINE ONLINE rac3 Open,HOME=/u01/app/o racle/product/19.0.0 /db_1,STABLE ora.scan1.vip 1 ONLINE ONLINE rac3 STABLE -------------------------------------------------------------------------------- 安裝完成 3.4.4 不必執行,修改後的SQL檔案載入到資料庫中 #(因我們是先安裝軟體後建立database的所以省略這步。反之,若生產database先有資料後升級patch則必須將修改後的sql載入到資料庫中) # 將修改後的SQL檔案載入到資料庫中 # 安裝補丁之後,還需要將有變化的SQL載入到資料庫中,這裡可以直接執行Datapatch工具將這些修改的SQL重新載入到資料庫中,RAC環境,只需要在一個節點執行就可以了 datapatch -verbose執行與檢查 [oracle@racdb2:/u01/app/oracle/product/19.0.0/db_1/OPatch]$./datapatch -verbose col action for a15 col status for a15 select PATCH_ID,PATCH_TYPE,ACTION,STATUS,TARGET_VERSION from dba_registry_sqlpatch; select PATCH_ID,PATCH_TYPE,ACTION,STATUS,TARGET_VERSION from dba_registry_sqlpatch; PATCH_ID PATCH_TYPE ACTION STATUS TARGET_VERSION ---------- -------------------- --------------- --------------- ------------------------------ 31771877 RU APPLY WITH ERRORS 19.9.0.0.0 set lines 500 pages 500 col description for a75 col action_time for a35 col action for a10 col comments for a50 col VERSION for a15 col NAMESPACE for a20 col BUNDLE_SERIES for a20 select action_time,action,NAMESPACE,VERSION,comments,BUNDLE_SERIES from registry$history; ACTION_TIME ACTION NAMESPACE VERSION COMMENTS BUNDLE_SERIES ----------------------------------- ---------- -------------------- --------------- -------------------------------------------------- -------------------- BOOTSTRAP DATAPATCH 19 RDBMS_19.9.0.0.0DBRU_LINUX.X64_200930 28-DEC-21 11.09.46.672145 PM RU_APPLY SERVER 19.0.0.0.0 Patch applied from 19.3.0.0.0 to 19.9.0.0.0: Relea se_Update - 20093018324 3.4.5 關閉開機自啟動has # 生產環境可啟動開機自啟 has,增加系統的強壯性。本文為測試環境,所以減少資料浪費,故關閉開機自啟動has /u01/app/19.0.0/grid/bin/crsctl disable has
4.附表
4.1 安裝gi/db並應用patch
解決:Doc ID 1410202.1 使用方法參考 # Install/Upgrade the 18c GI and apply the patch to the Gold Image at the same time by running the following as the Grid user: To apply only Release Updates: $GI_HOME/gridSetup.sh -applyRU <downloaded patch location> To apply only Non-RU patches: $GI_HOME/gridSetup.sh -applyRUR <downloaded patch location> To apply Release Updates and Non-RU patches in one command: $GI_HOME/gridSetup.sh -applyRU <downloaded patch location> -applyOneOffs <downloaded atch location> # Install/Upgrade the 12.2.0.1 Apply the patch to the Gold Image by running the following as the Grid user: To apply only Release Updates: $GI_HOME/gridSetup.sh -applyPSU <downloaded patch location> To apply only Non-RU patches: $GI_HOME/gridSetup.sh -applyOneOffs <downloaded patch location> To apply Release Updates and Non-RU patches in one command: $GI_HOME/gridSetup.sh -applyPSU <downloaded patch location> -applyOneOffs <downloaded patch location>
4.2 runcluvfy.sh報錯PRVG-2002 and PRVF-5311解決辦法參考mos 2555697.1
# 以上均為openssh升級OpenSSH_8.0p1後問題,scp發出的命令若是雙引號中單有單引號則觸發bug # 解決辦法:參考(Doc ID 2555697.1) 原因分析: [root@rac3 tmp]# ssh -V OpenSSH_8.0p1, OpenSSL 1.1.1g FIPS 21 Apr 2020 [root@rac3 tmp]# scp -p rac3:"'/tmp/text.txt'" /tmp/test.txt root@rac3's password: protocol error: filename does not match request # 雙引號中,有單引號觸發bug [root@rac3 tmp]# scp -p rac3:"/tmp/text.txt" /tmp/test.txt root@rac3's password: text.txt # 雙引號中,無單引號則正常 [root@rac3 tmp]# scp -T -p rac3:"'/tmp/text.txt'" /tmp/test.txt root@rac3's password: text.txt # 也可以透過-T來避過bug 解決辦法: # 安裝前修改(所有節點) mv /usr/bin/scp /usr/bin/scp.orig echo "/usr/bin/scp.orig -T \$*" >/usr/bin/scp chmod 555 /usr/bin/scp # 檢查後,安裝前需修復scp。因為安裝過程中需要把節點1的軟體copy到其他節點,需用scp mv /usr/bin/scp.orig /usr/bin/scp
4.3 為了解決INS-06006問題,可參考mos 2555697.1
# 安裝前修改(所有節點) [root@rac1 ~]# mv /usr/bin/scp /usr/bin/scp.orig [root@rac1 ~]# echo "/usr/bin/scp.orig -T \$*" >/usr/bin/scp [root@rac1 ~]# chmod 555 /usr/bin/scp # 檢查後,安裝前需修復scp。因為安裝過程中需要把節點1的軟體copy到其他節點,需用scp [root@rac1 ~]# mv /usr/bin/scp.orig /usr/bin/scp
4.4 yum配置方法
centos的yum代替redhat的yum的配置方法: 解除安裝redhat的yum rpm -qa|grep yum|xargs rpm -e --nodeps 下載centos的yum wget wget wget 安裝centos的yum [root@rac1 yum.repos.d]# rpm -ivh --force --nodeps yum-4.7.0-4.el8.noarch.rpm [root@rac1 yum.repos.d]# rpm -ivh --force --nodeps yum-utils-4.0.21-3.el8.noarch.rpm [root@rac1 yum.repos.d]# rpm -ivh --force --nodeps libcap-ng-python3-0.7.11-1.el8.x86_64.rpm 配置yum wget -O /etc/yum.repos.d/redhat.repo 清yum快取,重建yum資料庫 yum clean all yum makecache yum repolist
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26442936/viewspace-2871035/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Disable Database Audit In Oracle 19c RAC-20220111DatabaseOracle
- 【UP_ORACLE】Oracle 19c之從19.3升級到19.9Oracle
- Oracle 19c Concepts(01):Introduction to Oracle DatabaseOracleDatabase
- Oracle 19c Concepts(13):Oracle Database InstanceOracleDatabase
- Oracle 19c Database Management ToolsOracleDatabase
- Converting Oracle Database from Linux to Windows using RMANOracleDatabaseLinuxWindows
- Sqlcl 連線Oracle DataBase 19cSQLOracleDatabase
- 1 Oracle Database 19c 新特性OracleDatabase
- G009-ORACLE-ASK Using In-Database ArchivingOracleDatabase
- Oracle:Oracle RAC 11.2.0.4 升級為 19cOracle
- Oracle 19c Concepts(00):Changes in This Release for Oracle Database ConceptsOracleDatabase
- Oracle 19c RAC INS-40724Oracle
- Oracle 19c Concepts(18):Concepts for Database AdministratorsOracleDatabase
- Oracle 19c Concepts(19):Concepts for Database DevelopersOracleDatabaseDeveloper
- Oracle Database 19c安裝Sample SchemasOracleDatabase
- redhat7.6安裝Oracle11G RACRedhatOracle
- G003-ORACLE-INS-RAC-01 ORACLE 19C RAC Ins ON OEL 7.8Oracle
- 【BUILD_ORACLE】Oracle 19c RAC搭建(六)建立RAC資料庫UIOracle資料庫
- Oracle:Redhat 7 + Oracle RAC 11g 安裝 bug 總結OracleRedhat
- Overview of Oracle Flex ASM In Oracle 19c RAC-20220111ViewOracleFlexASM
- Oracle Linux 7.1 silent install 19C RACOracleLinux
- How To Deal With Split Brain In Oracle 19c RacAIOracle
- Disable Tfa In Oracle 19c RAC-20220112Oracle
- Oracle 19c Concepts(17):Topics for Database Administrators and DevelopersOracleDatabaseDeveloper
- Oracle Database 19c中的自動索引OracleDatabase索引
- Oracle 19c Database Configure the HTTPS Port for EM ExpressOracleDatabaseHTTPExpress
- CRS Resource Introduction In Oracle 19c RAC-20220125Oracle
- Rename or Move a datafile In Oracle 19c RAC-20220117Oracle
- Oracle 19C RAC腦裂問題分析Oracle
- RedHat 7.7 平臺安裝19c(19.3) RAC 詳細操作過程Redhat
- 通過ORACLE VM virtualbox環境安裝oracle 11G RAC(ASM)OracleASM
- 【TUNE_ORACLE】Oracle 19c RAC搭建番外篇之RAC引數配置參考(四)Oracle
- 【TUNE_ORACLE】Oracle 19c RAC搭建番外篇之RAC引數配置參考(五)Oracle
- 【TUNE_ORACLE】Oracle 19c RAC搭建番外篇之RAC引數配置參考(三)Oracle
- 【TUNE_ORACLE】Oracle 19c RAC搭建番外篇之RAC引數配置參考(二)Oracle
- 【TUNE_ORACLE】Oracle 19c RAC搭建番外篇之RAC引數配置參考(一)Oracle
- oracle aix平臺19c rac互信不通案例OracleAI
- Oracle 19c RAC on Linux 7.6安裝手冊OracleLinux