11 g rac 安裝 12步

tom_xieym發表於2011-08-05

十二. 安裝oracle 11g 軟體
安裝oracle 11g 軟體也很簡單,按照如下圖示操作即可
 
 
 
按圖示要求以root分別在兩node執行
[root@wmrac01 ~]# /u01/product/oracle/11.2.0/db_1/root.sh
Running Oracle 11g root.sh script...
The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/product/oracle/11.2.0/db_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y
   Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y
   Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y
   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.sh script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
指令碼執行完後,按OK進入下一步
  
選擇Close完成安裝.
Apply patch
wmrac01$/u01/product/oracle/11.2.0/db_1/OPatch/opatch version
Invoking OPatch 11.1.0.6.6
OPatch Version: 11.1.0.6.6
OPatch succeeded.
wmrac01$cd $ORACLE_HOME
wmrac01$whoami
oracle
wmrac01$tar zcvf OPatch_`date +Y%m%d`.tar.gz OPatch
wmrac01$cd /u01/packages/
wmrac01$unzip p6880880_x86_64.zip -d $ORACLE_HOME
wmrac01$$ORACLE_HOME/OPatch/opatch version
Invoking OPatch 11.2.0.1.3
OPatch Version: 11.2.0.1.3
OPatch succeeded.
wmrac01$$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./9352237
Invoking OPatch 11.2.0.1.3
Oracle Interim Patch Installer version 11.2.0.1.3
Copyright (c) 2010, Oracle Corporation.  All rights reserved.
PREREQ session
Oracle Home       : /u01/product/oracle/11.2.0/db_1
Central Inventory : /u01/product/grid/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 11.2.0.1.3
OUI version       : 11.2.0.1.0
OUI location      : /u01/product/oracle/11.2.0/db_1/oui
Log file location : /u01/product/oracle/11.2.0/db_1/cfgtoollogs/opatch/opatch2011-03-01_13-45-29PM.log
Patch history file: /u01/product/oracle/11.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
wmrac01$cd 9352237/
wmrac01$$ORACLE_HOME/OPatch/opatch apply
Invoking OPatch 11.2.0.1.3
Oracle Interim Patch Installer version 11.2.0.1.3
Copyright (c) 2010, Oracle Corporation.  All rights reserved.
Oracle Home       : /u01/product/oracle/11.2.0/db_1
Central Inventory : /u01/product/grid/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 11.2.0.1.3
OUI version       : 11.2.0.1.0
OUI location      : /u01/product/oracle/11.2.0/db_1/oui
Log file location : /u01/product/oracle/11.2.0/db_1/cfgtoollogs/opatch/opatch2011-03-01_13-48-59PM.log
Patch history file: /u01/product/oracle/11.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt
ApplySession applying interim patch '9352237' to OH '/u01/product/oracle/11.2.0/db_1'
Running prerequisite checks...
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.
Visithttp://www.oracle.com/support/policies.htmlfor 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
OPatch detected the node list and the local node from the inventory.  OPatch will patch the local system then propagate the patch to the remote nodes.
This node is part of an Oracle Real Application Cluster.
Remote nodes: 'wmrac02'
Local node: 'wmrac01'
elease shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/product/oracle/11.2.0/db_1')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files and inventory (not for auto-rollback) for the Oracle Home
Backing up files affected by the patch '9352237' for restore. This might take a while...
Backing up files affected by the patch '9352237' for rollback. This might take a while...
Execution of 'sh /u01/packages/9352237/custom/scripts/pre -apply 9352237 ':
Return Code = 0
Execution of 'sh /u01/packages/9352237/custom/scripts/post -apply 9352237 ':
Return Code = 0
The local system has been patched.  You can restart Oracle instances on it.
Patching in rolling mode.
The node 'wmrac02' will be patched next.
Please shutdown Oracle instances running out of this ORACLE_HOME on 'wmrac02'.
(Oracle Home = '/u01/product/oracle/11.2.0/db_1')
Is the node ready for patching? [y|n]
y
User Responded with: Y
Updating nodes 'wmrac02'
   Apply-related files are:
