安装前准备 :
#####################################################################
##第一部分 需调整处置
#####################################################################
1. 虚拟机调整
##1.1设置虚拟磁盘非独占模式 vmx文件添加如下,物理机忽略此步骤
scsi1.sharedBus = "virtual"
disk.locking = "false"
diskLib.dataCacheMaxSize = "0"
diskLib.dataCacheMaxReadAheadSize = "0"
diskLib.dataCacheMinReadAheadSize = "0"
diskLib.dataCachePageSize = "4096"
diskLib.maxUnsyncedWrites = "0"
disk.EnableUUID = "TRUE"
##1.2 添加设备
添加存储(步骤略)
虚拟机添加独立"永|久"存储存储设备 、或存储服务器划分共享存储(物理磁盘多路径聚合)
两组网卡public网络、private网络 (步骤略)
添加CD/DVD设备 (步骤略) 并挂载好本地ISO光盘 或者将本地镜像挂载并mount
例: mount -t iso9660 -o loop /tmp/xxxx.iso /mnt
##重新启动如遭遇 磁盘启动顺序问题,进入"打开电源时进入固件"BIOS修改启动顺序
2. 网络配置
redhat6还不支持 nmcli
##查看网络设备的名字
ip addr show
ip link show
cd /etc/sysconfig/network-scripts/
cp ifcfg-eth0 ifcfg-eth1
sed -i -e 's/eth0/eth1/g' -e 's/192.168.11/192.168.201/g' ifcfg-eth1
service network restart
##重启生效
service network restart
#验证连通性
ping 192.168.201.1 -c 4 #private
ping 192.168.11.2 -c 4 #public
3 配置zypper仓库
##
mount /dev/cdrom /mnt
mkdir -p /etc/yum.repos.d/backup
mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/backup/
##config the yum
cd /etc/yum.repos.d/
echo "
[base]
name=iso
baseurl=file:///mnt
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
" >/etc/yum.repos.d/RHEL-ISO.repo
yum clean all
yum list|grep ftp
4 安装依赖
#11g安装
yum install -y binutils-2.* compat-libstdc++-33* elfutils-libelf-0.* elfutils-libelf-devel-* gcc-4.* gcc-c++-4.* glibc-2.* glibc-common-2.* glibc-devel-2.* glibc-headers-2.* ksh-2* libaio-0.* libaio-devel-0.* libgcc-4.* libstdc++-4.* libstdc++-devel-4.* make-3.* sysstat-7.* unixODBC-2.* unixODBC-devel-2.* pdksh*
yum install -y compat-libstdc++-33-3.2.3-69.el6.x86_64
5 修改主机名 配置hosts文件
hostnamectl set-hostname racnode1 ##201
hostnamectl set-hostname racnode2 ##202
#修改/etc/hosts
echo "
#Public IP(公司内部访问,非外网)
192.168.11.201 racnode1
192.168.11.202 racnode2
#Private IP(用于节点间心跳网络)
192.168.201.201 racnode1-priv
192.168.201.202 racnode2-priv
#Virtual IP(提供客户端访问,漂移)
192.168.11.203 racnode1-vip
192.168.11.204 racnode2-vip
#SCAN IP(提供客户端访问,均衡)
192.168.11.205 racnode-scan
##可多个
" >> /etc/hosts
6. 时间同步
有本地时间服务器
/usr/sbin/ntpdate -u 192.168.11.1 && hwclock -w
或
chronyd -q 'server ntp.ntsc.ac.cn iburst' #时间服务器可以自行选择,这里选择国家授时中心时间
chronyd -q 'server ntp1.aliyun.com iburst' #阿里云
无本地时间服务器 自建(略)
7 多路径
##############配置激活多路径:
yum install -y device-mapper*
mpathconf --enable --with_multipathd y
RAC1 RAC2均执行:
ocr_wwid=`scsi_id --whitelisted --replace-whitespace --device=/dev/sdb`
data_wwid=`scsi_id -g -u /dev/sdc`
配置multipath.conf
mv /etc/multipath.conf /etc/multipath.conf.bak
cat <<EOF>/etc/multipath.conf
defaults {
user_friendly_names yes
}
blacklist {
devnode "^sda"
devnode "^sdd"
}
multipaths {
multipath {
wwid "${ocr_wwid}"
alias asm_ocr
}
multipath {
wwid "${data_wwid}"
alias asm_data
}
}
EOF
#刷新 查看
multipath -F
multipath -v2
multipath -ll
##############配置UDEV绑定:
[ -f /dev/mapper/udev_info ] && rm -rf /dev/mapper/udev_info
[ -f /etc/udev/rules.d/99-oracle-asmdevices.rules ] && rm -rf /etc/udev/rules.d/99-oracle-asmdevices.rules
##生成 udev_info 99-oracle-asmdevices.rules
cd /dev/mapper
for i in asm_*; do
printf "%s %s\n" "$i" "$(udevadm info --query=all --name=/dev/mapper/"$i" | grep -i dm_uuid)" >>/dev/mapper/udev_info
done
##调整为
#redhat6.5
vi /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u --device=/dev/$name", RESULT=="36000c299228839f9cd66b3fc7dbb0534", NAME="asm_ocr", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u --device=/dev/$name", RESULT=="36000c29c30b395439e507b24c8571162", NAME="asm_data", OWNER="grid", GROUP="asmadmin", MODE="0660"
或
echo "
KERNEL==\"sd*\", BUS==\"scsi\", PROGRAM==\"/sbin/scsi_id -g -u --device=/dev/\$name\", RESULT==\"${ocr_wwid}\", NAME=\"asm_ocr\", OWNER=\"grid\", GROUP=\"asmadmin\", MODE=\"0660\"
KERNEL==\"sd*\", BUS==\"scsi\", PROGRAM==\"/sbin/scsi_id -g -u --device=/dev/\$name\", RESULT==\"${data_wwid}\", NAME=\"asm_data\", OWNER=\"grid\", GROUP=\"asmadmin\", MODE=\"0660\"
" > /etc/udev/rules.d/99-oracle-asmdevices.rules
##查看文件内容
cat /dev/mapper/udev_info
cat /etc/udev/rules.d/99-oracle-asmdevices.rules
##重载udev
udevadm control --reload-rules
sleep 2
udevadm trigger --type=devices
##查看udev绑定
sleep 1
ll /dev/asm*
#################################################################################################################################################################
##安装前准备: 此部分完整拷贝执行
##8. 防火墙配置(rac01&rac02)
##############关闭防火墙
## shutdown the firewall
service iptables stop
iptables -F
xxxconfig iptables off ##xxx修改为"c|h|k" 去掉"|" 涉及敏感词
xxxconfig --list iptables ##xxx修改为"c|h|k" 去掉"|"
##9.selinux 配置(rac01&rac02)
##############selinux 配置(rac01&rac02)
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
setenforce 0
getenforce
cat /etc/selinux/config
##11.avahi-daemon 配置禁用(rac01&rac02)
yum install -y avahi*
service avahi-daemon stop #/etc/init.d/avahi-daemon
xxxconfig avahi-daemon off ##xxx修改为"c|h|k" 去掉"|" 涉及敏感词
xxxconfig --list avahi-daemon ##xxx修改为"c|h|k" 去掉"|" 涉及敏感词
pgrep -f avahi-daemon | awk '{print "kill -9 "$2}'
##配置 NOZEROCONF:
mv /etc/sysconfig/network /etc/sysconfig/network.bak
cat <<EOF>>/etc/sysconfig/network
NOZEROCONF=yes
EOF
##12.系统参数配置
cp /etc/sysctl.conf /etc/sysctl.conf.bak
##一键配置 获取OS资源信息
memTotal=$(grep MemTotal /proc/meminfo | awk '{print $2}')
totalMemory=$((memTotal / 2048))
shmall=$((memTotal / 4))
if [ $shmall -lt 2097152 ]; then
shmall=2097152
fi
shmmax=$((memTotal * 1024 - 1))
if [ "$shmmax" -lt 4294967295 ]; then
shmmax=4294967295
fi
###配置系统参数
cat <<EOF>>/etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = $shmall
kernel.shmmax = $shmmax
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
##rp_filter 反向路径过滤 必须设置,否则两个节点的db实例无法交流,其中一个节点被踢出集群
net.ipv4.conf.eth0.rp_filter = 1 ##网卡根据 nmcli c 真实网卡调整
net.ipv4.conf.eth1.rp_filter = 2 ##~~
EOF
##参数 生效
cat /etc/sysctl.conf
sysctl -p
##13.系统资源限制配置(rac01&rac02)
###配置limits.conf:
cp /etc/security/limits.conf /etc/security/limits.conf.bak
cat <<EOF>>/etc/security/limits.conf
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768
oracle soft nproc 2047
oracle hard nproc 16384
oracle hard memlock 134217728
oracle soft memlock 134217728
grid soft nofile 1024
grid hard nofile 65536
grid soft stack 10240
grid hard stack 32768
grid soft nproc 2047
grid hard nproc 16384
EOF
###配置pam.d/login:
cp /etc/pam.d/login /etc/pam.d/login.bak
cat <<EOF>>/etc/pam.d/login
session required pam_limits.so
session required /lib64/security/pam_limits.so
EOF
##14、用户及组、目录创建(rac01&rac02)
###创建安装 Oracle 数据库所需的用户、组以及安装目录:(id如有重复 去掉 -g id )
/usr/sbin/groupadd -g 54321 oinstall
/usr/sbin/groupadd -g 54322 dba
/usr/sbin/groupadd -g 54323 oper
/usr/sbin/groupadd -g 54324 backupdba
/usr/sbin/groupadd -g 54325 dgdba
/usr/sbin/groupadd -g 54326 kmdba
/usr/sbin/groupadd -g 54327 asmdba
/usr/sbin/groupadd -g 54328 asmoper
/usr/sbin/groupadd -g 54329 asmadmin
/usr/sbin/groupadd -g 54330 racdba
###grid/oracle 用户创建:
/usr/sbin/useradd -u 54321 -g oinstall -G asmdba,dba,backupdba,dgdba,kmdba,racdba,oper -c "db user " oracle
/usr/sbin/useradd -u 54322 -g oinstall -G asmadmin,asmdba,asmoper,dba,racdba,oper -c "grid user " grid
mkdir -p ~oracle ~grid
chown -R oracle.oinstall ~oracle
chown -R grid.oinstall ~grid
##修改用户密码为123
echo "123" |passwd oracle --stdin
echo "123" |passwd grid --stdin
##查看用户组
id grid
id oracle
##重载udev
udevadm trigger --type=devices --action=change
sleep 2
udevadm control --reload-rules
sleep 1
ll /dev/asm*
###注意: /dev/asm*这里udev重载之后,绑盘权限已经变 grid
###创建软件目录:
#11g
mkdir -p /u01/app/11.2.0/grid
mkdir -p /u01/app/grid
mkdir -p /u01/app/oraInventory
mkdir /u01/app/oracle
chown -R grid:oinstall /u01
chown -R grid:oinstall /u01/app/oraInventory
chown oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/
#准备目录
#echo "" >>/etc/fstab
#echo "/dev/nvme0n2 /soft xfs defaults 0 0" >>/etc/fstab
#mkdir -p /soft
#mount -a
#虚拟机规整硬盘空间
#mv /u01 /soft/
#ln -s /soft/u01 /u01
#################################################################################################################################################################
下述分节点执行
##15、环境变量配置(rac01&rac02)
#####################grid用户环境变量:
#RAC1:
cat <<EOF>>/home/grid/.bash_profile
################OracleBegin#########################
umask 022
export TMP=/tmp
export TMPDIR=\$TMP
export ORACLE_SID=+ASM1
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/11.2.0/grid
export PATH=/usr/sbin:\$PATH
export PATH=\$ORACLE_HOME/bin:\$ORACLE_HOME/OPatch:\$PATH
export LD_LIBRARY_PATH=\$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=\$ORACLE_HOME/JRE:\$ORACLE_HOME/jlib:\$ORACLE_HOME/rdbms/jlib
alias sas='sqlplus / as sysasm'
export PS1="[\`whoami\`@\`hostname\`:"'\$PWD]\$ '
EOF
chown grid.oinstall /home/grid/.bash_profile
ls -l /home/grid/.bash_profile
cat /home/grid/.bash_profile
######RAC2: 参考上述RAC1 ORACLE_SID 不一样 调整为: +ASM2
sed -i 's/+ASM1/+ASM2/g' /home/grid/.bash_profile
#####################oracle用户环境变量:
#RAC1:
cat <<EOF>>/home/oracle/.bash_profile
################OracleBegin#########################
umask 022
export TMP=/tmp
export TMPDIR=\$TMP
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=\$ORACLE_BASE/product/11.2.0/db_1
export TNS_ADMIN=\$ORACLE_HOME/network/admin
export PATH=/usr/sbin:\$PATH
export PATH=\$ORACLE_HOME/bin:\$ORACLE_HOME/OPatch:\$PATH
export LD_LIBRARY_PATH=\$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=\$ORACLE_HOME/JRE:\$ORACLE_HOME/jlib:\$ORACLE_HOME/rdbms/jlib
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export ORACLE_TERM=xterm
export ORACLE_SID=racdb1
export ORACLE_HOSTNAME=racnode1
alias sas='sqlplus / as sysdba'
export PS1="[\`whoami\`@\`hostname\`:"'\$PWD]\$ '
################OracleEnd#########################
EOF
chown oracle.oinstall /home/oracle/.bash_profile
ls -l /home/oracle/.bash_profile
cat /home/oracle/.bash_profile
######RAC2: 参考上述RAC1 ORACLE_SID 不一样 调整为: racdb2 racnode2
sed -i -e 's/racdb1/racdb2/g' -e 's/racnode1/racnode2/g' /home/oracle/.bash_profile
#################################################################################################################################################################
rac安装:
##16、重启虚拟机
##17、安装介质上传解压(rac01)
##上传安装介质到 ...(/soft)
chmod 777 /soft
##上传安装介质
##db
p13390677_112040_Linux-x86-64_1of7.zip
p13390677_112040_Linux-x86-64_2of7.zip
#grid
p13390677_112040_Linux-x86-64_3of7.zip
#OPATCH 大于 11.2.0.23
p6880880_112000_Linux-x86-64-11.2.0.3.47.zip
补丁包:
PSU版本号: p31718723_112040_Linux-x86-64.zip
OJVM版本号:OVJM_p31668908_112040_Linux-x86-64.zip
SPU版本: CPU_p31834759_112040_Linux-x86-64.zip
压缩包解压:
cd /soft/
unzip p13390677_112040_Linux-x86-64_1of7.zip
unzip p13390677_112040_Linux-x86-64_2of7.zip
unzip p13390677_112040_Linux-x86-64_3of7.zip
解压之后会出现2个目录database和grid
亦可:
解压缩:
##解压grid安装包:
su - grid -c "unzip -q /soft/p13390677_112040_Linux-x86-64_3of7.zip -d /soft/"
##解压oracle安装包:
su - oracle -c "unzip -q /soft/p13390677_112040_Linux-x86-64_1of7.zip -d /soft/"
su - oracle -c "unzip -q /soft/p13390677_112040_Linux-x86-64_2of7.zip -d /soft/"
##cvuqdisk安装(rac01&rac02):
##rac01:
su - root
cd /soft/grid/rpm
rpm -ivh /soft/grid/rpm/cvuqdisk-*.rpm
##传输到节点二安装
scp /soft/grid/rpm/cvuqdisk-*.rpm root@racnode2:~
##rac02:
rpm -ivh ~/cvuqdisk-*.rpm
##17.2、配置互信
两种方法配置互信,一种手动执行命令保证两节点key文件一致,另一种方法使用oracle 安装包自带的互信脚本执行。
方法一 (需要在介质上传完成后) 便捷
使用oracle侧自带的互信脚本,执行即可
[root@rac1 database]# ls
install readme.html response rpm runInstaller sshsetup stage welcome.html
[root@rac1 database]# ./sshsetup/sshUserSetup.sh help=y
Please specify a valid and existing cluster configuration file.
Either user name or host information is missing
Usage ./sshsetup/sshUserSetup.sh -user <user name> [ -hosts "<space separated hostlist>" | -hostfile <absolute path of cluster configuration file> ] [ -advanced ] [ -verify] [ -exverify ] [ -logfile <desired absolute path of logfile> ] [-confirm] [-shared] [-help] [-usePassphrase] [-noPromptPassphrase]
[root@rac1 database]#
为为两主机rac1 ,rac2添加互信,用户是oralce
cd /soft/database/sshsetup
./sshUserSetup.sh -hosts "racnode1 racnode2" -user oracle -advanced
./sshUserSetup.sh -hosts "racnode1 racnode2" -user grid -advanced
./sshUserSetup.sh -hosts "racnode1 racnode2" -user root -advanced
执行完毕,执行验证
su - oracle
date;ssh racnode1 date;ssh racnode1 date;ssh racnode2 date;ssh racnode2 date;ssh racnode1 date
su - grid
date;ssh racnode1 date;ssh racnode1 date;ssh racnode2 date;ssh racnode2 date;ssh racnode1 date
##对等验证
su - grid
/soft/grid/runcluvfy.sh comp admprv -n racnode1,racnode2 -o user_equiv -sshonly -verbose
安装预检查:
/soft/grid/runcluvfy.sh stage -pre crsinst -n racnode1,racnode2 -fixup -verbose
##18、静默安装Grid软件
#18.1 准备rsp文件
cat <<EOF > ~grid/grid_11g.rsp
echo "
oracle.install.responseFileVersion=/oracle/install/rspfmt_crsinstall_response_schema_v11_2_0
ORACLE_HOSTNAME=racnode1
INVENTORY_LOCATION=/u01/app/oraInventory
SELECTED_LANGUAGES=en,zh_CN
oracle.install.option=CRS_CONFIG
ORACLE_BASE=/u01/app/grid
ORACLE_HOME=/u01/app/11.2.0/grid
oracle.install.asm.OSDBA=asmdba
oracle.install.asm.OSOPER=asmoper
oracle.install.asm.OSASM=asmadmin
oracle.install.crs.config.gpnp.scanName=racnode-scan
oracle.install.crs.config.gpnp.scanPort=1521
oracle.install.crs.config.clusterName=racnode-cluster
oracle.install.crs.config.gpnp.configureGNS=false
oracle.install.crs.config.autoConfigureClusterNodeVIP=false
oracle.install.crs.config.clusterNodes=racnode1:racnode1-vip,racnode2:racnode2-vip
oracle.install.crs.config.networkInterfaceList=eth0:192.168.11.0:1,eth1:192.168.201.0:2
oracle.install.crs.config.storageOption=ASM_STORAGE
oracle.install.crs.config.useIPMI=false
oracle.install.asm.SYSASMPassword=oracle
oracle.install.asm.diskGroup.name=OCR
oracle.install.asm.diskGroup.redundancy=EXTERNAL
oracle.install.asm.diskGroup.AUSize=1
oracle.install.asm.diskGroup.disks=/dev/asm_ocr
oracle.install.asm.diskGroup.diskDiscoveryString=/dev/asm*
oracle.install.asm.monitorPassword=oracle
oracle.install.crs.upgrade.clusterNodes=
oracle.install.asm.upgradeASM=false
oracle.installer.autoupdates.option=SKIP_UPDATES">~grid/grid_11g.rsp
EOF
chown -R grid.oinstall ~grid/grid_11g.rsp
####################################################
#18.2 静默安装 (图形化安装见文档最后参考页面 )
su - grid
cd /soft/grid/
安装预检查:
./runcluvfy.sh stage -pre crsinst -n racnode1,racnode2 -fixup -verbose
错误如下:
racnode1 missing pdksh-5.2.14 failed
racnode1 2GB (2097144.0KB) 7.6729GB (8045632.0KB) failed Result: Swap space check failed
Result: Clock synchronization check using Network Time Protocol(NTP) failed
glibc查看
ldd --version
[root@racnode1 ~]# ldd --version
ldd (GNU libc) 2.12
[root@racnode1 ~]# uname -a
Linux racnode1 2.6.32-431.el6.x86_64 #1 SMP Sun Nov 10 22:19:54 EST 2013 x86_64 x86_64 x86_64 GNU/Linux
[root@racnode1 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.5 (Santiago)
上述的异常 逐个确认, 后续安装不影响 忽略
静默安装:
##正常
[grid@racnode1:/soft/grid]$ ./runInstaller -responseFile ~/grid_11g.rsp -silent -showProgress -waitForCompletion -ignorePrereq -ignoreSysPrereqs
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB. Actual 52991 MB Passed
Checking swap space: must be greater than 150 MB. Actual 2047 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2026-06-19_10-29-55AM. Please wait ...[WARNING] [INS-30011] The SYS password entered does not conform to the Oracle recommended standards.
CAUSE: Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
ACTION: Provide a password that conforms to the Oracle recommended standards.
[WARNING] [INS-30011] The ASMSNMP password entered does not conform to the Oracle recommended standards.
CAUSE: Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
ACTION: Provide a password that conforms to the Oracle recommended standards.
You can find the log of this install session at:
/u01/app/oraInventory/logs/installActions2026-06-19_10-29-55AM.log
Prepare in progress.
.................................................. 9% Done.
Prepare successful.
Copy files in progress.
.................................................. 15% Done.
.................................................. 20% Done.
.................................................. 25% Done.
.................................................. 30% Done.
.................................................. 35% Done.
.................................................. 40% Done.
.................................................. 45% Done.
........................................
Copy files successful.
Link binaries in progress.
Link binaries successful.
.................................................. 62% Done.
Setup files in progress.
Setup files successful.
.................................................. 76% Done.
Perform remote operations in progress.
.................................................. 89% Done.
Perform remote operations successful.
The installation of Oracle Grid Infrastructure 11g was successful.
Please check '/u01/app/oraInventory/logs/silentInstall2026-06-19_10-29-55AM.log' for more details.
.................................................. 94% Done.
Execute Root Scripts in progress.
As a root user, execute the following script(s):
1. /u01/app/oraInventory/orainstRoot.sh
2. /u01/app/11.2.0/grid/root.sh
Execute /u01/app/oraInventory/orainstRoot.sh on the following nodes:
[racnode1, racnode2]
Execute /u01/app/11.2.0/grid/root.sh on the following nodes:
[racnode1, racnode2]
.................................................. 100% Done.
Execute Root Scripts successful.
As install user, execute the following script to complete the configuration.
1. /u01/app/11.2.0/grid/cfgtoollogs/configToolAllCommands RESPONSE_FILE=<response_file>
Note:
1. This script must be run on the same host from where installer was run.
2. This script needs a small password properties file for configuration assistants that require passwords (refer to install guide documentation).
Successfully Setup Software.
异常:
[grid@racnode1:/soft/grid]$ ./runInstaller -responseFile ~/grid_11g.rsp -silent -showProgress -waitForCompletion -ignorePrereq -ignoreSysPrereqs
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB. Actual 52988 MB Passed
Checking swap space: must be greater than 150 MB. Actual 2047 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2026-06-19_10-06-55AM. Please wait ...[WARNING] [INS-30011] The SYS password entered does not conform to the Oracle recommended standards.
CAUSE: Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
ACTION: Provide a password that conforms to the Oracle recommended standards.
[WARNING] [INS-30011] The ASMSNMP password entered does not conform to the Oracle recommended standards.
CAUSE: Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
ACTION: Provide a password that conforms to the Oracle recommended standards.
You can find the log of this install session at:
/u01/app/oraInventory/logs/installActions2026-06-19_10-06-55AM.log
Prepare in progress.
.................................................. 9% Done.
Prepare successful.
Copy files in progress.
.................................................. 15% Done.
.................................................. 20% Done.
.................................................. 25% Done.
.................................................. 30% Done.
.................................................. 35% Done.
.................................................. 40% Done.
.................................................. 45% Done.
........................................
Copy files successful.
Link binaries in progress.
Link binaries successful.
.................................................. 62% Done.
Setup files in progress.
Setup files successful.
.................................................. 76% Done.
Perform remote operations in progress.
.................................................. 89% Done.
Perform remote operations successful.
SEVERE:Remote 'AttachHome' failed on nodes: 'racnode1'. Refer to '/u01/app/oraInventory/logs/installActions2026-06-19_10-06-55AM.log' for details.
It is recommended that the following command needs to be manually run on the failed nodes:
/u01/app/11.2.0/grid/oui/bin/runInstaller -attachHome -noClusterEnabled ORACLE_HOME=/u01/app/11.2.0/grid ORACLE_HOME_NAME=Ora11g_gridinfrahome1 CLUSTER_NODES=localhost,racnode1,racnode2 "INVENTORY_LOCATION=/u01/app/oraInventory" LOCAL_NODE=<node on which command is to be run>.
Please refer 'AttachHome' logs under central inventory of remote nodes where failure occurred for more details.
The installation of Oracle Grid Infrastructure 11g was successful on the local node but failed on remote nodes.
Please check '/u01/app/oraInventory/logs/silentInstall2026-06-19_10-06-55AM.log' for more details.
.................................................. 94% Done.
Execute Root Scripts in progress.
As a root user, execute the following script(s):
1. /u01/app/oraInventory/orainstRoot.sh
2. /u01/app/11.2.0/grid/root.sh
Execute /u01/app/oraInventory/orainstRoot.sh on the following nodes:
[localhost, racnode1, racnode2]
Execute /u01/app/11.2.0/grid/root.sh on the following nodes:
[localhost, racnode1, racnode2]
.................................................. 100% Done.
Execute Root Scripts successful.
As install user, execute the following script to complete the configuration.
1. /u01/app/11.2.0/grid/cfgtoollogs/configToolAllCommands RESPONSE_FILE=<response_file>
Note:
1. This script must be run on the same host from where installer was run.
2. This script needs a small password properties file for configuration assistants that require passwords (refer to install guide documentation).
Successfully Setup Software.
出现下述错误:
Perform remote operations successful.
SEVERE:Remote 'AttachHome' failed on nodes: 'racnode1'. Refer to '/u01/app/oraInventory/logs/installActions2026-06-19_10-06-55AM.log' for details.
It is recommended that the following command needs to be manually run on the failed nodes:
/u01/app/11.2.0/grid/oui/bin/runInstaller -attachHome -noClusterEnabled ORACLE_HOME=/u01/app/11.2.0/grid ORACLE_HOME_NAME=Ora11g_gridinfrahome1 CLUSTER_NODES=localhost,racnode1,racnode2 "INVENTORY_LOCATION=/u01/app/oraInventory" LOCAL_NODE=<node on which command is to be run>.
Please refer 'AttachHome' logs under central inventory of remote nodes where failure occurred for more details.
The installation of Oracle Grid Infrastructure 11g was successful on the local node but failed on remote nodes.
Please check '/u01/app/oraInventory/logs/silentInstall2026-06-19_10-06-55AM.log' for more details.
检查/etc/hosts文件
localhost配127.0.0.1,不要配置public ip,免得带出来 localhost 多IP或者 racnode1/2 多IP
[root@racnode1 ~]# /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@racnode1 ~]# /u01/app/11.2.0/grid/root.sh
Check /u01/app/11.2.0/grid/install/root_racnode1_2026-06-19_10-40-35.log for the output of root script
[root@racnode1 ~]# cat /u01/app/11.2.0/grid/install/root_racnode1_2026-06-19_10-40-35.log
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /u01/app/11.2.0/grid
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.
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
Installing Trace File Analyzer
Failed to create keys in the OLR, rc = 127, Message:
/u01/app/11.2.0/grid/bin/clscfg.bin: error while loading shared libraries: libcap.so.1: cannot open shared object file: No such file or directory
Failed to create keys in the OLR at /u01/app/11.2.0/grid/crs/install/crsconfig_lib.pm line 7660.
/u01/app/11.2.0/grid/perl/bin/perl -I/u01/app/11.2.0/grid/perl/lib -I/u01/app/11.2.0/grid/crs/install /u01/app/11.2.0/grid/crs/install/rootcrs.pl execution failed
执行:
ln -s /lib64/libcap.so.2 /lib64/libcap.so.1
[root@racnode1 ~]# /u01/app/11.2.0/grid/root.sh
Check /u01/app/11.2.0/grid/install/root_racnode1_2026-06-19_10-43-51.log for the output of root script
[root@racnode1 ~]# cat /u01/app/11.2.0/grid/install/root_racnode1_2026-06-19_10-43-51.log
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /u01/app/11.2.0/grid
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
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.
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
User ignored Prerequisites during installation
Installing Trace File Analyzer
OLR initialization - successful
root wallet
root wallet cert
root cert export
peer wallet
profile reader wallet
pa wallet
peer wallet keys
pa wallet keys
peer cert request
pa cert request
peer cert
pa cert
peer root cert TP
profile reader root cert TP
pa root cert TP
peer pa cert TP
pa peer cert TP
profile reader pa cert TP
profile reader peer cert TP
peer user cert
pa user cert
peer user cert
pa user cert
Adding Clusterware entries to upstart
CRS-2672: Attempting to start 'ora.mdnsd' on 'racnode1'
CRS-2676: Start of 'ora.mdnsd' on 'racnode1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'racnode1'
CRS-2676: Start of 'ora.gpnpd' on 'racnode1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'racnode1'
CRS-2672: Attempting to start 'ora.gipcd' on 'racnode1'
CRS-2676: Start of 'ora.cssdmonitor' on 'racnode1' succeeded
CRS-2676: Start of 'ora.gipcd' on 'racnode1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'racnode1'
CRS-2672: Attempting to start 'ora.diskmon' on 'racnode1'
CRS-2676: Start of 'ora.diskmon' on 'racnode1' succeeded
CRS-2676: Start of 'ora.cssd' on 'racnode1' succeeded
ASM created and started successfully.
Disk Group OCR created successfully.
clscfg: -install mode specified
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4256: Updating the profile
Successful addition of voting disk 38e2b7dc189f4fb1bf0523e755857d80.
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 38e2b7dc189f4fb1bf0523e755857d80 (/dev/asm_ocr) [OCR]
Located 1 voting disk(s).
CRS-2672: Attempting to start 'ora.asm' on 'racnode1'
CRS-2676: Start of 'ora.asm' on 'racnode1' succeeded
CRS-2672: Attempting to start 'ora.OCR.dg' on 'racnode1'
CRS-2676: Start of 'ora.OCR.dg' on 'racnode1' succeeded
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
node2:
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.
You have new mail in /var/spool/mail/root
[root@racnode2 ~]# ln -s /lib64/libcap.so.2 /lib64/libcap.so.1
[root@racnode2 ~]# /u01/app/11.2.0/grid/root.sh
Check /u01/app/11.2.0/grid/install/root_racnode2_2026-06-19_10-53-06.log for the output of root script
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /u01/app/11.2.0/grid
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.
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
Installing Trace File Analyzer
OLR initialization - successful
Adding Clusterware entries to upstart
CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node racnode1, number 1, and is terminating
An active cluster was found during exclusive startup, restarting to join the cluster
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
tips:
Failed to create keys in the OLR, rc = 127, Message:
/u01/app/11.2.0/grid/bin/clscfg.bin: error while loading shared libraries: libcap.so.1: cannot open shared object file: No such file or directory
库文件更新到.2版本了,做一个link即可。
ln -s /lib64/libcap.so.2 /lib64/libcap.so.1
#18.4 剩余配置执行
####################################################
##按照提示, 以安装用户的身份执行以下脚本来完成配置
[grid@racnode1:/soft/grid]$ /u01/app/11.2.0/grid/cfgtoollogs/configToolAllCommands RESPONSE_FILE=~/grid_11g.rsp
Setting the invPtrLoc to /u01/app/11.2.0/grid/oraInst.loc
perform - mode is starting for action: configure
perform - mode finished for action: configure
You can see the log file: /u01/app/11.2.0/grid/cfgtoollogs/oui/configActions2026-06-19_10-59-53-AM.log
tail -f /u01/app/11.2.0/grid/cfgtoollogs/oui/configActions2026-06-19_10-59-53-AM.log
......
The plug-in Oracle Net Configuration Assistant has successfully been performed
------------------------------------------------------
------------------------------------------------------
The plug-in Automatic Storage Management Configuration Assistant is running
The plug-in Automatic Storage Management Configuration Assistant has failed its perform method
------------------------------------------------------
The action configuration has failed its perform method
###################################################
集群检查,查看服务是否有异常状态:
crs_stat -t -v
##19、静默安装oracle软件
#19.1 准备rsp文件
[oracle@racnode1:/home/oracle]$ cat <<EOF >~oracle/db_install_11g.rsp
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=racnode1
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oraInventory
SELECTED_LANGUAGES=en,zh_CN
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
ORACLE_BASE=/u01/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.EEOptionsSelection=false
oracle.install.db.optionalComponents=
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=oper
oracle.install.db.CLUSTER_NODES=racnode1,racnode2
oracle.install.db.isRACOneInstall=false
oracle.install.db.racOneServiceName=
oracle.install.db.config.starterdb.type=
oracle.install.db.config.starterdb.memoryOption=
oracle.install.db.config.starterdb.memoryLimit=
oracle.install.db.config.starterdb.installExampleSchemas=
oracle.install.db.config.starterdb.enableSecuritySettings=
oracle.install.db.config.starterdb.password.ALL=
oracle.install.db.config.starterdb.control=
oracle.install.db.config.starterdb.gridcontrol.gridControlServiceURL=
oracle.install.db.config.starterdb.automatedBackup.enable=
oracle.install.db.config.asm.ASMSNMPPassword=oracle
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true
oracle.installer.autoupdates.option=SKIP_UPDATES
EOF
chown -R oracle.oinstall ~oracle/db_install_11g.rsp
#19.2 执行安装
###################################################
export
cd /soft/database
安装前验证:
./runcluvfy.sh stage -pre dbinst -n racnode1,racnode2 -verbose
安装
./runInstaller -responseFile ~/db_install_11g.rsp -silent -ignorePrereq -ignoreSysPrereqs -showProgress -waitForCompletion
[oracle@racnode1:/home/oracle]$ cd /soft/database/
[oracle@racnode1:/soft/database]$ ./runInstaller -responseFile ~/db_install_11g.rsp -silent -ignorePrereq -ignoreSysPrereqs -showProgress -waitForCompletion
Starting Oracle Universal Installer...
[FATAL] [INS-35354] The system on which you are attempting to install Oracle RAC is not part of a valid cluster.
[oracle@racnode1:/soft/database]$ ./runInstaller -responseFile ~/db_install_11g.rsp -silent -ignorePrereq -ignoreSysPrereqs -showProgress -waitForCompletion
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB. Actual 49001 MB Passed
Checking swap space: must be greater than 150 MB. Actual 2047 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2026-06-19_11-10-47AM. Please wait ...[FATAL] [INS-30132] Initial setup required for the execution of installer validations failed on nodes: racnode2
CAUSE: Indicated nodes were not reachable or failed to access the temporary location on the indicated nodes.
ACTION: Ensure that all the indicated nodes are reachable and current user has required permissions to access the temporary location on all the indicated nodes.
tips:
排查原因,在信任处存在异常:
su - oracle
date;ssh racnode1 date;ssh racnode1 date;ssh racnode2 date;ssh racnode2 date;ssh racnode1 date
发现信任异常, 删除信任文件并重新配置信任
su - oracle
rm -rf ~oracle/.ssh
cd /soft/database/sshsetup
./sshUserSetup.sh -hosts "racnode1 racnode2" -user oracle -advanced
执行完验证:
date;ssh racnode1 date;ssh racnode1 date;ssh racnode2 date;ssh racnode2 date;ssh racnode1 date
再次执行:
[oracle@racnode1:/soft/database]$ ./runInstaller -responseFile ~/db_install_11g.rsp -silent -ignorePrereq -ignoreSysPrereqs -showProgress -waitForCompletion
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB. Actual 48998 MB Passed
Checking swap space: must be greater than 150 MB. Actual 2047 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2026-06-19_11-19-16AM. Please wait ...You can find the log of this install session at:
/u01/app/oraInventory/logs/installActions2026-06-19_11-19-16AM.log
Prepare in progress.
.................................................. 9% Done.
Prepare successful.
Copy files in progress.
.................................................. 14% Done.
.................................................. 19% Done.
.................................................. 25% Done.
.................................................. 30% Done.
.................................................. 36% Done.
.................................................. 41% Done.
.................................................. 46% Done.
.................................................. 51% Done.
.................................................. 56% Done.
Copy files successful.
..........
Link binaries in progress.
Link binaries successful.
.................................................. 77% Done.
Setup files in progress.
.................................................. 94% Done.
Setup files successful.
The installation of Oracle Database 11g was successful.
Please check '/u01/app/oraInventory/logs/silentInstall2026-06-19_11-19-16AM.log' for more details.
Execute Root Scripts in progress.
As a root user, execute the following script(s):
1. /u01/app/oracle/product/11.2.0/db_1/root.sh
Execute /u01/app/oracle/product/11.2.0/db_1/root.sh on the following nodes:
[racnode1, racnode2]
.................................................. 100% Done.
Execute Root Scripts successful.
Successfully Setup Software.
[oracle@racnode1:/soft/database]$
##racnode1
[root@racnode1 ~]# /u01/app/oracle/product/11.2.0/db_1/root.sh
Check /u01/app/oracle/product/11.2.0/db_1/install/root_racnode1_2026-06-19_11-29-36.log for the output of root script
[root@racnode1 ~]# cat /u01/app/oracle/product/11.2.0/db_1/install/root_racnode1_2026-06-19_11-29-36.log
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.2.0/db_1
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
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.
Finished product-specific root actions.
Finished product-specific root actions.
##racnode2 略
##20、静默创建数据库磁盘组
su - grid
asmca -silent -createDiskGroup -diskGroupName DATA -diskList '/dev/asm_data' -redundancy EXTERNAL
asmcmd lsdg #查看
sqlplus / as sysasm
set linesize 999
set pagesize 999
select inst_id,name,type,state,total_mb,free_mb from gv$asm_diskgroup;
##21、静默dbca建库
初始建库 建议放置到 step22 打补丁之后进行,这样postinstall部分可以不用执行。
#21.1 创建监听
su - oracle
netca -silent \
-responsefile $ORACLE_HOME/assistants/netca/netca.rsp
#21.2 准备rsp文件
cat <<EOF >dbca_11g.rsp
[GENERAL]
RESPONSEFILE_VERSION = "11.2.0"
OPERATION_TYPE = "createDatabase"
[CREATEDATABASE]
GDBNAME = "racdb"
DB_UNIQUE_NAME = "racdb"
SID = "racdb"
NODELIST=racnode1,racnode2
TEMPLATENAME = "General_Purpose.dbc"
SYSPASSWORD = "oracle"
SYSTEMPASSWORD = "oracle"
DATAFILEDESTINATION = "+DATA"
STORAGETYPE=ASM
DISKGROUPNAME=DATA
CHARACTERSET=ZHS16GBK
NATIONALCHARACTERSET=AL16UTF16
DB_BLOCK_SIZE=8192
TOTALMEMORY = "3081"
EOF
#21.3 调整模板
$ORACLE_HOME/assistants/dbca/templates/General_Purpose.dbc
#21.4 静默建库
dbca -silent -responseFile ~/dbca_11g.rsp
[oracle@racnode1:/home/oracle]$ dbca -silent -responseFile ~/dbca_11g.rsp
Copying database files
1% complete
3% complete
9% complete
15% complete
21% complete
27% complete
30% complete
Creating and starting Oracle instance
32% complete
36% complete
40% complete
44% complete
45% complete
48% complete
50% complete
Creating cluster database views
52% complete
70% complete
Completing Database Creation
73% complete
76% complete
85% complete
94% complete
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/racdb/racdb.log" for further details.
[oracle@racnode1:/home/oracle]$ cat /u01/app/oracle/cfgtoollogs/dbca/racdb/racdb.log
Copying database files
DBCA_PROGRESS : 1%
DBCA_PROGRESS : 3%
DBCA_PROGRESS : 9%
DBCA_PROGRESS : 15%
DBCA_PROGRESS : 21%
DBCA_PROGRESS : 27%
DBCA_PROGRESS : 30%
Creating and starting Oracle instance
DBCA_PROGRESS : 32%
DBCA_PROGRESS : 36%
DBCA_PROGRESS : 40%
DBCA_PROGRESS : 44%
DBCA_PROGRESS : 45%
DBCA_PROGRESS : 48%
DBCA_PROGRESS : 50%
Creating cluster database views
DBCA_PROGRESS : 52%
DBCA_PROGRESS : 70%
Completing Database Creation
DBCA_PROGRESS : 73%
DBCA_PROGRESS : 76%
DBCA_PROGRESS : 85%
DBCA_PROGRESS : 94%
DBCA_PROGRESS : 100%
Database creation complete. For details check the logfiles at:
/u01/app/oracle/cfgtoollogs/dbca/racdb.
Database Information:
Global Database Name:racdb
System Identifier(SID) Prefix:racdb
#删除dbca新建
#dbca -silent -deletedatabase -sourcedb racdb
远程测试连通性:
192.168.11.205:1521/racdb ok
#查看db状态
srvctl status database -d racdb
##22、数据库打补丁
#22.1 201020补丁
上传补丁:
GI PSU : p31718723_112040_Linux-x86-64.zip -> /soft/11g/201020/
OJVM : p31668908_112040_Linux-x86-64.zip -> /soft/11g/201020/
OPatch :p6880880_112000_Linux-x86-64-11.2.0.3.47.zip -> /soft/11g
##解压OPatch补丁包
su - grid -c "unzip -q -o /soft/11g/p6880880_112000_Linux-x86-64-11.2.0.3.47.zip -d /u01/app/11.2.0/grid"
su - oracle -c "unzip -q -o /soft/11g/p6880880_112000_Linux-x86-64-11.2.0.3.47.zip -d /u01/app/oracle/product/11.2.0/db_1"
su - grid -c "unzip -q -o /soft/11g/201020/201020_GI_p31718723_*.zip -d /soft/"
su - oracle -c "unzip -q -o /soft/11g/201020/201020_OVJM_p31668908*.zip -d /soft/"
###################################################
#grid用户打补丁
##补丁预演:
#/u01/app/11.2.0/grid/OPatch/opatch auto /soft/31718723 -oh /u01/app/11.2.0/grid -report
##没报错,再打GI补丁:
#opatch auto /soft/31718723 -oh /u01/app/11.2.0/grid
######日志如下:
[root@racnode1 soft]# /u01/app/11.2.0/grid/OPatch/opatch auto /soft/31718723 -oh /u01/app/11.2.0/grid -report
Executing /u01/app/11.2.0/grid/perl/bin/perl /u01/app/11.2.0/grid/OPatch/crs/patch11203.pl -patchdir /soft -patchn 31718723 -oh /u01/app/11.2.0/grid -report -paramfile /u01/app/11.2.0/grid/crs/install/crsconfig_params
This is the main log file: /u01/app/11.2.0/grid/cfgtoollogs/opatchauto2026-06-06_14-47-57.log
This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:
/u01/app/11.2.0/grid/cfgtoollogs/opatchauto2026-06-06_14-47-57.report.log
2026-06-06 14:47:57: Starting Clusterware Patch Setup
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
opatchauto is running in analyze/report mode. It will make no change to your system
patch /soft/31718723/29938455 apply (report mode) successful for home /u01/app/11.2.0/grid
patch /soft/31718723/31537677 apply (report mode) successful for home /u01/app/11.2.0/grid
patch /soft/31718723/29509309 apply (report mode) successful for home /u01/app/11.2.0/grid
opatch auto succeeded.
[root@racnode1 soft]# /u01/app/11.2.0/grid/OPatch/opatch auto /soft/31718723 -oh /u01/app/11.2.0/grid
Executing /u01/app/11.2.0/grid/perl/bin/perl /u01/app/11.2.0/grid/OPatch/crs/patch11203.pl -patchdir /soft -patchn 31718723 -oh /u01/app/11.2.0/grid -paramfile /u01/app/11.2.0/grid/crs/install/crsconfig_params
This is the main log file: /u01/app/11.2.0/grid/cfgtoollogs/opatchauto2026-06-06_14-51-21.log
This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:
/u01/app/11.2.0/grid/cfgtoollogs/opatchauto2026-06-06_14-51-21.report.log
2026-06-06 14:51:21: Starting Clusterware Patch Setup
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
Stopping CRS...
Stopped CRS successfully
patch /soft/31718723/29938455 apply successful for home /u01/app/11.2.0/grid #在此过程执行 systemctl stop ohas.service systemctl disable ohas.service
patch /soft/31718723/31537677 apply successful for home /u01/app/11.2.0/grid
patch /soft/31718723/29509309 apply successful for home /u01/app/11.2.0/grid
Starting CRS... #18370031补丁解决initab的问题,故此处需要提前把 前期添加的ohas.service关了
Installing Trace File Analyzer
CRS-4123: Oracle High Availability Services has been started.
opatch auto succeeded.
##查看补丁情况
[grid@racnode1:/home/grid]$ opatch lspatches
29509309;ACFS Patch Set Update : 11.2.0.4.190716 (29509309)
31537677;Database Patch Set Update : 11.2.0.4.201020 (31537677)
29938455;OCW Patch Set Update : 11.2.0.4.191015 (29938455)
OPatch succeeded.
###################################################
#oracle用户打补丁31718723
#GI补丁权限调整为oracle,GI中包含DB补丁
chown -R oracle.oinstall /soft/31718723
##先做预演:
#/u01/app/oracle/product/11.2.0/db_1/OPatch/opatch auto /soft/31718723/ -oh /u01/app/oracle/product/11.2.0/db_1 -report
##没报错,再打DB补丁:
#/u01/app/oracle/product/11.2.0/db_1/OPatch/opatch auto /soft/31718723 -oh /u01/app/oracle/product/11.2.0/db_1
#######日志如下:
[root@racnode1 soft]# /u01/app/oracle/product/11.2.0/db_1/OPatch/opatch auto /soft/31718723/ -oh /u01/app/oracle/product/11.2.0/db_1 -report
Executing /u01/app/11.2.0/grid/perl/bin/perl /u01/app/oracle/product/11.2.0/db_1/OPatch/crs/patch11203.pl -patchdir /soft -patchn 31718723 -oh /u01/app/oracle/product/11.2.0/db_1 -report -paramfile /u01/app/11.2.0/grid/crs/install/crsconfig_params
This is the main log file: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatchauto2026-06-06_15-01-34.log
This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:
/u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatchauto2026-06-06_15-01-34.report.log
2026-06-06 15:01:34: Starting Clusterware Patch Setup
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
opatchauto is running in analyze/report mode. It will make no change to your system
patch /soft/31718723/29938455/custom/server/29938455 apply (report mode) successful for home /u01/app/oracle/product/11.2.0/db_1
patch /soft/31718723/31537677 apply (report mode) successful for home /u01/app/oracle/product/11.2.0/db_1
opatch auto succeeded.
[root@racnode1 soft]# /u01/app/oracle/product/11.2.0/db_1/OPatch/opatch auto /soft/31718723 -oh /u01/app/oracle/product/11.2.0/db_1
Executing /u01/app/11.2.0/grid/perl/bin/perl /u01/app/oracle/product/11.2.0/db_1/OPatch/crs/patch11203.pl -patchdir /soft -patchn 31718723 -oh /u01/app/oracle/product/11.2.0/db_1 -paramfile /u01/app/11.2.0/grid/crs/install/crsconfig_params
This is the main log file: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatchauto2026-06-06_15-03-51.log
This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:
/u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatchauto2026-06-06_15-03-51.report.log
2026-06-06 15:03:51: Starting Clusterware Patch Setup
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
Stopping RAC /u01/app/oracle/product/11.2.0/db_1 ...
Stopped RAC /u01/app/oracle/product/11.2.0/db_1 successfully
patch /soft/31718723/29938455/custom/server/29938455 apply successful for home /u01/app/oracle/product/11.2.0/db_1
patch /soft/31718723/31537677 apply successful for home /u01/app/oracle/product/11.2.0/db_1
Starting RAC /u01/app/oracle/product/11.2.0/db_1 ...
Started RAC /u01/app/oracle/product/11.2.0/db_1 successfully
opatch auto succeeded.
###################################################
#oracle用户打OJVM补丁31668908
su - oracle
cd /soft/31668908
##先做补丁预演:
opatch prereq CheckConflictAgainstOHWithDetail -ph ./
[oracle@racnode1:/soft/31668908]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle 临时补丁程序安装程序版本 11.2.0.3.47
版权所有 (c) 2026, Oracle Corporation。保留所有权利。
PREREQ session
Oracle 主目录 :/u01/app/oracle/product/11.2.0/db_1
主产品清单:/u01/app/oraInventory
来自 :/u01/app/oracle/product/11.2.0/db_1/oraInst.loc
OPatch 版本 :11.2.0.3.47
OUI 版本 :11.2.0.4.0
日志文件位置:/u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2026-06-06_15-10-19下午_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
##没报错,再打DB补丁:
[oracle@racnode1:/soft/31668908]$ opatch apply
Oracle 临时补丁程序安装程序版本 11.2.0.3.47
版权所有 (c) 2026, Oracle Corporation。保留所有权利。
Oracle 主目录 :/u01/app/oracle/product/11.2.0/db_1
主产品清单:/u01/app/oraInventory
来自 :/u01/app/oracle/product/11.2.0/db_1/oraInst.loc
OPatch 版本 :11.2.0.3.47
OUI 版本 :11.2.0.4.0
日志文件位置:/u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2026-06-06_15-10-50下午_1.log
Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 31668908
是否继续? [y|n]
y
User Responded with: Y
All checks passed.
请关闭本地系统上在此 ORACLE_HOME 之外运行的 Oracle 实例。
(Oracle 主目录 = '/u01/app/oracle/product/11.2.0/db_1')
本地系统是否已准备打补丁? [y|n]
y
User Responded with: Y
Backing up files...
正在将临时补丁程序 '31668908' 应用于 OH '/u01/app/oracle/product/11.2.0/db_1'
ApplySession: Oracle 主目录中不存在可选组件 [ oracle.sqlj, 11.2.0.4.0 ] , [ oracle.sqlj.companion, 11.2.0.4.0 ] , 或找到更高版本。
正在为组件 oracle.javavm.server, 11.2.0.4.0 打补丁...
正在为组件 oracle.precomp.common, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms, 11.2.0.4.0 打补丁...
正在为组件 oracle.rdbms.dbscripts, 11.2.0.4.0 打补丁...
正在为组件 oracle.javavm.client, 11.2.0.4.0 打补丁...
正在为组件 oracle.dbjava.jdbc, 11.2.0.4.0 打补丁...
正在为组件 oracle.dbjava.ic, 11.2.0.4.0 打补丁...
Patch 31668908 successfully applied.
Log file location: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2026-06-06_15-10-50下午_1.log
OPatch succeeded.
#######补丁执行情况查询
[oracle@racnode1:/soft/31834759]$ opatch lspatches
31668908;OJVM PATCH SET UPDATE 11.2.0.4.201020
31537677;Database Patch Set Update : 11.2.0.4.201020 (31537677)
29938455;OCW Patch Set Update : 11.2.0.4.191015 (29938455)
OPatch succeeded.
###############################################################################################################################
#22.2 240716补丁
上传补丁:
PSU : p36663558_112040_Linux-x86-64.zip (240716)
OJVM: p36222352_112040_Linux-x86-64.zip (240416)
JDK : p36195627_112040_Linux-x86-64.zip (240416)
OPatch:p6880880_112000_Linux-x86-64-11.2.0.3.47.zip
解压缩:
su - grid -c "unzip -q -o /soft/p36663558_112040_Linux-x86-64-gi*.zip -d /soft/"
su - oracle -c "unzip -q -o /soft/p36195627*.zip -d /soft/"
su - oracle -c "unzip -q -o /soft/p36222352*.zip -d /soft/"
su - grid -c "unzip -q -o /soft/11g/p6880880_112000_Linux-x86-64-11.2.0.3.47.zip -d /u01/app/11.2.0/grid"
su - oracle -c "unzip -q -o /soft/11g/p6880880_112000_Linux-x86-64-11.2.0.3.47.zip -d /u01/app/oracle/product/11.2.0/db_1"
###################################################
#grid用户打补丁
##补丁预演:
su - root
/u01/app/11.2.0/grid/OPatch/opatch auto /soft/36663558 -oh /u01/app/11.2.0/grid -report
##没报错,再打GI、DB补丁:
#opatch auto /soft/36663558 -oh /u01/app/11.2.0/grid
######日志如下:
[root@racnode1:/soft]$ /u01/app/11.2.0/grid/OPatch/opatch auto /soft/36663558 -oh /u01/app/11.2.0/grid -report
Executing /u01/app/11.2.0/grid/perl/bin/perl /u01/app/11.2.0/grid/OPatch/crs/patch11203.pl -patchdir /soft -patchn 36663558 -oh /u01/app/11.2.0/grid -report -paramfile /u01/app/11.2.0/grid/crs/install/crsconfig_params
This is the main log file: /u01/app/11.2.0/grid/cfgtoollogs/opatchauto2026-06-03_15-40-51.log
This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:
/u01/app/11.2.0/grid/cfgtoollogs/opatchauto2026-06-03_15-40-51.report.log
2026-06-03 15:40:51: Starting Clusterware Patch Setup
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
opatchauto is running in analyze/report mode. It will make no change to your system
patch /soft/36663558/36614298 apply (report mode) successful for home /u01/app/11.2.0/grid
patch /soft/36663558/36575425 apply (report mode) successful for home /u01/app/11.2.0/grid
patch /soft/36663558/33112794 apply (report mode) successful for home /u01/app/11.2.0/grid
opatch auto succeeded.
[root@racnode1:/soft]$ /u01/app/11.2.0/grid/OPatch/opatch auto /soft/36663558 -oh /u01/app/11.2.0/grid
Executing /u01/app/11.2.0/grid/perl/bin/perl /u01/app/11.2.0/grid/OPatch/crs/patch11203.pl -patchdir /soft -patchn 36663558 -oh /u01/app/11.2.0/grid -paramfile /u01/app/11.2.0/grid/crs/install/crsconfig_params
This is the main log file: /u01/app/11.2.0/grid/cfgtoollogs/opatchauto2026-06-03_15-44-28.log
This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:
/u01/app/11.2.0/grid/cfgtoollogs/opatchauto2026-06-03_15-44-28.report.log
2026-06-03 15:44:28: Starting Clusterware Patch Setup
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
Stopping CRS...
Stopped CRS successfully
patch /soft/36663558/36614298 apply successful for home /u01/app/11.2.0/grid #在此过程执行 systemctl stop ohas.service systemctl disable ohas.service
patch /soft/36663558/36575425 apply successful for home /u01/app/11.2.0/grid
patch /soft/36663558/33112794 apply successful for home /u01/app/11.2.0/grid
Starting CRS... #与201020补丁类似情况
Installing Trace File Analyzer
CRS-4123: Oracle High Availability Services has been started.
opatch auto succeeded.
######查看补丁明细
su - grid
[grid@racnode1:/soft]$ opatch lspatches
33112794;ACFS PATCH SET UPDATE 11.2.0.4.210720 (33112794)
36575425;Database Patch Set Update : 11.2.0.4.240716 (36575425)
36614298;OCW PATCH SET UPDATE 11.2.0.4.240716 (36614298)
OPatch succeeded.
###################################################
oracle用户打补丁:
#GI补丁权限调整为oracle,GI中包含DB补丁
chown -R oracle.oinstall /soft/36663558
#先做预演:
/u01/app/oracle/product/11.2.0/db_1/OPatch/opatch auto /soft/36663558/ -oh /u01/app/oracle/product/11.2.0/db_1 -report
#没报错,再打GI、DB补丁:
#/u01/app/oracle/product/11.2.0/db_1/OPatch/opatch auto /soft/36663558 -oh /u01/app/oracle/product/11.2.0/db_1
######日志如下:
[root@racnode1:/soft]$ /u01/app/oracle/product/11.2.0/db_1/OPatch/opatch auto /soft/36663558/ -oh /u01/app/oracle/product/11.2.0/db_1 -report
Executing /u01/app/11.2.0/grid/perl/bin/perl /u01/app/oracle/product/11.2.0/db_1/OPatch/crs/patch11203.pl -patchdir /soft -patchn 36663558 -oh /u01/app/oracle/product/11.2.0/db_1 -report -paramfile /u01/app/11.2.0/grid/crs/install/crsconfig_params
This is the main log file: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatchauto2026-06-03_16-26-14.log
This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:
/u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatchauto2026-06-03_16-26-14.report.log
2026-06-03 16:26:14: Starting Clusterware Patch Setup
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
opatchauto is running in analyze/report mode. It will make no change to your system
patch /soft/36663558/36614298/custom/server/36614298 apply (report mode) successful for home /u01/app/oracle/product/11.2.0/db_1
patch /soft/36663558/36575425 apply (report mode) successful for home /u01/app/oracle/product/11.2.0/db_1
opatch auto succeeded.
[root@racnode1:/soft]$ /u01/app/oracle/product/11.2.0/db_1/OPatch/opatch auto /soft/36663558 -oh /u01/app/oracle/product/11.2.0/db_1
Executing /u01/app/11.2.0/grid/perl/bin/perl /u01/app/oracle/product/11.2.0/db_1/OPatch/crs/patch11203.pl -patchdir /soft -patchn 36663558 -oh /u01/app/oracle/product/11.2.0/db_1 -paramfile /u01/app/11.2.0/grid/crs/install/crsconfig_params
This is the main log file: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatchauto2026-06-03_16-30-11.log
This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:
/u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatchauto2026-06-03_16-30-11.report.log
2026-06-03 16:30:11: Starting Clusterware Patch Setup
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
Stopping RAC /u01/app/oracle/product/11.2.0/db_1 ...
Stopped RAC /u01/app/oracle/product/11.2.0/db_1 successfully
patch /soft/36663558/36614298/custom/server/36614298 apply successful for home /u01/app/oracle/product/11.2.0/db_1
patch /soft/36663558/36575425 apply successful for home /u01/app/oracle/product/11.2.0/db_1
Starting RAC /u01/app/oracle/product/11.2.0/db_1 ...
Started RAC /u01/app/oracle/product/11.2.0/db_1 successfully
opatch auto succeeded.
###################################################
#oracle 用户打OJVM补丁36222352
su - oracle
cd /soft/36222352
#先做预演:
opatch prereq CheckConflictAgainstOHWithDetail -ph ./
[oracle@racnode1:/soft/36222352]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 11.2.0.3.47
Copyright (c) 2026, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version : 11.2.0.3.47
OUI version : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2026-06-03_16-40-58PM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
#没报错在apply补丁
[oracle@racnode1:/soft/36222352]$ opatch apply
Oracle Interim Patch Installer version 11.2.0.3.47
Copyright (c) 2026, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version : 11.2.0.3.47
OUI version : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2026-06-03_16-43-09PM_1.log
Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 36222352
Do you want to proceed? [y|n]
Y
User Responded with: Y
All checks passed.
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0/db_1')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '36222352' to OH '/u01/app/oracle/product/11.2.0/db_1'
ApplySession: Optional component(s) [ oracle.sqlj, 11.2.0.4.0 ] , [ oracle.sqlj.companion, 11.2.0.4.0 ] not present in the Oracle Home or a higher version is found.
Patching component oracle.javavm.server, 11.2.0.4.0...
Patching component oracle.precomp.common, 11.2.0.4.0...
Patching component oracle.rdbms, 11.2.0.4.0...
Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...
Patching component oracle.javavm.client, 11.2.0.4.0...
Patching component oracle.dbjava.jdbc, 11.2.0.4.0...
Patching component oracle.dbjava.ic, 11.2.0.4.0...
Patch 36222352 successfully applied.
Log file location: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2026-06-03_16-43-09PM_1.log
OPatch succeeded.
###################################################
#oracle 用户打JDK补丁36195627
su - oracle
cd /soft/36195627
#先做预演
opatch prereq CheckConflictAgainstOHWithDetail -ph ./
[oracle@racnode1:/soft/36195627]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 11.2.0.3.47
Copyright (c) 2026, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version : 11.2.0.3.47
OUI version : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2026-06-03_16-47-17PM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
#预演ok,在apply补丁
[oracle@racnode1:/soft/36195627]$ opatch apply
Oracle Interim Patch Installer version 11.2.0.3.47
Copyright (c) 2026, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version : 11.2.0.3.47
OUI version : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2026-06-03_16-48-18PM_1.log
Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 36195627
Do you want to proceed? [y|n]
Y
User Responded with: Y
All checks passed.
Backing up files...
Applying interim patch '36195627' to OH '/u01/app/oracle/product/11.2.0/db_1'
Patching component oracle.jdk, 1.5.0.51.10...
Patch 36195627 successfully applied.
Log file location: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2026-06-03_16-48-18PM_1.log
OPatch succeeded.
######查看补丁明细
[oracle@racnode1:/soft/36195627]$ opatch lspatches
36195627;JDK BUNDLE PATCH 11.2.0.4.240416 **
36222352;OJVM PATCH SET UPDATE 11.2.0.4.240416 **
36575425;Database Patch Set Update : 11.2.0.4.240716 (36575425)
36614298;OCW PATCH SET UPDATE 11.2.0.4.240716 (36614298)
OPatch succeeded.
参考文档:
oracle 19c RAC 图形化安装: https://blog.itpub.net/15404498/viewspace-3173335/
oracle 11g rac 图形化安装: https://blog.itpub.net/15404498/viewspace-3173420/
RPM下载站 RPM.PBONE.NET: https://rpm.pbone.net/index.php3
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/15404498/viewspace-3174221/ ,如需转载,请注明出处,否则将追究法律责任。