安装包下载路径:链接:https://share.weiyun.com/5PfciYG 密码:521521
删除原有目录
mv /opt/grid/products/12.2.0/OPatch /opt/grid/products/12.2.0/OPatch.bak
mv /opt/oracle/products/12.2.0/OPatch /opt/oracle/products/12.2.0/OPatch.bak
将打补丁工具拖入进去
mkdir /tmp/psu
chmod 777 /tmp/psu
unzip /tmp/p6880880_122010_Linux-x86-64.zip -d /opt/grid/products/12.2.0/
unzip /tmp/p6880880_122010_Linux-x86-64.zip -d /opt/oracle/products/12.2.0/
unzip /tmp/p28662603_122010_Linux-x86-64.zip -d /tmp/psu/
改打补丁工具的权限
chmod -R 777 /tmp/psu/
chown -R grid:oinstall /opt/grid/products/12.2.0/OPatch
chown -R oracle:oinstall /opt/oracle/products/12.2.0/OPatch
检查是否有冲突
su - grid
/opt/oracle/products/12.2.0/OPatch/opatch lsinventory -detail -oh /opt/oracle/products/12.2.0/
安装补丁
su - root
cd /opt/grid/products/12.2.0/OPatch/
export PATH=$PATH:/opt/grid/products/12.2.0/OPatch
opatchauto apply /tmp/psu/28662603/
如果意外会话中断,可执行回滚操作:
su - root
export PATH=$PATH:/opt/grid/products/12.2.0/OPatch
opatchauto rollback /tmp/psu/28662603/
之后再次重复上面安装补丁操作