准备补丁包
mkdir /tmp/psu
上传补丁包
备份原有目录
mv /opt/grid/products/11.2.0/OPatch /opt/grid/products/11.2.0/OPatch_bpx
mv /opt/oracle/products/11.2.0/OPatch /opt/oracle/products/11.2.0/OPatch_bpx
解压
unzip p6880880_112000_Linux-x86-64.zip -d /opt/grid/products/11.2.0/
unzip p6880880_112000_Linux-x86-64.zip -d /opt/oracle/products/11.2.0/
修改属组和权限
chown -R grid.oinstall /opt/grid/products/11.2.0/OPatch
chown -R oracle.oinstall /opt/oracle/products/11.2.0/OPatch
chmod -R 777 /opt/grid/products/11.2.0/OPatch
chmod -R 777 /opt/oracle/products/11.2.0/OPatch
检查目录权限
ls -ld /opt/oracle/products/11.2.0/OPatch
ls -ld /opt/grid/products/11.2.0/OPatch
检查opatch 版本
su - grid -c "opatch version"
su - oracle -c "opatch version"
修改属组和权限
unzip /tmp/p31718723_112040_Linux-x86-64.zip -d /tmp/psu
chown -R grid.oinstall /tmp/psu/31718723
chmod -R 777 /tmp/psu/31718723
可选操作-检测补丁冲突
opatch prereq CheckActiveFilesAndExecutables -phBaseDir /tmp/psu/31718723
可选操作-关库
srvctl stop database -d orcl -o immediate
srvctl status database -d orcl
关库后检测会有failed,可忽略
opatch prereq CheckActiveFilesAndExecutables -phBaseDir /tmp/psu/31718723
自动打grid和oracle补丁
su - grid
su root
export PERL5LIB=/opt/grid/products/11.2.0/perl/lib
opatch auto /tmp/psu/3171872
大概20分钟搞定!!!
检查补丁版本
su - grid -c "opatch lspatches"
su - oracle -c "opatch lspatches"
|