關於RAC叢集前期的準備工作以及規劃,請看我的前一篇博文
http://devliangel.blog.51cto.com/469347/1288235
關於ORACLE RAC叢集的介紹優缺點,請看如下文檔,或者去官方網站觀看
http://baike.baidu.com/view/3153034.htm
一、首先解壓叢集套件包;
gunzip 10201_clusterware_linux_x86_64.gz
cpio -idmv < 10201_clusterware_linux_x86_64.cpio
解壓放置的地方需要有oracle使用者使用的許可權
二、開始安裝oracle RAC叢集套件,
2.2.1.安裝之前首先關閉兩個節點的防火牆,Selinux不然是無法通過安裝的
2.2.2.安裝之前修改系統版本,來欺詐oracle資料庫,然後執行xhost+
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/16422964R-0.png" height="128" />
2.2.3.完成上面的配置之後,使用oracle使用者進入到解壓叢集的目錄;運行指令碼來安裝oracle叢集;
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/1642291335-1.png" height="354" />
2.2.4.選擇oracle指定的目錄和庫;
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/16422921I-2.png" height="435" />
2.2.5.選擇oracleRAC叢集安裝的目錄,目錄變數配置在前期準備工作中設定完成了,細節請看前期準備工作
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/1642291428-3.png" height="433" />
2.2.6.安裝檢查,如果檢查失敗根據提示來配置完成檢查錯誤
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/16422925K-4.png" height="436" />
2.2.7.如果檢查通過,我們來配置RAC叢集,在下面的介面中選擇添加,根據自己的hosts檔案中的配置來添加第二個節點的資訊,需要注意的是,這裡的電腦名稱字要對應在/etc/hosts檔案中的配置;如果配置不通過,請檢查是否和設定檔中的一樣,細節請看我前期準備工作;
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/16422aL9-5.png" height="428" />
2.2.8.完成點擊確定,,點擊下一步即可,如果點擊下一步提示錯誤,請檢查防火牆,ssh雙向認證是否配置的有問題,要確保SSH沒有任何問題;
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/1642291605-6.png" height="434" />
2.2.9.完成之後,選擇網路的方式一個公用網路一個是心跳網路,根據自己的配置來選擇網路,具體
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/16422959E-7.png" height="436" />
2.2.10.選擇配置裸裝置ocr,根據自己建立的裸裝置來配置,需要注意的是,許可權的問題,屬主和屬組的問題;細節請看前期準備工作
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/1642296028-8.png" height="436" />
2.2.11.配置VDISK裸裝置,根據自己的設定來配置方法和上面的一樣
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/16422a5W-9.png" height="432" />
2.2.12.完成之後來開始安裝oracle rac
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/164229C58-10.png" height="432" />
2.2.13.安裝rac 叢集,在安裝過程中會有錯誤,我把錯誤都了,並附上如何處理這種錯誤,
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/1642295137-11.png" height="436" />
2.2.14.錯誤提示,根據錯誤提示,請修改兩個節點的系統時間,第一個節點的時間慢於第二個節點的時間兩三分鐘即可,然後點擊yes就可以正常通過;不要告訴我不會修改系統時間!!!
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/164229C54-12.png" height="263" />
2.2.15.完成通過之後,會是如下介面;
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/1642296154-13.png" height="435" />
2.2.16.然後根據提示我們來執行指令碼,這裡千萬要注意,執行指令碼要按照順序來執行,不然會報錯;
按照順序我們現在第一個節點來執行
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/1642293428-14.png" height="189" />
然後在第二個節點來執行
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/1642291002-15.png" height="213" />
2.2.17.然後我們來執行第一個指令碼,根據經驗執行第二個指令碼,一般都會在第二個節點上配置報錯,既然報錯我們就把它解決掉,還是按照順序來執行不要同時執行;
在第一個RAC節點來執行;650) this.width=650;" src="http://www.bkjia.com/uploads/allimg/131227/1642294214-16.png" title="11111.png" />
2.2.18.在第二個節點上來執行,然後報錯,那麼我們來處理報錯問題;
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/1642293C8-17.png" height="352" />
2.2 .19.出現如上錯誤,首先請確認我在前期準備工作中的所有包是否安裝,是所有要是不知道請看我上一篇前期準備工作,如果安裝,那麼我們來做如下操作;兩台伺服器上都配置;(第一個節點可有可無,第二個節點必須要配置)
[root@odb1 ~]# su – oracle
[oracle@odb1 ~]$ vim /u01/app/oracle/product/10.2.0/crs_1/bin/vipca
找到export LD_ASSUME_KERNEL這一行,然後在下面添加一行內容如下:
unset LD_ASSUME_KERNEL
如果彈出如下錯誤,那麼請記住使用root使用者來執行
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/16422914b-18.png" height="75" />
2.2.20.使用root使用者來執行vipca來啟動RAC叢集,配置完成之後,會彈出如下的介面
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/16422911G-19.png" height="141" />
2.2.21.完成之後會彈出如下介面,直接下一步,vipca會根據你的配置自動完成的
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/16422964P-20.png" height="399" />
2.2.22.配置RAC叢集的VIP地址,需要注意的是,保證VIP地址沒有被佔用;
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/1642293U9-21.png" height="398" />
2.2.23.配置完成之後的詳細說明;
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/16422a193-22.png" height="401" />
2.2.24.完成上面配置之後點擊finish即可,如下是完成的進度,點擊OK即可;
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/1642293064-23.png" height="400" />
2.2.25.配置完成的詳細結果;
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/1642293613-24.png" height="477" />
2.2.26.在第二個節點vipca配置完成之後,我們再回到節點一上面,點擊OK即可,正常情況下就配置完成,如果人品爆發配置無法通過,那麼我們就來幹掉他;
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/16422a340-25.png" height="437" />
2.2.27.報錯,經典的25031錯誤,首先我們來查看經典的25031錯誤記錄檔;
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/1642294927-26.png" height="436" />
2.2.28.解決經典的25031錯誤,首先我們先查看日誌;
如果報oui-25031錯誤,請看下面,對錯誤的解決方案
如何解決25031錯誤
網上相關資料都說是hostname和/etc/hosts檔案有問題,請檢查設定檔,如果在設定檔沒有問題的情況下,那麼我們來查看日誌;
根據日誌中相關資訊我們查看出來節點6200 already了,那麼我們如何解決呢?
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/1642294H8-27.png" height="349" />
解決方案:
我們可以移除報錯的檔案然後重新retry就可以
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/1642291A8-28.png" height="137" />
2.2.39.執行完如上命令,然後我們retry重新試試就可以了;全部通過
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/164229D02-29.png" height="432" />
2.2.40.測試成功,
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/1642293542-30.png" height="438" />
2.2.41.然後我們來查看RAC節點是否啟動起來了;;至此rac節點全部啟動成功
650) this.width=650;" style="border-bottom:0px;border-left:0px;border-top:0px;border-right:0px" title="image" border="0" alt="image" src="http://www.bkjia.com/uploads/allimg/131227/1642295352-31.png" height="265" />
2.2.42.以上測試都測試了五六遍,按照我的思路方法肯定不會出現其他問題
接下來安裝oracle10G資料庫了,只需要在一個節點上安裝
本文出自 “angerdevil” 部落格,請務必保留此出處http://devliangel.blog.51cto.com/469347/1288469