Linux平台 Oracle 11gR2 RAC安裝Part2:GI安裝


三、GI(Grid Infrastructure)安裝

Linux平台 Oracle 11gR2 RAC安裝指導:
Part1:Linux平台 Oracle 11gR2 RAC安裝Part1:准備工作
Part2:Linux平台 Oracle 11gR2 RAC安裝Part2:GI安裝
Part3:Linux平台 Oracle 11gR2 RAC安裝Part3:DB安裝

三、GI(Grid Infrastructure)安裝

3.1 解壓GI的安裝包

首先grid用戶登錄,創建解壓介質的目錄:
mkdir -p /opt/app/media && chmod 777 /opt/app/media && cd /opt/app/media

然后unzip解壓安裝GI的安裝介質p13390677_112040_Linux-x86-64_3of7.zip到/opt/app/media這個目錄下:

unzip p13390677_112040_Linux-x86-64_3of7.zip -d /opt/app/media

3.2 安裝配置Xmanager軟件

在自己的Windows系統上成功安裝Xmanager Enterprise之后,運行Xstart.exe可執行程序, 配置如下
Session:RAC1
Host:172.16.7.112
Protocol:SSH
User Name:grid 
Execution Command:/usr/bin/xterm -ls -display $DISPLAY

點擊RUN,輸入grid用戶的密碼可以正常彈出命令窗口界面,即配置成功。

3.3 共享存儲LUN的賦權

chown grid:asmadmin /dev/mapper/mpath*

這個重啟驗證過,multipath對應的原始設備/dev/dm-*的權限重啟后會變更為root:disk,而我們需要的權限是grid:asmadmin
chown grid:asmadmin /dev/mapper/mpath*將這個加入開機啟動腳本/etc/rc.local中。

3.4 使用Xmanager圖形化界面安裝GI

Xmanager通過grid用戶登錄,進入介質解壓目錄,運行runInstaller安裝GI

$ cd /opt/app/media/grid/
$ ls
install  readme.html  response  rpm  runcluvfy.sh  runInstaller  sshsetup  stage  welcome.html
$ ./runInstaller 

我這里設定ASM密碼:orclasm
創建SYSDG作為OCR和Voting Disk的ASM磁盤組(3個10G的LUN,冗余級別:normal)
安裝過程中可忽略的檢查項(如果你的檢查項中還有其他的,則不可以忽略):

Package:pdksh-5.2.14         //這個RHEL中光盤中沒有pdksh這個包,之前准備工作中已安裝ksh代替
Package:cvuqdisk-1.0.9-1      //這個可以按提示手工修復,也可以忽略安裝后自動修復
Device Checks for ASM         
Network Time Protocol(NTP)
Task resolv.conf Integrity

root用戶執行2個腳本,需要在各節點分別執行

節點1執行兩個腳本的屏幕輸出如下:

[root@jyracdb1 ~]# /opt/app/oraInventory/orainstRoot.sh
Changing permissions of /opt/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /opt/app/oraInventory to oinstall.
The execution of the script is complete.
[root@jyracdb1 ~]# /opt/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=  /opt/app/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.


Creating /etc/oratab file...
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.
Using configuration parameter file: /opt/app/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
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
  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 upstart
CRS-2672: Attempting to start 'ora.mdnsd' on 'jyracdb1'
CRS-2676: Start of 'ora.mdnsd' on 'jyracdb1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'jyracdb1'
CRS-2676: Start of 'ora.gpnpd' on 'jyracdb1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'jyracdb1'
CRS-2672: Attempting to start 'ora.gipcd' on 'jyracdb1'
CRS-2676: Start of 'ora.cssdmonitor' on 'jyracdb1' succeeded
CRS-2676: Start of 'ora.gipcd' on 'jyracdb1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'jyracdb1'
CRS-2672: Attempting to start 'ora.diskmon' on 'jyracdb1'
CRS-2676: Start of 'ora.diskmon' on 'jyracdb1' succeeded
CRS-2676: Start of 'ora.cssd' on 'jyracdb1' succeeded

ASM created and started successfully.

Disk Group SYSDG 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 a64ad5c2080d4fcabfedb69225c4450e.
Successful addition of voting disk 7fee3d0e83e04f4dbf8dac2903b7c575.
Successful addition of voting disk 6cb439677d774ff8bfeea0de9774de7a.
Successfully replaced voting disk group with +SYSDG.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   a64ad5c2080d4fcabfedb69225c4450e (/dev/mapper/mpath_10G_a) [SYSDG]
 2. ONLINE   7fee3d0e83e04f4dbf8dac2903b7c575 (/dev/mapper/mpath_10G_b) [SYSDG]
 3. ONLINE   6cb439677d774ff8bfeea0de9774de7a (/dev/mapper/mpath_10G_c) [SYSDG]
Located 3 voting disk(s).
CRS-2672: Attempting to start 'ora.asm' on 'jyracdb1'
CRS-2676: Start of 'ora.asm' on 'jyracdb1' succeeded
CRS-2672: Attempting to start 'ora.SYSDG.dg' on 'jyracdb1'
CRS-2676: Start of 'ora.SYSDG.dg' on 'jyracdb1' succeeded
Preparing packages for installation...
cvuqdisk-1.0.9-1
Configure Oracle Grid Infrastructure for a Cluster ... succeeded

節點2執行兩個腳本的屏幕輸出如下:

