安装前准备:
#####################################################################
##第一部分 需调整处置
#####################################################################
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. 网络配置
suse12还不支持 nmcli,15肯定支持了
##查看网络设备的名字
ip addr show
ip link show
#suse12:
cd /etc/sysconfig/network/
sed -i -e 's/192.168.11.151/192.168.11.221/g' ifcfg-eth0
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
#验证连通性
ping 192.168.201.1 -c 4 #private
ping 192.168.11.2 -c 4 #public
3 配置zypper仓库
##suse
mount /dev/sr0 /mnt
##add zypper resource
zypper ar //mnt main
zypper refresh
zypper se ftp
4 安装依赖
#11g安装
##suse12
zypper in binutils gcc gcc-32bit gcc-c++ gcc-c++-32bit glibc glibc-devel ksh libaio libaio-devel libcap1 libstdc++48-devel libstdc++48-devel-32bit libstdc++-devel libstdc++-devel-32bit
zypper se libstdc++ libgcc
zypper in unixODBC unixODBC-devel libstdc++43 libstdc++43-devel libgcc43 make sysstat xorg-x11-libs-32bit xorg-x11-libs xorg-x11-libX11-32bit xorg-x11-libX11
zypper in xorg-x11-libXau-32bit xorg-x11-libXau xorg-x11-libxcb-32bit xorg-x11-libxcb xorg-x11-libXext-32bit xorg-x11-libXext unixODBC unixODBC-devel
需要部分包 可以从 https://rpm.pbone.net/index.php3 下载
##suse11
zypper in binutils gcc gcc-32bit gcc-c++ gcc-c++-32bit glibc glibc-devel ksh libaio libaio-devel libcap1 libstdc++48-devel libstdc++48-devel-32bit libstdc++-devel libstdc++-devel-32bit
zypper se libstdc++ libgcc
zypper in unixODBC unixODBC-devel libstdc++43 libstdc++43-devel libgcc43 make sysstat xorg-x11-libs-32bit xorg-x11-libs xorg-x11-libX11-32bit xorg-x11-libX11
zypper in xorg-x11-libXau-32bit xorg-x11-libXau xorg-x11-libxcb-32bit xorg-x11-libxcb xorg-x11-libXext-32bit xorg-x11-libXext unixODBC unixODBC-devel
5 修改主机名 配置hosts文件
hostnamectl set-hostname racnode1 ##221
hostnamectl set-hostname racnode2 ##222
#修改/etc/hosts
echo "
#Public IP(公司内部访问,非外网)
192.168.11.221 racnode1
192.168.11.222 racnode2
#Private IP(用于节点间心跳网络)
192.168.201.221 racnode1-priv
192.168.201.222 racnode2-priv
#Virtual IP(提供客户端访问,漂移)
192.168.11.223 racnode1-vip
192.168.11.224 racnode2-vip
#SCAN IP(提供客户端访问,均衡)
192.168.11.225 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 多路径
##############配置激活多路径:
##RAC1 RAC2均执行:
#如使用asmlib处理ASM共享磁盘
##suse
zypper in -y device-mapper*
service multipathd status
service multipathd stop
service multipathd start
xxxconfig multipathd on ##xxx修改为"c|h|k" 去掉"|" 涉及敏感词
xxxconfig --list multipathd ##xxx修改为"c|h|k" 去掉"|" 涉及敏感词
ocr_wwid=`/lib/udev/scsi_id -g -u /dev/sdb`
data_wwid=`/lib/udev/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
##suse11
KERNEL=="sd*[!0-9]", SUBSYSTEM=="block", PROGRAM=="/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36000c2992bc80c7eca165b689fbc4b80", NAME="asm_ocr", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*[!0-9]", SUBSYSTEM=="block", PROGRAM=="/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36000c2929120ac6d0ea188d8bf871e11", NAME="asm_data", OWNER="grid", GROUP="asmadmin", MODE="0660"
##查看文件内容
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)
##############关闭防火墙
service SuSEfirewall2_init stop
service SuSEfirewall2_setup stop
xxxconfig SuSEfirewall2_init off ##xxx修改为"c|h|k" 去掉"|" 涉及敏感词
xxxconfig SuSEfirewall2_setup off ##xxx修改为"c|h|k" 去掉"|" 涉及敏感词
##9.selinux 配置(rac01&rac02)
##############selinux 配置(rac01&rac02)
##未安装 忽略
##10.关闭透明大页和NUMA(rac01&rac02)
##suse11 忽略
##11.avahi-daemon 配置禁用(rac01&rac02)
##有些主机安装选择最小化安装,没有安装 avahi-daemon 功能,建议安装之后禁用,防止以后误操作导致出问题:
zypper in -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}'
##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 2097157 ]; then
shmall=2097157
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
EOF
#net.ipv4.conf.eth0.rp_filter = 1 ##suse11 不支持
#net.ipv4.conf.eth1.rp_filter = 2 ##error: "Invalid argument" setting key "net.ipv4.conf.eth0.rp_filter"
##参数 生效
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
##修改用户密码为123
passwd oracle
passwd grid
##查看用户组
id grid
id oracle
##重载udev
/sbin/udevadm trigger --type=devices --action=change
sleep 2
/sbin/udevadm control --reload-rules
sleep 1
ll /dev/asm*
ll /dev/dm*
###注意: /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/
##15、环境变量配置
####################################################################################
##11g环境变量配置
####################################################################################
#####################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
######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
######RAC2: 参考上述RAC1 ORACLE_SID 、HOSTNAME不一样
sed -i -e 's/racdb1/racdb2/g' -e 's/racnode1/racnode2/g' /home/oracle/.bash_profile
###################################################################################################
##进入 数据库安装
##16、重启虚拟机
reboot
##重启后检查禁用大页和numa是否生效:
cat /sys/kernel/mm/transparent_hugepage/enabled
cat /proc/cmdline
##参考步骤12 检查内核参数rp_filter,其中ens32 ens33调整为真实网卡
cat /etc/sysctl.conf|grep rp_filter
##修正后执行生效
sysctl -p
##17、安装介质上传解压(racnode1)
##上传安装介质到 ...(/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
#补丁包:
p6880880_112000_Linux-x86-64-11.2.0.3.47.zip
201020补丁包 或 240716补丁包,详细见step22
解压缩:
##解压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安装(racnode1&racnode2):
##racnode1:
su - root
cd /soft/grid/rpm
rpm -ivh /soft/grid/rpm/cvuqdisk-*.rpm
##传输到节点二安装
scp /soft/grid/rpm/cvuqdisk-*.rpm root@racnode2:~
##racnode2:
rpm -ivh ~/cvuqdisk-*.rpm
配置互信
##遇到个网络问题,与loopback网络有关
suse11sp4 ping自己不通,ping其他同网段的地址通的
在节点racnode1:
traceroute racnode1 ,一直循环不能送给自己
service network restart重启无效,rcnetwork restart
检查发现 回环接口是down ,
racnode1:/etc/sysconfig/network # ip link show
1: lo: <LOOPBACK> mtu 16436 qdisc noop state DOWN
ip link set lo up
racnode1:/etc/sysconfig/network # ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
至此回环ok了
#使用oracle侧自带的互信脚本,执行即可
su - oracle
cd /soft/database/sshsetup
./sshUserSetup.sh -hosts "racnode1 racnode2" -user oracle -advanced ##按照提示2节点 输入4次密码
./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
##grid集群对等验证检查
su - grid
/soft/grid/runcluvfy.sh comp admprv -n racnode1,racnode2 -o user_equiv -sshonly -verbose
##18、静默安装Grid软件
#18.1 准备rsp文件
cat <<EOF > ~grid/grid_11g.rsp
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
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
错误如下:
Result: Swap space check failed
Result: Clock synchronization check using Network Time Protocol(NTP) failed
glibc查看
ldd --version
ldd (GNU libc) 2.11.3
racnode1:~ # uname -a
Linux racnode1 3.0.101-63-default #1 SMP Tue Jun 23 16:02:31 UTC 2015 (4b89d0c) x86_64 x86_64 x86_64 GNU/Linux
racnode1:~ # cat /etc/issue
Welcome to SUSE Linux Enterprise Server 11 SP4 (x86_64) - Kernel \r (\l).
racnode1:~ # cat /etc/os-release
NAME="SLES"
VERSION="11.4"
VERSION_ID="11.4"
PRETTY_NAME="SUSE Linux Enterprise Server 11 SP4"
ID="sles"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles:11:4"
上述的版本 逐个确认,都存在更新的版本,clu脚本识别不出 显示missing,后续安装不影响 忽略
静默安装:
[[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 51992 MB Passed
Checking swap space: must be greater than 150 MB. Actual 2053 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2026-06-19_01-44-54PM. 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_01-44-54PM.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_01-44-54PM.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]$
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.
racnode1:~ # /u01/app/11.2.0/grid/root.sh
Check /u01/app/11.2.0/grid/install/root_racnode1_2026-06-19_13-51-57.log for the output of root script
racnode1:~ #
racnode1:~ # cat /u01/app/11.2.0/grid/install/root_racnode1_2026-06-19_13-51-57.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
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
Adding Clusterware entries to inittab
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 af319f5e2c2f4f58bfd5c294803aec4f.
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 af319f5e2c2f4f58bfd5c294803aec4f (/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
Preparing packages for installation...
cvuqdisk-1.0.9-1
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
##node2
cat /u01/app/11.2.0/grid/install/root_racnode2_2026-06-19_14-04-39.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
OLR initialization - successful
Adding Clusterware entries to inittab
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
#18.4 剩余配置执行
####################################################
##按照提示, 以安装用户的身份执行以下脚本来完成配置
/u01/app/11.2.0/grid/cfgtoollogs/configToolAllCommands RESPONSE_FILE=~/grid_11g.rsp
[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_02-09-11-PM.log
[grid@racnode1:/soft/grid]$ cat /u01/app/11.2.0/grid/cfgtoollogs/oui/configActions2026-06-19_02-09-11-PM.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
###################################################
##ASMCA 忽略
集群检查,查看服务是否有异常状态:
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 执行安装
###################################################
su - oracle
cd /soft/database
./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...
Checking Temp space: must be greater than 120 MB. Actual 48045 MB Passed
Checking swap space: must be greater than 150 MB. Actual 2053 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2026-06-19_02-15-22PM. Please wait ...You can find the log of this install session at:
/u01/app/oraInventory/logs/installActions2026-06-19_02-15-22PM.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_02-15-22PM.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
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_14-24-05.log for the output of root script
racnode1:~ # cat /u01/app/oracle/product/11.2.0/db_1/install/root_racnode1_2026-06-19_14-24-05.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 创建监听
netca -silent \
-responsefile $ORACLE_HOME/assistants/netca/netca.rsp
#21.2 准备rsp文件
cat <<EOF >~oracle/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
chown -R oracle.oinstall ~oracle/dbca_11g.rsp
#21.3 调整模板
$ORACLE_HOME/assistants/dbca/templates/General_Purpose.dbc
#21.4 静默建库
dbca -silent -responseFile ~/dbca_11g.rsp
[oracle@racnode1:/soft/database]$ 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:/soft/database]$ 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.215: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-3174222/ ,如需转载,请注明出处,否则将追究法律责任。