跳轉到內容

RAC 攻擊 - Oracle 叢集資料庫在家/安裝網格基礎架構 (ASM)

來自華夏公益教科書


  1. 作為 oracle 使用者,啟動網格安裝程式。在第一個螢幕上,選擇 安裝和配置叢集的網格基礎架構,然後單擊 下一步。[oracle@collabn1 ~]$ /mnt/cdrom*/grid/runInstaller


  2. 選擇 高階安裝,然後單擊 下一步
  3. 接受預設語言(英語)並選擇 下一步
  4. 將叢集命名為 collab,並確保 SCAN 名稱是 collab-scan,埠為 1521,然後單擊 下一步
  5. 新增節點 collabn2,VIP 為 collabn2-vip,然後選擇 下一步 以驗證叢集配置。
  6. 驗證子網 192.168.78.0 上的 eth0 是 PUBLIC,子網 172.16.100.0 上的 eth1 是 PRIVATE,然後單擊 下一步
  7. 選擇將叢集軟體檔案儲存在 ASM 中,然後選擇 下一步
  8. 建立一個名為 DATA 的磁碟組,使用外部冗餘,僅使用磁碟 ORCL:DATA,然後單擊 下一步
  9. 選擇對所有帳戶使用相同的密碼,並輸入密碼 racattack,然後單擊 下一步。(忽略 Oracle 不喜歡此密碼的訊息。)
  10. 不要使用 IPMI。單擊 下一步
  11. 將 OSDBA 組設定為 asmdba,將 OSOPER 組設定為 asmoper,將 OSASM 組設定為 asmadmin。然後單擊 下一步
  12. 接受 /u01/app/oracle 的 ORACLE_BASE 位置,並使用 /u01/grid/oracle/product/11.2.0/grid_1 的 ORACLE_HOME 位置。然後單擊 下一步
  13. 接受 /u01/app/oraInventory 的預設清單位置,然後選擇 下一步
  14. 先決條件檢查將執行。將發出警告,表明三個檢查失敗:物理記憶體、交換空間和網路時間協議。單擊 複選框 以忽略所有,然後單擊 下一步
  15. 在 oracle 使用者的主目錄中 儲存 一個名為 grid.rsp 的響應檔案。然後單擊 完成 以安裝網格基礎架構。


  16. 出現提示時,以 root 使用者身份開啟一個終端並執行兩個 root.sh 指令碼。確保在 兩個節點 上執行 兩個指令碼
    [oracle@collabn1 ~]$ su -
    Password: racattack
    
    [root@collabn1 ~]# /u01/app/oraInventory/orainstRoot.sh
    Changing permissions of /u01/app/oraInventory.
    Adding read, write permissions for group.
    Removing read,write,execute permissions for world.
    
    Changing groupname of /u01/app/oraInventory to oinstall.
    The execution of the script is complete.
    
    [root@collabn1 ~]# /u01/grid/oracle/product/11.2.0/grid_1/root.sh
    Running Oracle 11g root.sh script...
    
    The following environment variables are set as:
        ORACLE_OWNER= oracle
        ORACLE_HOME=  /u01/grid/oracle/product/11.2.0/grid_1
    
    Enter the full pathname of the local bin directory: [/usr/local/bin]: /usr/bin
       Copying dbhome to /usr/bin ...
       Copying oraenv to /usr/bin ...
       Copying coraenv to /usr/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.
    2011-03-30 16:49:13: Parsing the host name
    2011-03-30 16:49:13: Checking for super user privileges
    2011-03-30 16:49:13: User has super user privileges
    Using configuration parameter file: /u01/grid/oracle/product/11.2.0/grid_1/crs/install/crsconfig_params
    Creating trace directory
    LOCAL ADD MODE
    Creating OCR keys for user 'root', privgrp 'root'..
    Operation 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 daemon to inittab
    CRS-4123: Oracle High Availability Services has been started.
    ohasd is starting
    CRS-2672: Attempting to start 'ora.gipcd' on 'collabn1'
    CRS-2672: Attempting to start 'ora.mdnsd' on 'collabn1'
    CRS-2676: Start of 'ora.mdnsd' on 'collabn1' succeeded
    CRS-2676: Start of 'ora.gipcd' on 'collabn1' succeeded
    CRS-2672: Attempting to start 'ora.gpnpd' on 'collabn1'
    CRS-2676: Start of 'ora.gpnpd' on 'collabn1' succeeded
    CRS-2672: Attempting to start 'ora.cssdmonitor' on 'collabn1'
    CRS-2676: Start of 'ora.cssdmonitor' on 'collabn1' succeeded
    CRS-2672: Attempting to start 'ora.cssd' on 'collabn1'
    CRS-2672: Attempting to start 'ora.diskmon' on 'collabn1'
    CRS-2676: Start of 'ora.diskmon' on 'collabn1' succeeded
    CRS-2676: Start of 'ora.cssd' on 'collabn1' succeeded
    CRS-2672: Attempting to start 'ora.ctssd' on 'collabn1'
    CRS-2676: Start of 'ora.ctssd' on 'collabn1' succeeded
    
    ASM created and started successfully.
    
    DiskGroup DATA created successfully.
    
    clscfg: -install mode specified
    Successfully accumulated necessary OCR keys.
    Creating OCR keys for user 'root', privgrp 'root'..
    Operation successful.
    CRS-2672: Attempting to start 'ora.crsd' on 'collabn1'
    CRS-2676: Start of 'ora.crsd' on 'collabn1' succeeded
    CRS-4256: Updating the profile
    Successful addition of voting disk 6b7c5142d3214fe9bf4d4273f0ff11fd.
    Successfully replaced voting disk group with +DATA.
    CRS-4256: Updating the profile
    CRS-4266: Voting file(s) successfully replaced
    ##  STATE    File Universal Id                File Name Disk group
    --  -----    -----------------                --------- ---------
     1. ONLINE   6b7c5142d3214fe9bf4d4273f0ff11fd (ORCL:DATA) [DATA]
    Located 1 voting disk(s).
    CRS-2673: Attempting to stop 'ora.crsd' on 'collabn1'
    CRS-2677: Stop of 'ora.crsd' on 'collabn1' succeeded
    CRS-2673: Attempting to stop 'ora.asm' on 'collabn1'
    CRS-2677: Stop of 'ora.asm' on 'collabn1' succeeded
    CRS-2673: Attempting to stop 'ora.ctssd' on 'collabn1'
    CRS-2677: Stop of 'ora.ctssd' on 'collabn1' succeeded
    CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'collabn1'
    CRS-2677: Stop of 'ora.cssdmonitor' on 'collabn1' succeeded
    CRS-2673: Attempting to stop 'ora.cssd' on 'collabn1'
    CRS-2677: Stop of 'ora.cssd' on 'collabn1' succeeded
    CRS-2673: Attempting to stop 'ora.gpnpd' on 'collabn1'
    CRS-2677: Stop of 'ora.gpnpd' on 'collabn1' succeeded
    CRS-2673: Attempting to stop 'ora.gipcd' on 'collabn1'
    CRS-2677: Stop of 'ora.gipcd' on 'collabn1' succeeded
    CRS-2673: Attempting to stop 'ora.mdnsd' on 'collabn1'
    CRS-2677: Stop of 'ora.mdnsd' on 'collabn1' succeeded
    CRS-2672: Attempting to start 'ora.mdnsd' on 'collabn1'
    CRS-2676: Start of 'ora.mdnsd' on 'collabn1' succeeded
    CRS-2672: Attempting to start 'ora.gipcd' on 'collabn1'
    CRS-2676: Start of 'ora.gipcd' on 'collabn1' succeeded
    CRS-2672: Attempting to start 'ora.gpnpd' on 'collabn1'
    CRS-2676: Start of 'ora.gpnpd' on 'collabn1' succeeded
    CRS-2672: Attempting to start 'ora.cssdmonitor' on 'collabn1'
    CRS-2676: Start of 'ora.cssdmonitor' on 'collabn1' succeeded
    CRS-2672: Attempting to start 'ora.cssd' on 'collabn1'
    CRS-2672: Attempting to start 'ora.diskmon' on 'collabn1'
    CRS-2676: Start of 'ora.diskmon' on 'collabn1' succeeded
    CRS-2676: Start of 'ora.cssd' on 'collabn1' succeeded
    CRS-2672: Attempting to start 'ora.ctssd' on 'collabn1'
    CRS-2676: Start of 'ora.ctssd' on 'collabn1' succeeded
    CRS-2672: Attempting to start 'ora.asm' on 'collabn1'
    CRS-2676: Start of 'ora.asm' on 'collabn1' succeeded
    CRS-2672: Attempting to start 'ora.crsd' on 'collabn1'
    CRS-2676: Start of 'ora.crsd' on 'collabn1' succeeded
    CRS-2672: Attempting to start 'ora.evmd' on 'collabn1'
    CRS-2676: Start of 'ora.evmd' on 'collabn1' succeeded
    CRS-2672: Attempting to start 'ora.asm' on 'collabn1'
    CRS-2676: Start of 'ora.asm' on 'collabn1' succeeded
    CRS-2672: Attempting to start 'ora.DATA.dg' on 'collabn1'
    CRS-2676: Start of 'ora.DATA.dg' on 'collabn1' succeeded
    CRS-2672: Attempting to start 'ora.registry.acfs' on 'collabn1'
    CRS-2676: Start of 'ora.registry.acfs' on 'collabn1' succeeded
    
    collabn1     2011/03/30 16:59:35     /u01/grid/oracle/product/11.2.0/grid_1/cdata/collabn1/backup_20110330_165935.olr
    Preparing packages for installation...
    cvuqdisk-1.0.7-1
    Configure Oracle Grid Infrastructure for a Cluster ... succeeded
    Updating inventory properties for clusterware
    Starting Oracle Universal Installer...
    
    Checking swap space: must be greater than 500 MB.   Actual 968 MB    Passed
    The inventory pointer is located at /etc/oraInst.loc
    The inventory is located at /u01/app/oraInventory
    'UpdateNodeList' was successful.
    
  17. [root@collabn1 ~]# vmstat 3 4
    procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
     r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
     0  0 660156  11868   6472 263348   33  229  1505  2740 1194 2407  8 22 44 27  0
     2  0 660156  11884   6472 263364    0    0     1     3  712 3635  2  4 90  4  0
     1  0 660156  11884   6480 263368    0    0     0    34  701 3565  1  3 90  6  0
     4  0 660156  11884   6480 263372    0    0     1     5  721 3642  2  8 88  2  0
    
    [root@collabn1 ~]# ssh collabn2
    root@collabn2's password: racattack
    -bash: oraenv: No such file or directory
    [root@collabn2 ~]# /u01/app/oraInventory/orainstRoot.sh
    Changing permissions of /u01/app/oraInventory.
    Adding read, write permissions for group.
    Removing read,write,execute permissions for world.
    
    Changing groupname of /u01/app/oraInventory to oinstall.
    The execution of the script is complete.
    
    [root@collabn2 ~]# /u01/grid/oracle/product/11.2.0/grid_1/root.sh
    Running Oracle 11g root.sh script...
    
    The following environment variables are set as:
        ORACLE_OWNER= oracle
        ORACLE_HOME=  /u01/grid/oracle/product/11.2.0/grid_1
    
    Enter the full pathname of the local bin directory: [/usr/local/bin]: /usr/bin
       Copying dbhome to /usr/bin ...
       Copying oraenv to /usr/bin ...
       Copying coraenv to /usr/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.
    2011-03-30 17:04:26: Parsing the host name
    2011-03-30 17:04:26: Checking for super user privileges
    2011-03-30 17:04:26: User has super user privileges
    Using configuration parameter file: /u01/grid/oracle/product/11.2.0/grid_1/crs/install/crsconfig_params
    Creating trace directory
    LOCAL ADD MODE
    Creating OCR keys for user 'root', privgrp 'root'..
    Operation successful.
    Adding daemon to inittab
    CRS-4123: Oracle High Availability Services has been started.
    ohasd is starting
    CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node collabn1, number 1, and is terminating
    An active cluster was found during exclusive startup, restarting to join the cluster
    CRS-2672: Attempting to start 'ora.mdnsd' on 'collabn2'
    CRS-2676: Start of 'ora.mdnsd' on 'collabn2' succeeded
    CRS-2672: Attempting to start 'ora.gipcd' on 'collabn2'
    CRS-2676: Start of 'ora.gipcd' on 'collabn2' succeeded
    CRS-2672: Attempting to start 'ora.gpnpd' on 'collabn2'
    CRS-2676: Start of 'ora.gpnpd' on 'collabn2' succeeded
    CRS-2672: Attempting to start 'ora.cssdmonitor' on 'collabn2'
    CRS-2676: Start of 'ora.cssdmonitor' on 'collabn2' succeeded
    CRS-2672: Attempting to start 'ora.cssd' on 'collabn2'
    CRS-2672: Attempting to start 'ora.diskmon' on 'collabn2'
    CRS-2676: Start of 'ora.diskmon' on 'collabn2' succeeded
    CRS-2676: Start of 'ora.cssd' on 'collabn2' succeeded
    CRS-2672: Attempting to start 'ora.ctssd' on 'collabn2'
    CRS-2676: Start of 'ora.ctssd' on 'collabn2' succeeded
    CRS-2672: Attempting to start 'ora.drivers.acfs' on 'collabn2'
    CRS-2676: Start of 'ora.drivers.acfs' on 'collabn2' succeeded
    CRS-2672: Attempting to start 'ora.asm' on 'collabn2'
    CRS-2676: Start of 'ora.asm' on 'collabn2' succeeded
    CRS-2672: Attempting to start 'ora.crsd' on 'collabn2'
    CRS-2676: Start of 'ora.crsd' on 'collabn2' succeeded
    CRS-2672: Attempting to start 'ora.evmd' on 'collabn2'
    CRS-2676: Start of 'ora.evmd' on 'collabn2' succeeded
    
    collabn2     2011/03/30 17:12:32     /u01/grid/oracle/product/11.2.0/grid_1/cdata/collabn2/backup_20110330_171232.olr
    Preparing packages for installation...
    cvuqdisk-1.0.7-1
    Configure Oracle Grid Infrastructure for a Cluster ... succeeded
    Updating inventory properties for clusterware
    Starting Oracle Universal Installer...
    
    Checking swap space: must be greater than 500 MB.   Actual 1205 MB    Passed
    The inventory pointer is located at /etc/oraInst.loc
    The inventory is located at /u01/app/oraInventory
    'UpdateNodeList' was successful.
    
    


  18. 執行完兩個指令碼後,返回安裝程式視窗,然後單擊 確定 以繼續執行配置助手。
  19. 叢集驗證實用程式將失敗,因為 NTP 未執行。如果需要,請檢查日誌檔案末尾的錯誤訊息。然後單擊 確定 關閉訊息框,然後單擊 下一步 以繼續。
  20. 您現在應該看到最終螢幕!單擊 關閉 退出安裝程式。



華夏公益教科書