[root@jyracdb2 app]# /opt/app/oraInventory/orainstRoot.sh
Changing permissions of /opt/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /opt/app/oraInventory to oinstall.
The execution of the script is complete.
[root@jyracdb2 app]# /opt/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=  /opt/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...
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.
Using configuration parameter file: /opt/app/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
Installing Trace File Analyzer
OLR initialization - successful
Adding Clusterware entries to upstart
CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node jyracdb1, number 1, and is terminating
An active cluster was found during exclusive startup, restarting to join the cluster
Preparing packages for installation...
cvuqdisk-1.0.9-1
Configure Oracle Grid Infrastructure for a Cluster ... succeeded

執行完root腳本之后點擊OK繼續,等待完成安裝。

3.5 驗證crsctl的狀態

[grid@jyracdb1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
               ONLINE  ONLINE       jyracdb1                                   
               ONLINE  ONLINE       jyracdb2                                   
ora.SYSDG.dg
               ONLINE  ONLINE       jyracdb1                                   
               ONLINE  ONLINE       jyracdb2                                   
ora.asm
               ONLINE  ONLINE       jyracdb1               Started             
               ONLINE  ONLINE       jyracdb2               Started             
ora.gsd
               OFFLINE OFFLINE      jyracdb1                                   
               OFFLINE OFFLINE      jyracdb2                                   
ora.net1.network
               ONLINE  ONLINE       jyracdb1                                   
               ONLINE  ONLINE       jyracdb2                                   
ora.ons
               ONLINE  ONLINE       jyracdb1                                   
               ONLINE  ONLINE       jyracdb2                                   
ora.registry.acfs
               ONLINE  ONLINE       jyracdb1                                   
               ONLINE  ONLINE       jyracdb2                                   
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       jyracdb1                                   
ora.cvu
      1        ONLINE  ONLINE       jyracdb1                                   
ora.jyracdb1.vip
      1        ONLINE  ONLINE       jyracdb1                                   
ora.jyracdb2.vip
      1        ONLINE  ONLINE       jyracdb2                                   
ora.oc4j
      1        ONLINE  ONLINE       jyracdb1                                   
ora.scan1.vip
      1        ONLINE  ONLINE       jyracdb1                                   
[grid@jyracdb1 ~]$ 

3.6 測試集群的FAILED OVER功能

重啟節點2,查看集群狀態:

[grid@jyracdb1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
               ONLINE  ONLINE       jyracdb1                                   
ora.SYSDG.dg
               ONLINE  ONLINE       jyracdb1                                   
ora.asm
               ONLINE  ONLINE       jyracdb1               Started             
ora.gsd
               OFFLINE OFFLINE      jyracdb1                                   
ora.net1.network
               ONLINE  ONLINE       jyracdb1                                   
ora.ons
               ONLINE  ONLINE       jyracdb1                                   
ora.registry.acfs
               ONLINE  ONLINE       jyracdb1                                   
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       jyracdb1                                   
ora.cvu
      1        ONLINE  ONLINE       jyracdb1                                   
ora.jyracdb1.vip
      1        ONLINE  ONLINE       jyracdb1                                   
ora.jyracdb2.vip
      1        ONLINE  INTERMEDIATE jyracdb1               FAILED OVER         
ora.oc4j
      1        ONLINE  ONLINE       jyracdb1                                   
ora.scan1.vip
      1        ONLINE  ONLINE       jyracdb1 

重啟節點1:

[grid@jyracdb2 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
               ONLINE  OFFLINE      jyracdb1                                   
               ONLINE  ONLINE       jyracdb2                                   
ora.SYSDG.dg
               ONLINE  ONLINE       jyracdb1               STOPPING            
               ONLINE  ONLINE       jyracdb2                                   
ora.asm
               ONLINE  ONLINE       jyracdb1               Started             
               ONLINE  ONLINE       jyracdb2               Started             
ora.gsd
               OFFLINE OFFLINE      jyracdb1                                   
               OFFLINE OFFLINE      jyracdb2                                   
ora.net1.network
               ONLINE  ONLINE       jyracdb1                                   
               ONLINE  ONLINE       jyracdb2                                   
ora.ons
               ONLINE  ONLINE       jyracdb1                                   
               ONLINE  ONLINE       jyracdb2                                   
ora.registry.acfs
               ONLINE  OFFLINE      jyracdb1                                   
               ONLINE  ONLINE       jyracdb2                                   
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  OFFLINE                                                   
ora.cvu
      1        ONLINE  ONLINE       jyracdb2                                   
ora.jyracdb1.vip
      1        ONLINE  OFFLINE                               STARTING            
ora.jyracdb2.vip
      1        ONLINE  ONLINE       jyracdb2                                   
ora.oc4j
      1        ONLINE  ONLINE       jyracdb1               STOPPING            
ora.scan1.vip
      1        ONLINE  OFFLINE                               STARTING      

之后;

[grid@jyracdb2 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
               ONLINE  ONLINE       jyracdb2                                   
ora.SYSDG.dg
               ONLINE  ONLINE       jyracdb2                                   
ora.asm
               ONLINE  ONLINE       jyracdb2               Started             
ora.gsd
               OFFLINE OFFLINE      jyracdb2                                   
ora.net1.network
               ONLINE  ONLINE       jyracdb2                                   
ora.ons
               ONLINE  ONLINE       jyracdb2                                   
ora.registry.acfs
               ONLINE  ONLINE       jyracdb2                                   
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       jyracdb2                                   
ora.cvu
      1        ONLINE  ONLINE       jyracdb2                                   
ora.jyracdb1.vip
      1        ONLINE  INTERMEDIATE jyracdb2               FAILED OVER         
ora.jyracdb2.vip
      1        ONLINE  ONLINE       jyracdb2                                   
ora.oc4j
      1        ONLINE  ONLINE       jyracdb2                                   
ora.scan1.vip
      1        ONLINE  ONLINE       jyracdb2      


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM