2013年7月25日 星期四

Oracle 11g-安裝Grid Infrastructure

終於來到安裝Grid Infrastructure ,事實上我在這裡吃了不少閉門羹,原因都是因為ASM DISK
不管如何....Grid Infrastructure 是10g開始就提供的功能,請大家跟著我一起安裝起來吧

Grid Infrastructure 軟體可由Oracle 官方網站下載: Free

安裝條件: 請務必在OS command 下將ASM DISK準備好如果還沒準備好的話請參閱
  [Oracle-建立ASM DISK] 一文

安裝步驟如下:





Step 1.  執行Grid Infrastructure 安裝檔
             請用oracle帳號登入後並執行  [root@oracleEXdb ~]#  ./u01/source/grid/runInstaller



Step 2. (本文僅針對stanalone server做測試) 請點選 [Install and Configure Frid Infrastructure for a
            Standalone Server] > 點選 [NEXT]




Step 3.選擇可用語系 > 點選 [NEXT]



Step 4. 填入相關資訊後 > 點選 [NEXT]
            a.Disk Group Name :  (自訂,本範例為DATA)
            b.Redundancy: (依據選擇的類型不同,所配置的方法也不同詳情請參閱官網說明)
                                 本範例選擇Normal   > 點選 [NEXT]
            c.勾選ORCL:ASMDISK1-4 做為Disk Group 的數量

(我一開始操作在這畫面時老實說還蠻常失意的,有時候在安裝Grid Infrastructure 的時候明明ASMDISK已經設定完畢也已經準備好,偏偏在這個畫面上就是看不到DISK。

這種問題我相信比較容易出現在VM的環境上,實體環境應該是比較不會有這種問題,最後解法是如果遇到這種情況建議兩種方法:

a. 重新設定ASMLIB Drive  
b.下載其他版本ASMLIB drive

基本上這兩種方法是可以解決突然找不到ASM DISK的窘境




Step 5. 填入ASM的操作帳戶密碼 SYS 與 ASMSNMP  (本範例為測試階段因此都使用相同密
             碼,實際應用請依據不同角色填入不同密碼)  > 點選 [NEXT]


設的太簡單可能會被警告(按下YES仍可以繼續)



Step 6. 填入ASM的對應群組 (本範例為測試階段因此都使用相同DBA群組,實際應用請依據不
             同角色填入不同對應群組)   > 點選 [NEXT]



填入群組都一樣可能會被警告(按下YES仍可以繼續)



Step 7. 填入Oracle Base 與 Software Location 位置(採預設即可,實際應用請依據自己要存的路徑
             為準)   > 點選 [NEXT]



Step 8. 填入Inventory Directory 位置(採預設即可,實際應用請依據自己要上線的為準)  >
           點選 [NEXT]



Step 9. 確認資訊無誤  > 點選 [Finish]




Step 10. 途中會出現要求以root帳號去執行以下兩個shell請複製此路徑並開啟一個終端機並切換
         root帳號去執行   (記住!! 一定要去執行不然後續會有問題)




[oracle@oracleEXdb ~]$ su - root
[root@oracleEXdb ~]# /u01/app/oraInventory/orainstRoot.sh

[root@oracleEXdb ~]# /u01/app/oracle/product/11.2.0/grid/root.sh
Running Oracle 11g root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]: (按ENETR即可)
   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.sh script.
Now product-specific root actions will be performed.
2013-07-24 00:48:36: Checking for super user privileges
2013-07-24 00:48:36: User has super user privileges
2013-07-24 00:48:36: Parsing the host name
Using configuration parameter file: /u01/app/oracle/product/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user 'oracle', privgrp 'oinstall'..
Operation successful.
CRS-4664: Node oracleexdb successfully pinned.
Adding daemon to inittab
CRS-4123: Oracle High Availability Services has been started.
ohasd is starting
ADVM/ACFS is not supported on oraclelinux-release-5-7.0.2


Step 11. 完成後請點選 [Close] 離開安裝程式



Step 12. 切換到+ASM的Instance下在OS command 下執行asmca 進入 ASM Configuration Assistant
               (進去的原因是因為我們必須要設定FRA的磁碟)


[root@oracleEXdb ~]# su - oracle
[oracle@oracleEXdb ~]$ . oraenv
ORACLE_SID = [oracle] ? +ASM
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/grid is /u01/app/oracle
[oracle@oracleEXdb ~]$ asmca




Step 13. 選擇要成為FRA群組的磁碟並且模擬 Redundancy 為 External (None) > 點選 [OK]
              恭喜恭喜終於完成了Grid Infrastructure 的設定。





**** 如果您也喜歡本篇內容的話,請幫忙點選一下下方的廣告,做為對小弟的鼓勵****

****當然如果我的內容不好也請您給予建議以做為檢討的基礎****

沒有留言:

張貼留言