wmrac01$cd /u01/packages/
wmrac01$$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./8730312/
Invoking OPatch 11.2.0.1.3
Oracle Interim Patch Installer version 11.2.0.1.3
Copyright (c) 2010, Oracle Corporation.  All rights reserved.
PREREQ session
Oracle Home       : /u01/product/oracle/11.2.0/db_1
Central Inventory : /u01/product/grid/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 11.2.0.1.3
OUI version       : 11.2.0.1.0
OUI location      : /u01/product/oracle/11.2.0/db_1/oui
Log file location : /u01/product/oracle/11.2.0/db_1/cfgtoollogs/opatch/opatch2011-03-01_14-00-19PM.log
Patch history file: /u01/product/oracle/11.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
wmrac01$cd 8730312/
wmrac01$$ORACLE_HOME/OPatch/opatch apply
Invoking OPatch 11.2.0.1.3
Oracle Interim Patch Installer version 11.2.0.1.3
Copyright (c) 2010, Oracle Corporation.  All rights reserved.
Oracle Home       : /u01/product/oracle/11.2.0/db_1
Central Inventory : /u01/product/grid/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 11.2.0.1.3
OUI version       : 11.2.0.1.0
OUI location      : /u01/product/oracle/11.2.0/db_1/oui
Log file location : /u01/product/oracle/11.2.0/db_1/cfgtoollogs/opatch/opatch2011-03-01_14-00-55PM.log
Patch history file: /u01/product/oracle/11.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt
ApplySession applying interim patch '8730312' to OH '/u01/product/oracle/11.2.0/db_1'
Running prerequisite checks...
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.
Visithttp://www.oracle.com/support/policies.htmlfor 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
OPatch detected the node list and the local node from the inventory.  OPatch will patch the local system then propagate the patch to the remote nodes.
This node is part of an Oracle Real Application Cluster.
Remote nodes: 'wmrac02'
Local node: 'wmrac01'
elease shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/product/oracle/11.2.0/db_1')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files and inventory (not for auto-rollback) for the Oracle Home
Backing up files affected by the patch '8730312' for restore. This might take a while...
Backing up files affected by the patch '8730312' for rollback. This might take a while...
Patching component oracle.rdbms, 11.2.0.1.0...
Updating archive file "/u01/product/oracle/11.2.0/db_1/lib/libserver11.a"  with "lib/libserver11.a/kewa.o"
Updating archive file "/u01/product/oracle/11.2.0/db_1/lib/libserver11.a"  with "lib/libserver11.a/kewast.o"
Running make for target ioracle
ApplySession adding interim patch '8730312' to inventory
Verifying the update...
Inventory check OK: Patch ID 8730312 is registered in Oracle Home inventory with proper meta-data.
Files check OK: Files from Patch ID 8730312 are present in Oracle Home.
The local system has been patched.  You can restart Oracle instances on it.
Patching in rolling mode.
The node 'wmrac02' will be patched next.
Please shutdown Oracle instances running out of this ORACLE_HOME on 'wmrac02'.
(Oracle Home = '/u01/product/oracle/11.2.0/db_1')
Is the node ready for patching? [y|n]
y
User Responded with: Y
Updating nodes 'wmrac02'
   Apply-related files are:
驗証安裝結果
wmrac01$$ORACLE_HOME/OPatch/opatch lsinventory
Invoking OPatch 11.2.0.1.3
Oracle Interim Patch Installer version 11.2.0.1.3
Copyright (c) 2010, Oracle Corporation.  All rights reserved.
Oracle Home       : /u01/product/oracle/11.2.0/db_1
Central Inventory : /u01/product/grid/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 11.2.0.1.3
OUI version       : 11.2.0.1.0
OUI location      : /u01/product/oracle/11.2.0/db_1/oui
Log file location : /u01/product/oracle/11.2.0/db_1/cfgtoollogs/opatch/opatch2011-03-01_14-05-58PM.log
Patch history file: /u01/product/oracle/11.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt
OracleHomeInventory was not able to create a lock file, probably due to a failed OPatch Session. The loaded inventory might not show correctly what you have in the Oracle Home.
Lsinventory Output file location : /u01/product/oracle/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2011-03-01_14-05-58PM.txt
--------------------------------------------------------------------------------
Installed Top-level Products (1):
Oracle Database 11g                                                  11.2.0.1.0
There are 1 products installed in this Oracle Home.
Interim patches (2) :
Patch  8730312      : applied on Tue Mar 01 14:02:22 CST 2011
Unique Patch ID:  12177426
   Created on 7 Feb 2010, 06:41:26 hrs PST8PDT
   Bugs fixed:
     8730312
