若已经配置好的需要进行删除
我这里是之前是采用dd if=/var/tmp/.oracle/npohasd of=/dev/null bs=1024 count=1
命令进行启动的,需要停掉has,然后再删除
[root@localhost bin]# cd /u01/grid/grid_home/bin
[root@localhost bin]# ./crsctl stop has
|
[root@localhost bin]# /u01/grid/grid_home/perl/bin/perl -I/u01/grid/grid_home/perl/lib -I/u01/grid/grid_home/crs/install /u01/grid/grid_home/crs/install/roothas.pl -deconfig -force -verbose Using configuration parameter file: /u01/grid/grid_home/crs/install/crsconfig_params CRS-4639: Could not contact Oracle High Availability Services CRS-4000: Command Stop failed, or completed with errors. CRS-4639: Could not contact Oracle High Availability Services CRS-4000: Command Delete failed, or completed with errors. CRS-4544: Unable to connect to OHAS CRS-4000: Command Stop failed, or completed with errors. Successfully deconfigured Oracle Restart stack |
下载补丁需要有metlink账号才能下载
[root@localhost soft]# unzip p18370031_112040_Linux-x86-64.zip
[root@localhost grid_home]# su - grid
[grid@localhost ~]$ cd $ORACLE_HOME
[grid@localhost grid_home]$ cd OPatch/
打补丁的命令需要在grid用户下执行,补丁解压缩的路径可以是root权限账号下的(/soft/18370031)
|
[grid@localhost OPatch]$ ./opatch napply -local /soft/18370031 Oracle Interim Patch Installer version 11.2.0.3.4 Copyright (c) 2012, Oracle Corporation. All rights reserved.
Oracle Home : /u01/grid/grid_home Central Inventory : /u01/grid/oraInventory from : /u01/grid/grid_home/oraInst.loc OPatch version : 11.2.0.3.4 OUI version : 11.2.0.4.0 Log file location : /u01/grid/grid_home/cfgtoollogs/opatch/opatch2020-10-26_02-32-55AM_1.log
Verifying environment and performing prerequisite checks... OPatch continues with these patches: 18370031
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/grid/grid_home‘)
Is the local system ready for patching? [y|n] y User Responded with: Y Backing up files... Applying interim patch ‘18370031‘ to OH ‘/u01/grid/grid_home‘
Patching component oracle.crs, 11.2.0.4.0...
Verifying the update... Patch 18370031 successfully applied. Log file location: /u01/grid/grid_home/cfgtoollogs/opatch/opatch2020-10-26_02-32-55AM_1.log
OPatch succeeded. |
|
[grid@localhost OPatch]$ ./opatch lsinventory Oracle Interim Patch Installer version 11.2.0.3.4 Copyright (c) 2012, Oracle Corporation. All rights reserved.
Oracle Home : /u01/grid/grid_home Central Inventory : /u01/grid/oraInventory from : /u01/grid/grid_home/oraInst.loc OPatch version : 11.2.0.3.4 OUI version : 11.2.0.4.0 Log file location : /u01/grid/grid_home/cfgtoollogs/opatch/opatch2020-10-26_02-38-53AM_1.log
Lsinventory Output file location : /u01/grid/grid_home/cfgtoollogs/opatch/lsinv/lsinventory2020-10-26_02-38-53AM.txt
-------------------------------------------------------------------------------- Installed Top-level Products (1):
Oracle Grid Infrastructure 11g 11.2.0.4.0 There are 1 products installed in this Oracle Home.
Interim patches (1) :
Patch 18370031 : applied on Mon Oct 26 02:34:34 EDT 2020 Unique Patch ID: 17950825 Patch description: "Grid Infrastructure Patch Set Update : 11.2.0.4.x (gibugno)" Created on 15 Aug 2014, 16:14:40 hrs PST8PDT Bugs fixed: 18370031
--------------------------------------------------------------------------------
OPatch succeeded. |
|
[root@localhost grid]# /u01/grid/grid_home/perl/bin/perl -I/u01/grid/grid_home/perl/lib -I/u01/grid/grid_home/crs/install /u01/grid/grid_home/crs/install/roothas.pl Using configuration parameter file: /u01/grid/grid_home/crs/install/crsconfig_params User ignored Prerequisites during installation LOCAL ADD MODE Creating OCR keys for user ‘grid‘, privgrp ‘oinstall‘.. Operation successful. LOCAL ONLY MODE Successfully accumulated necessary OCR keys. Creating OCR keys for user ‘root‘, privgrp ‘root‘.. Operation successful. CRS-4664: Node localhost successfully pinned. Adding Clusterware entries to oracle-ohasd.service
localhost 2020/10/26 02:42:52 /u01/grid/grid_home/cdata/localhost/backup_20201026_024252.olr Successfully configured Oracle Grid Infrastructure for a Standalone Server |
这个时候就不需要使用dd命令,has就可以自动启动了
[root@localhost grid]# cd /u01/grid/grid_home/bin
[root@localhost bin]# ./crsctl check has
CRS-4638: Oracle High Availability Services is online
[root@localhost bin]# ./crsctl check evm
CRS-4533: Event Manager is online
[root@localhost bin]# ./crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora.cssd ora.cssd.type 0/5 0/5 OFFLINE OFFLINE
ora.diskmon ora....on.type 0/10 0/5 OFFLINE OFFLINE
ora.evmd ora.evm.type 0/10 0/5 ONLINE ONLINE localhost
ora.ons ora.ons.type 0/3 0/ OFFLINE OFFLINE
系统重启动后,has也会自动启动,
原文:https://www.cnblogs.com/hxlasky/p/13878600.html