This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
在 OL7.2 上安装 Oracle RAC 11.2.0.4.0 for Linux x86_64-打 PSU 19404309 18370031-更新版
2.4.5.1 Oracle ODBC Drivers ................................................................................................................................................................................................ 6 2.8 Installing the cvuqdisk Package for Linux ............................................................................................................................................................................... 6
RAM Swap Space Between 1 GB and 2 GB 1.5 times the size of the RAM Between 2 GB and 16 GB Equal to the size of the RAM More than 16 GB 16 GB
2.3.3 Disk Space Requirements
The following are the disk space requirements for installing Oracle Database 11g Release 2 (11.2): 1 GB of space in the /tmp directory The following tables describe the disk space requirements for software files and data files for each installation type on Linux x86-64: Installation Type Requirement for Software Files (GB) Enterprise Edition 4.7 Installation Type Disk Space for Data Files (GB) Enterprise Edition 1.7 Starting with Oracle Database 11g Release 2 (11.2.0.4), Oracle Linux 7 and Red Hat Enterprise Linux 7 are supported on Linux x86-64.
2.4.3 Package Requirements
Oracle Database Package Requirements for Linux x86-64 Oracle Linux 7 and Red Hat Enterprise Linux 7 The following packages (or later versions) must be installed: binutils-2.23.52.0.1-12.el7.x86_64 compat-libcap1-1.10-3.el7.x86_64 compat-libstdc++-33-3.2.3-71.el7.i686 compat-libstdc++-33-3.2.3-71.el7.x86_64
To use ODBC on Linux x86-64, the following additional ODBC RPMs are required: On Oracle Linux 7, and Red Hat Enterprise Linux 7: unixODBC-2.3.1-6.el7.x86_64 or later unixODBC-2.3.1-6.el7.i686 or later unixODBC-devel-2.3.1-6.el7.x86_64 or later unixODBC-devel-2.3.1-6.el7.i686 or later
2.8 Installing the cvuqdisk Package for Linux
# rpm -iv cvuqdisk-1.0.9-1.rpm
二、Linux 系统的几个级别
为了让 Linux 系统在启动后能直接进入到控制台字符操作模式,我们可以配置/etc/inittab 文件。更改 id:5: initdefault:这一行为 id:3:initdefault:后重新启
动系统即可。我们看到,简简单单地将 5 改为 3,就能实现启动时直接进入 X-Window 图形操作界面或控制台字符操作界面的转换,这是因为 Linux 操作
系统有六种不同的运行级别(见/etc/inittab 文件中描述),在不同的运行级下,系统有着不同的状态,这六种运行级分别为: # Default runlevel. The runlevels used by RHS are: # 0 - halt (Do NOT set initdefault to this)
6 / 120
# 1 - Single user mode # 2 - Multiuser, without NFS (The same as 3, if you do not have networking) # 3 - Full multiuser mode # 4 - unused # 5 - X11 # 6 - reboot (Do NOT set initdefault to this) #
三、安装 RAC
1. 用 VirtualBox 安装 Oracle Linux 7.2 For Linux x86_64 的过程此处省略,这里有几点需要注意一下
[root@adccrac1 ~]# yum grouplist Loaded plugins: ulninfo There is no installed groups file. Maybe run: yum groups mark convert (see man yum) Available Environment Groups: Minimal Install Infrastructure Server File and Print Server Basic Web Server Virtualization Host Server with GUI <<== 安装这个软件包的组 Available Groups: Compatibility Libraries Console Internet Tools Development Tools Graphical Administration Tools Legacy UNIX Compatibility Scientific Support Security Tools Smart Card Support System Administration Tools System Management Done
[root@adccrac1 ~]# vncserver You will require a password to access your desktops. Password: <<== 输入 adccrac Verify: <<== 输入 adccrac xauth: file /root/.Xauthority does not exist New 'adccrac1:1 (root)' desktop is adccrac1:1 Creating default startup script /root/.vnc/xstartup Starting applications specified in /root/.vnc/xstartup
During the Oracle Grid Infrastructure installation, you must apply patch 18370031 before configuring the software that is installed. The timing of applying the patch is important and is described in detail in the Note 1951613.1 on My Oracle Support. This patch ensures that the clusterware stack is configured to use systemd for clusterware processes, as Oracle Linux 7 uses systemd for all services.
This issue is tracked with Oracle bug 18370031, which was logged for release 12.1.0.2, but the patch is for release 11.2.0.4.
所以,在步骤 27 当中的 VNC 桌面窗口 打开一个 terminal 窗口,切换到 grid 用户 执行下面的命令 [grid@adccrac1 grid]$ ./runInstaller Starting Oracle Universal Installer... Checking Temp space: must be greater than 120 MB. Actual 39216 MB Passed Checking swap space: must be greater than 150 MB. Actual 4991 MB Passed Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed Preparing to launch Oracle Universal Installer from /tmp/OraInstall2018-08-22_10-43-34AM. Please wait ...[grid@adccrac1 grid]$ 弹出图形界面 在第二个界面时,选择第四个选项,只安装 GI 软件 最后弹出 执行 2 个脚本的对话框 这里,实际上 grid 软件只安装到节点 1,只在节点 1 上执行:
42 / 120
# /app/oraInventory/orainstRoot.sh # /app/11.2.0/grid/root.sh [root@adccrac1 ~]# /app/oraInventory/orainstRoot.sh Changing permissions of /app/oraInventory. Adding read,write permissions for group. Removing read,write,execute permissions for world. Changing groupname of /app/oraInventory to oinstall. The execution of the script is complete. [root@adccrac1 ~]# [root@adccrac1 ~]# /app/11.2.0/grid/root.sh Performing root user operation for Oracle 11g The following environment variables are set as: ORACLE_OWNER= grid ORACLE_HOME= /app/11.2.0/grid Enter the full pathname of the local bin directory: [/usr/local/bin]: Copying dbhome to /usr/local/bin ... Copying oraenv to /usr/local/bin ... Copying coraenv to /usr/local/bin ... Creating /etc/oratab file...
43 / 120
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. To configure Grid Infrastructure for a Stand-Alone Server run the following command as the root user: /app/11.2.0/grid/perl/bin/perl -I/app/11.2.0/grid/perl/lib -I/app/11.2.0/grid/crs/install /app/11.2.0/grid/crs/install/roothas.pl To configure Grid Infrastructure for a Cluster execute the following command: /app/11.2.0/grid/crs/config/config.sh This command launches the Grid Infrastructure Configuration Wizard. The wizard also supports silent operation, and the parameters can be passed through the response file that is available in the installation media. [root@adccrac1 ~]#
29. 给 GI 软件 打 PSU 补丁 18370031
以下操作只需要在节点 1 上完成,节点 2 上还没有 grid 软件
(1) 更新 Opatch 工具
[root@adccrac1 ~]# ls -ld /app/11.2.0/grid/ drwxrwxr-x 57 grid oinstall 4096 Aug 22 10:52 /app/11.2.0/grid/
OCM Installation Response Generator 10.3.7.0.0 - Production Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. Provide your email address to be informed of security issues, install and initiate Oracle Configuration Manager. Easier for you if you use your My Oracle Support Email address/User Name. Visit http://www.oracle.com/support/policies.html for details. Email address/User Name: 回车 You have not provided an email address for notification of security issues. Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]: Y The OCM configuration response file (ocm.rsp) was successfully created. [grid@adccrac1 18370031]$ $ORACLE_HOME/OPatch/opatch apply /tmp/18370031/ -oh $ORACLE_HOME -ocmrf /tmp/ocm.rsp Oracle Interim Patch Installer version 11.2.0.3.19 Copyright (c) 2018, Oracle Corporation. All rights reserved. Oracle Home : /app/11.2.0/grid Central Inventory : /app/oraInventory from : /app/11.2.0/grid/oraInst.loc OPatch version : 11.2.0.3.19 OUI version : 11.2.0.4.0 Log file location : /app/11.2.0/grid/cfgtoollogs/opatch/opatch2018-08-22_11-22-53AM_1.log Verifying environment and performing prerequisite checks...
46 / 120
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 = '/app/11.2.0/grid') Is the local system ready for patching? [y|n] y User Responded with: Y Backing up files... Applying interim patch '18370031' to OH '/app/11.2.0/grid' Patching component oracle.crs, 11.2.0.4.0... Patch 18370031 successfully applied. Log file location: /app/11.2.0/grid/cfgtoollogs/opatch/opatch2018-08-22_11-22-53AM_1.log OPatch succeeded. [grid@adccrac1 18370031]$ [grid@adccrac1 18370031]$ $ORACLE_HOME/OPatch/opatch lsinventory Oracle Interim Patch Installer version 11.2.0.3.19 Copyright (c) 2018, Oracle Corporation. All rights reserved.
47 / 120
Oracle Home : /app/11.2.0/grid Central Inventory : /app/oraInventory from : /app/11.2.0/grid/oraInst.loc OPatch version : 11.2.0.3.19 OUI version : 11.2.0.4.0 Log file location : /app/11.2.0/grid/cfgtoollogs/opatch/opatch2018-08-22_11-26-48AM_1.log Lsinventory Output file location : /app/11.2.0/grid/cfgtoollogs/opatch/lsinv/lsinventory2018-08-22_11-26-48AM.txt -------------------------------------------------------------------------------- Local Machine Information:: Hostname: adccrac1 ARU platform id: 226 ARU platform description:: Linux x86-64 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 Wed Aug 22 11:25:38 CST 2018
48 / 120
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. [grid@adccrac1 18370031]$
Arg:26:oracle_install_OSDBA=oinstall: Arg:27:oracle_install_OSOPER=dba: Arg:28:CLUSTER_NODES={adccrac1,adccrac2}: Arg:29:LOCAL_NODE=adccrac1: Arg:30:CRS=TRUE: Arg:31:-ignoreSysPrereqs: Arg:32:-debug: Arg:33:-silent: Arg:34:-noConfig: Arg:35:-nowait: ------------------------------------------------------- Initializing Java Virtual Machine from /tmp/OraInstall2018-08-22_12-37-03PM/jre/bin/java. Please wait... Oracle Universal Installer, Version 11.2.0.4.0 Production Copyright (C) 1999, 2013, Oracle. All rights reserved. You can find the log of this install session at: /app/oraInventory/logs/cloneActions2018-08-22_12-37-03PM.log .................................................................................................[main] [ 2018-08-22 12:37:34.621 CST ] [QueryCluster.<init>:56] No Cluster detected [main] [ 2018-08-22 12:37:34.633 CST ] [QueryCluster.isCluster:65] Cluster existence check = false ... 100% Done. Installation in progress (Wednesday, August 22, 2018 12:37:41 PM CST) ..................................................................... 69% Done. Install successful
53 / 120
Linking in progress (Wednesday, August 22, 2018 12:37:49 PM CST) Link successful Setup in progress (Wednesday, August 22, 2018 12:39:14 PM CST) ................ 100% Done. Setup successful End of install phases.(Wednesday, August 22, 2018 12:39:53 PM CST) WARNING: The following configuration scripts need to be executed as the "root" user in each new cluster node. Each script in the list below is followed by a list of nodes. /app/11.2.0/grid/root.sh #On nodes adccrac1 To execute the configuration scripts: 1. Open a terminal window 2. Log in as "root" 3. Run the scripts in each cluster node Run the script on the local node first. After successful completion, you can run the script in parallel on all the other nodes. The cloning of Ora11g_gridinfrahome1 was successful. Please check '/app/oraInventory/logs/cloneActions2018-08-22_12-37-03PM.log' for more details. copying /app/oraInventory/logs/cloneActions2018-08-22_12-37-03PM.log to /app/11.2.0/grid/cfgtoollogs/oui/cloneActions2018-08-22_12-37-03PM.log copying /app/oraInventory/logs/oraInstall2018-08-22_12-37-03PM.out to /app/11.2.0/grid/cfgtoollogs/oui/oraInstall2018-08-22_12-37-03PM.out copying /app/oraInventory/logs/oraInstall2018-08-22_12-37-03PM.err to /app/11.2.0/grid/cfgtoollogs/oui/oraInstall2018-08-22_12-37-03PM.err copying /app/oraInventory/logs/silentInstall2018-08-22_12-37-03PM.log to /app/11.2.0/grid/cfgtoollogs/oui/silentInstall2018-08-22_12-37-03PM.log 配置完成执行:# /app/11.2.0/grid/root.sh
54 / 120
[root@adccrac1 ~]# /app/11.2.0/grid/root.sh Check /app/11.2.0/grid/install/root_adccrac1_2018-08-22_12-45-00.log for the output of root script [root@adccrac1 ~]# cat /app/11.2.0/grid/install/root_adccrac1_2018-08-22_12-45-00.log Performing root user operation for Oracle 11g The following environment variables are set as: ORACLE_OWNER= grid ORACLE_HOME= /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. To configure Grid Infrastructure for a Stand-Alone Server run the following command as the root user: /app/11.2.0/grid/perl/bin/perl -I/app/11.2.0/grid/perl/lib -I/app/11.2.0/grid/crs/install /app/11.2.0/grid/crs/install/roothas.pl To configure Grid Infrastructure for a Cluster execute the following command: /app/11.2.0/grid/crs/config/config.sh This command launches the Grid Infrastructure Configuration Wizard. The wizard also supports silent operation, and the parameters can be passed through the
55 / 120
response file that is available in the installation media. [root@adccrac1 ~]# 节点 2: [root@adccrac2 ~]# cd /app/oraInventory/ [root@adccrac2 oraInventory]# rm -rf * [root@adccrac2 oraInventory]# su - grid Last login: Wed Aug 22 11:15:37 CST 2018 on pts/3 [grid@adccrac2~]$ [grid@adccrac2 ~]$ cd $ORACLE_HOME/clone/bin [grid@adccrac2 bin]$ perl clone.pl -silent -debug ORACLE_BASE=/app/grid ORACLE_HOME=/app/11.2.0/grid ORACLE_HOME_NAME=Ora11g_gridinfrahome1 INVENTORY_LOCATION=/app/oraInventory OSDBA_GROUP=oinstall OSOPER_GROUP=dba -O'"CLUSTER_NODES={adccrac1,adccrac2}"' -O'"LOCAL_NODE=adccrac2"' CRS=TRUE -ignoreSysPrereqs 执行过程和节点一的相同,此处省略…… 配置完成执行:# /app/11.2.0/grid/root.sh
(3) 进行 Cluster 配置
根据上一步,最后日志的提示: 如果是要配置单节点的 RAC,需要在 root 用户下执行:
56 / 120
/app/11.2.0/grid/perl/bin/perl -I/app/11.2.0/grid/perl/lib -I/app/11.2.0/grid/crs/install /app/11.2.0/grid/crs/install/roothas.pl 如果是要配置集群,需要执行在 grid 用户下执行: /app/11.2.0/grid/crs/config/config.sh 这里先选择配置单节点的 RAC,看是什么提示? [grid@adccrac1 ~]$ /app/11.2.0/grid/perl/bin/perl -I/app/11.2.0/grid/perl/lib -I/app/11.2.0/grid/crs/install /app/11.2.0/grid/crs/install/roothas.pl You must be logged in as root to run this script. Log in as root and rerun this script. 2018-08-22 12:59:20: Not running as authorized user Insufficient privileges to execute this script [root@adccrac1 grid]# /app/11.2.0/grid/perl/bin/perl -I/app/11.2.0/grid/perl/lib -I/app/11.2.0/grid/crs/install /app/11.2.0/grid/crs/install/roothas.pl Using configuration parameter file: /app/11.2.0/grid/crs/install/crsconfig_params User ignored Prerequisites during installation The oracle binary is currently linked with RAC enabled. Please execute the following steps to relink oracle binary and rerun the command with RAC disabled: setenv ORACLE_HOME <oracle_restart_home> cd <oracle_restart_home>/rdbms/lib make -f ins_rdbms.mk rac_off ioracle 现在选择集群的 RAC,
经过一系列的配置,最后在 15%的进度条时,弹出 执行脚本 /app/11.2.0/grid/root.sh 的对话框 [root@adccrac1 ~]# /app/11.2.0/grid/root.sh Check /app/11.2.0/grid/install/root_adccrac1_2018-08-22_13-11-02.log for the output of root script [root@adccrac1 ~]# tail -f /app/11.2.0/grid/install/root_adccrac1_2018-08-22_13-11-02.log 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. Relinking oracle with rac_on option Using configuration parameter file: /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
71 / 120
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 oracle-ohasd.service <<== 当出现这一行信息时,打开另一个 session 窗口,查看 CRS-2672: Attempting to start 'ora.mdnsd' on 'adccrac1' CRS-2676: Start of 'ora.mdnsd' on 'adccrac1' succeeded CRS-2672: Attempting to start 'ora.gpnpd' on 'adccrac1' CRS-2676: Start of 'ora.gpnpd' on 'adccrac1' succeeded CRS-2672: Attempting to start 'ora.cssdmonitor' on 'adccrac1' CRS-2672: Attempting to start 'ora.gipcd' on 'adccrac1' CRS-2676: Start of 'ora.cssdmonitor' on 'adccrac1' succeeded CRS-2676: Start of 'ora.gipcd' on 'adccrac1' succeeded CRS-2672: Attempting to start 'ora.cssd' on 'adccrac1' CRS-2672: Attempting to start 'ora.diskmon' on 'adccrac1' CRS-2676: Start of 'ora.diskmon' on 'adccrac1' succeeded CRS-2676: Start of 'ora.cssd' on 'adccrac1' succeeded
72 / 120
ASM created and started successfully. Disk Group OCRVOTE 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 6742c5d7880c4fd2bf2301e08582435b. Successfully replaced voting disk group with +OCRVOTE. CRS-4256: Updating the profile CRS-4266: Voting file(s) successfully replaced ## STATE File Universal Id File Name Disk group --- -------- --------------------------------------------------- --------------------------- --------------- 1. ONLINE 6742c5d7880c4fd2bf2301e08582435b (/dev/asm-ocrvote1) [OCRVOTE] Located 1 voting disk(s). CRS-2672: Attempting to start 'ora.asm' on 'adccrac1' CRS-2676: Start of 'ora.asm' on 'adccrac1' succeeded CRS-2672: Attempting to start 'ora.OCRVOTE.dg' on 'adccrac1' CRS-2676: Start of 'ora.OCRVOTE.dg' on 'adccrac1' succeeded Configure Oracle Grid Infrastructure for a Cluster ... succeeded [root@adccrac1 ~]# ls -ld /etc/init.d/* -rw-r--r--. 1 root root 13948 Sep 16 2015 /etc/init.d/functions
[grid@adccrac1 ~]$ srvctl status listener Listener LISTENER is enabled Listener LISTENER is running on node(s): adccrac2,adccrac1 [grid@adccrac1 ~]$ [grid@adccrac1 ~]$ srvctl status asm -a ASM is running on adccrac2,adccrac1 ASM is enabled. [grid@adccrac1 ~]$ [grid@adccrac1 ~]$ ocrcheck Status of Oracle Cluster Registry is as follows : Version : 3 Total space (kbytes) : 262120 Used space (kbytes) : 2644 Available space (kbytes) : 259476 ID : 1449608842 Device/File Name : +OCRVOTE Device/File integrity check succeeded Device/File not configured Device/File not configured Device/File not configured Device/File not configured
78 / 120
Cluster registry integrity check succeeded Logical corruption check bypassed due to non-privileged user [grid@adccrac1 ~]$ [grid@adccrac1 ~]$ crsctl query css votedisk ## STATE File Universal Id File Name Disk group --- -------- --------------------------------------------------- --------------------------- --------------- 1. ONLINE 6742c5d7880c4fd2bf2301e08582435b (/dev/asm-ocrvote1) [OCRVOTE] Located 1 voting disk(s).
79 / 120
32. 通过 asmca 命令 创建 ASM 磁盘的 data back arch 3 个磁盘组(只在节点一上做)
80 / 120
81 / 120
82 / 120
83 / 120
84 / 120
33. 安装 DB (只在节点一上做) 只安装软件,不建库
(1) 对 db 软件 打补丁 19404309
[root@adccrac1 ~]# su - oracle Last login: Wed Aug 22 13:05:07 CST 2018 on pts/0 [oracle@adccrac1 ~]$ [oracle@adccrac1 ~]$ cd /tmp/b19404309/ [oracle@adccrac1 b19404309]$ cp database/cvu_prereq.xml ~/database/stage/cvu/
(2) 安装
[root@adccrac1 ~]# su - oracle Last login: Wed Aug 22 13:32:35 CST 2018 on pts/5 [oracle@adccrac1 ~]$ [oracle@adccrac1 ~]$ cd database/ [oracle@adccrac1 database]$ ls -lrht total 48K …… -rwxr-xr-x 1 oracle oinstall 3.2K Aug 27 2013 runInstaller …… [oracle@adccrac1 database]$ ./runInstaller 到 56%的进度条时,弹出一个报错对话框
85 / 120
这个问题是 Bug 19692824,参考 Installation of Oracle 11.2.0.4 Database Software on OL7 fails with “undefined reference to symbol ‘B_DestroyKeyObject’” error (文档 ID 1965691.1)。Oracle 建议 Ignore,安装完后打 Patch 19692824。其实不用,另开一个窗口,或者 直接修改 ins_emagent.mk 文件
先安装 PSU 18370031 [oracle@adccrac1 ~]$ $ORACLE_HOME/OPatch/opatch apply /tmp/18370031/ -oh $ORACLE_HOME -ocmrf /tmp/ocm.rsp Oracle Interim Patch Installer version 11.2.0.3.19 Copyright (c) 2018, Oracle Corporation. All rights reserved. Oracle Home : /app/oracle/product/11.2.0/db_1 Central Inventory : /app/oraInventory from : /app/oracle/product/11.2.0/db_1/oraInst.loc OPatch version : 11.2.0.3.19 OUI version : 11.2.0.4.0 Log file location : /app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2018-08-22_14-20-55PM_1.log Verifying environment and performing prerequisite checks... UtilSession failed: Patch 18370031 requires component(s) that are not installed in OracleHome. These not-installed components are oracle.crs:11.2.0.4.0, Log file location: /app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2018-08-22_14-20-55PM_1.log OPatch failed with error code 73 [oracle@adccrac1 ~]$ $ORACLE_HOME/OPatch/opatch apply /tmp/18370031/custom/server/18370031/ -oh $ORACLE_HOME -ocmrf /tmp/ocm.rsp Oracle Interim Patch Installer version 11.2.0.3.19 Copyright (c) 2018, Oracle Corporation. All rights reserved.
89 / 120
Oracle Home : /app/oracle/product/11.2.0/db_1 Central Inventory : /app/oraInventory from : /app/oracle/product/11.2.0/db_1/oraInst.loc OPatch version : 11.2.0.3.19 OUI version : 11.2.0.4.0 Log file location : /app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2018-08-22_14-25-45PM_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 = '/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 '18370031' to OH '/app/oracle/product/11.2.0/db_1'
90 / 120
Patching component oracle.rdbms, 11.2.0.4.0... Patch 18370031 successfully applied. Log file location: /app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2018-08-22_14-25-45PM_1.log OPatch succeeded. [oracle@adccrac1 ~]$ $ORACLE_HOME/OPatch/opatch lsinventory Oracle Interim Patch Installer version 11.2.0.3.19 Copyright (c) 2018, Oracle Corporation. All rights reserved. Oracle Home : /app/oracle/product/11.2.0/db_1 Central Inventory : /app/oraInventory from : /app/oracle/product/11.2.0/db_1/oraInst.loc OPatch version : 11.2.0.3.19 OUI version : 11.2.0.4.0 Log file location : /app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2018-08-22_14-28-16PM_1.log Lsinventory Output file location : /app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2018-08-22_14-28-16PM.txt -------------------------------------------------------------------------------- Local Machine Information:: Hostname: adccrac1 ARU platform id: 226 ARU platform description:: Linux x86-64
91 / 120
Installed Top-level Products (1): Oracle Database 11g 11.2.0.4.0 There are 1 products installed in this Oracle Home. Interim patches (1) : Patch 18370031 : applied on Wed Aug 22 14:27:38 CST 2018 Unique Patch ID: 17950825 Patch description: "Grid Infrastructure Patch Set Update : 11.2.0.4.x (gibugno)" Created on 15 Aug 2014, 16:14:32 hrs PST8PDT Bugs fixed: 18370031 -------------------------------------------------------------------------------- OPatch succeeded. 再安装 PSU 23274134 使用 grid 用户解压
92 / 120
[grid@adccrac1 ~]$ unzip -q /software/p23274134_112040_Linux-x86-64.zip -d /tmp/ replace /tmp/PatchSearch.xml? [y]es, [n]o, [A]ll, [N]one, [r]ename: y [root@adccrac1 tmp]# ls -lrht total 272K drwxr-xr-x 6 grid oinstall 87 Aug 14 2014 b19404309 -rw-r--r-- 1 grid oinstall 267 Aug 16 2014 bundle.xml -rw-r--r-- 1 grid oinstall 50K Aug 16 2014 README.txt -rw-r--r-- 1 grid oinstall 90K Aug 16 2014 README.html drwxr-xr-x 5 grid oinstall 41 Aug 16 2014 18370031 drwxr-xr-x 5 grid oinstall 125 Jul 16 2016 23274134 <<== 这个补丁目录 -rw-rw-r-- 1 grid oinstall 109K Jul 20 2016 PatchSearch.xml drwxr-xr-x 2 grid oinstall 6 Aug 22 10:43 logs -rw-r--r-- 1 grid oinstall 621 Aug 22 11:14 ocm.rsp drwxr-xr-x 2 grid oinstall 54 Aug 22 12:22 Logs drwxr-xr-x 2 root root 6 Aug 22 13:19 hsperfdata_root drwxr-xr-x 3 grid oinstall 4.0K Aug 22 13:21 CVU_11.2.0.4.0_grid drwxr-xr-x 2 grid oinstall 18 Aug 22 13:24 hsperfdata_grid drwxr-xr-x 3 oracle oinstall 4.0K Aug 22 13:42 CVU_11.2.0.4.0_oracle drwxr-xr-x 2 oracle oinstall 6 Aug 22 14:28 hsperfdata_oracle [grid@adccrac1 ~]$ $ORACLE_HOME/OPatch/ocm/bin/emocmrsp -output /tmp/23274134/ocm.rsp OCM Installation Response Generator 10.3.7.0.0 - Production Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
93 / 120
Provide your email address to be informed of security issues, install and initiate Oracle Configuration Manager. Easier for you if you use your My Oracle Support Email address/User Name. Visit http://www.oracle.com/support/policies.html for details. Email address/User Name: 回车 You have not provided an email address for notification of security issues. Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]: y The OCM configuration response file (/tmp/23274134/ocm.rsp) was successfully created. [root@adccrac1 23274134]# ls -lrht total 152K drwxr-xr-x 5 grid oinstall 58 Feb 17 2016 22502505 drwxrwxr-x 13 grid oinstall 4.0K Jun 16 2016 23054359 -rw-rw-r-- 1 grid oinstall 71K Jun 28 2016 PatchSearch.xml drwxr-xr-x 5 grid oinstall 58 Jul 16 2016 23054319 -rw-r--r-- 1 grid oinstall 549 Jul 16 2016 bundle.xml -rw-rw-r-- 1 grid oinstall 63K Jul 19 2016 README.html -rw-rw-r-- 1 grid oinstall 24 Jul 19 2016 README.txt -rw-r--r-- 1 grid oinstall 621 Aug 22 14:53 ocm.rsp <<== 刚刚生成的 ocm.rsp 文件 检查补丁冲突 [grid@adccrac1 ~]$ opatch prereq CheckConflictAgainstOHWithDetail -ph /tmp/23274134/ Oracle Interim Patch Installer version 11.2.0.3.19 Copyright (c) 2018, Oracle Corporation. All rights reserved.
94 / 120
PREREQ session Oracle Home : /app/11.2.0/grid Central Inventory : /app/oraInventory from : /app/11.2.0/grid/oraInst.loc OPatch version : 11.2.0.3.19 OUI version : 11.2.0.4.0 Log file location : /app/11.2.0/grid/cfgtoollogs/opatch/opatch2018-08-22_17-24-30PM_1.log Invoking prereq "checkconflictagainstohwithdetail" Prereq "checkConflictAgainstOHWithDetail" passed. OPatch succeeded. 在 grid 用户下 使用 opatch auto 命令 自动 打 PSU 23274134 [grid@adccrac1 ~]$ su Password: [root@adccrac1 grid]# $ORACLE_HOME/OPatch/opatch auto /tmp/23274134/ -ocmrf /tmp/23274134/ocm.rsp Executing /app/11.2.0/grid/perl/bin/perl /app/11.2.0/grid/OPatch/crs/patch11203.pl -patchdir /tmp -patchn 23274134 -ocmrf /tmp/23274134/ocm.rsp -paramfile /app/11.2.0/grid/crs/install/crsconfig_params This is the main log file: /app/11.2.0/grid/cfgtoollogs/opatchauto2018-08-22_14-56-13.log
95 / 120
This file will show your detected configuration and all the steps that opatchauto attempted to do on your system: /app/11.2.0/grid/cfgtoollogs/opatchauto2018-08-22_14-56-13.report.log 2018-08-22 14:56:13: Starting Clusterware Patch Setup Using configuration parameter file: /app/11.2.0/grid/crs/install/crsconfig_params Stopping CRS... Stopped CRS successfully patch /tmp/23274134/23054359 apply successful for home /app/11.2.0/grid patch /tmp/23274134/23054319 apply successful for home /app/11.2.0/grid patch /tmp/23274134/22502505 apply successful for home /app/11.2.0/grid Starting CRS... Installing Trace File Analyzer 最后,查看 PSU 补丁信息 [grid@adccrac1 ~]$ opatch lspatches 22502505;ACFS Patch Set Update : 11.2.0.4.160419 (22502505) 23054319;OCW Patch Set Update : 11.2.0.4.160719 (23054319) 23054359;Database Patch Set Update : 11.2.0.4.160719 (23054359) OPatch succeeded.
96 / 120
35. 使用 DBCA 命令 在节点一,创建 RAC 数据库 racdb
97 / 120
98 / 120
99 / 120
100 / 120
101 / 120
102 / 120
103 / 120
104 / 120
105 / 120
106 / 120
107 / 120
108 / 120
109 / 120
110 / 120
111 / 120
112 / 120
113 / 120
114 / 120
115 / 120
36. 设置归档目录,并重启数据库到 mount 状态,打开归档模式,最后打开数据库
[oracle@adccrac1 ~]$ sqlplus / as sysdba SQL> alter system set log_archive_dest_1='location=+ARCH'; System altered. 在 节点一 和 节点二 上查看,已经发现 归档目录 已经设置好 NAME TYPE VALUE ------------------------------------ ---------------------- --------------------------------------- log_archive_dest_1 string location=+ARCH 现在关闭数据库,依次在两个节点上 进行操作,确保 整个集群 数据库 正常关闭 节点一, SQL> shutdown immediate; 节点二, SQL> shutdown immediate; 在节点一,启动数据库到 mount 状态,开启归档模式,最后正常打开数据库 SQL> startup mount; SQL> archive log list; SQL> alter database archivelog; SQL> archive log list;
116 / 120
SQL> alter database open; 此时,在节点二上 直接打开数据库 SQL> startup;