Patch  9352237      : applied on Tue Mar 01 13:50:16 CST 2011
Unique Patch ID:  12250325
   Created on 25 Mar 2010, 00:05:17 hrs PST8PDT
   Bugs fixed:
     8661168, 8769239, 8898852, 8801119, 9054253, 8706590, 8725286, 8974548
     8778277, 8780372, 8769569, 9027691, 9454036, 9454037, 9454038, 8761974
     7705591, 8496830, 8702892, 8639114, 8723477, 8729793, 8919682, 8818983
     9001453, 8475069, 9328668, 8891929, 8798317, 8820324, 8733749, 8702535
     8565708, 9036013, 8735201, 8684517, 8870559, 8773383, 8933870, 8812705
     8405205, 8822365, 8813366, 8761260, 8790767, 8795418, 8913269, 8897784
     8760714, 8717461, 8671349, 8775569, 8898589, 8861700, 8607693, 8642202
     8780281, 9369797, 8780711, 8784929, 8834636, 9015983, 8891037, 8828328
     8570322, 8832205, 8665189, 8717031, 8685253, 8718952, 8799099, 8633358
     9032717, 9321701, 8588519, 8783738, 8796511, 8782971, 8756598, 9454385
     8856497, 8703064, 9066116, 9007102, 8721315, 8818175, 8674263, 9352237
     8753903, 8720447, 9057443, 8790561, 8733225, 9197917, 8928276, 8991997, 8837736
Rac system comprising of multiple nodes
  Local node = wmrac02
  Remote node = wmrac01
--------------------------------------------------------------------------------
OPatch succeeded.

十三. 建立資料庫
 建立資料庫也很簡單,按照如下圖示操作即可
 
 
 
選擇OK,進入下一步﹐安裝完成進行修復。
 
選擇Exit,完成安裝﹐接著進行如下步驟修復前面的報錯﹐否則node2例項無法正常開啟。
Symptoms:
Using 11.2.0.1 Grid Infrastructure and ASM, try to create 11.1.0.7 database as oracle user "oratest", while Grid is installed as grid user "grid", getting error in "create database ..." command:
ERROR: asm_version error. err: driver/agent not installed rc:2
ORA-15183: ASMLIB initialization error [driver/agent not installed]
WARNING:FAILED to load library: /opt/oracle/extapi/64/asm/orcl/1/libasm.so
ERROR: asm_init(): asm_erc:-5 msg:Driver not installed pid:25261
The grid and oracle users are defined as:
[root@wmrac01 ~]# id grid
uid=500(grid) gid=500(oinstall) groups=500(oinstall),501(asmadmin),502(asmdba),503(asmoper),504(dba)
[root@wmrac01 ~]# id oracle
uid=501(oracle) gid=500(oinstall) groups=500(oinstall),502(asmdba),504(dba),505(oper)
Cause:
This is caused by the use of job role separation and oracle binary not having the proper group ownership preventing the database software owner "oratest" from accessing the ASMlib driver.
The output of "/usr/sbin/oracleasm configure" shows:
ORACLEASM_UID=grid
ORACLEASM_GID=asmadmin
Only users that are members of the asmadmin group have direct access to ASM disks and maintenance. For other database users (software owners), the access is gained via the oracle executable ($ORACLE_HOME/bin/oracle). It should have a setgid bit with group set to "asmadmin". The "oracle" binary is changed automatically via setasmgidwrap when the instance is started by the CRS daemon (e.g. srvctl start database/instance).
In this case, the oracle binary is owned by
-rwsr-s--x 1 oracle oinstall
instead of
-rwsr-s--x 1 oracle asmadmin
Solution:
Manually change the oracle binary ownership and permission:
as root user:
cd $ORACLE_HOME/bin
chgrp asmadmin oracle
chmod 6751 oracle
ls -l oracle
Ensure the ownership and permission is now like:
-rwsr-s--x 1 oracle asmadmin
Then retry "create database" command.
* Note 1: This change is only required for RDBMS $ORACLE_HOME/bin/oracle. Please do not modify $GRID_HOME/bin/oracle binary ownership.
* Note 2: Anytime when a patch is applied to the database ORACLE_HOME, please ensure above ownership and permission is corrected after the patch.
Bug 8797450
cd $GRID_HOME/crs/install
cp crspatch.pm crspatch.pm.8797450
locate and modify following from:
   instantiate_scripts ();
   copy_wrapper_scripts ();
   set_file_perms ();
to:
   instantiate_scripts ();
   copy_wrapper_scripts ();
   create_dirs ();
   set_file_perms ();
Once crspatch.pm is modified, unlock and relock $GRID_HOME:
As root:
# $GRID_HOME/crs/install/rootcrs.pl -unlock -crshome $GRID_HOME
# $GRID_HOME/crs/install/rootcrs.pl –patch
# $ORACLE_HOME/crs/install/rootcrs.pl -unlock -crshome $ORACLE_HOME
# $ORACLE_HOME/crs/install/rootcrs.pl –patch
wmrac01$/u01/product/grid/11.2.0/crs/install/rootcrs.pl -unlock -crshome $ORACLEcrshome $ORACLE_HOME
Symptoms
If OCR is located on ASM diskgroup, following shows in ASM alert log ($ORACLE_BASE/diag/asm/+asm/+ASMn/trace/alert_+ASMn.log) after ASM mounted all diskgroup successfully while starting up Grid Infrastructure(CRS):
SQL> ALTER DISKGROUP ALL MOUNT /* asm agent */
..
SUCCESS: diskgroup GI was mounted
SUCCESS: ALTER DISKGROUP ALL MOUNT /* asm agent */
..
WARNING: failed to online diskgroup resource ora.GI.dg (unable to communicate with CRSD/OHASD)
Or after ASM dismounted all diskgroup successfully while shutting down clusterware:
..
SUCCESS: ALTER DISKGROUP ALL DISMOUNT /* asm agent */
Sun Feb 07 11:11:13 2010
WARNING: failed to offline diskgroup resource ora.GI.dg (unable to communicate with CRSD/OHASD)..
freeing rdom 0
Cause:
In contrast to previous version of CRS, 11gR2 ASM does not depend on CRSD anymore; rather ASM starts before CRSD while clusterware is coming up, and stops after CRSD while clusterware is going down. Due to the new startup sequence, ASM can not update diskgroup resource status in CRSD either during clusterware startup or shutdown, thus above message is logged.
Solution:
The message can be ignored, the status of diskgroup and diskgroup resource will be synchronize by oraagent once clusterware is fully up.
To find out diskgroup resource status:
$GRID_HOME/bin/srvctl status diskgroup -g diskgroupname -a
$ORACLE_HOME/bin/srvctl status diskgroup -g data -a
$ORACLE_HOME/bin/srvctl status diskgroup -g indx -a
To start or sync diskgroup resource:
$GRID_HOME/bin/srvctl start diskgroup -g diskgroupname
$ORACLE_HOME/bin/srvctl start diskgroup -g data
$ORACLE_HOME/bin/srvctl start diskgroup -g indx
wmrac02$$ORACLE_HOME/bin/srvctl status diskgroup -g data -a
Disk Group data is running on wmrac01,wmrac02
Disk Group data is enabled
wmrac02$$ORACLE_HOME/bin/srvctl status diskgroup -g indx -a
Disk Group indx is running on wmrac01,wmrac02
Disk Group indx is enabled
wmrac02$$ORACLE_HOME/bin/srvctl start diskgroup -g data
PRCC-1014 : data was already running
wmrac02$$ORACLE_HOME/bin/srvctl start diskgroup -g indx
PRCC-1014 : indx was already running
上面這些問題修復後﹐請使用crs_stat –t檢視RAC狀態﹐如果顯示同如下畫面﹐那麼恭喜你﹐Oracle 11G RAC 安裝已完成。
 
備注﹕
在11GR2中﹐預設oc4j和gsd資源是disable的﹔
Oc4j是用於WLM的一個資源﹐WLM在11.2.0.2才可用﹔
Gsd是crs用於跟Oracle 9i RAC進行通訊的一個模組﹐是為了向後相容才保留的﹐不影響效能﹔
建議不要刪除﹐也不要嘗試開啟他們﹐忽略即可。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/25850100/viewspace-704189/,如需轉載,請註明出處,否則將追究法律責任。

相關文章