Solaris10下安裝Oracle10203RAC環境(二)

yangtingkun發表於2007-04-03

前一陣剛剛才測試環境下裝完Solaris 8下的ORACLE RAC。結果發現這次採購的F490硬體居然不支援Solaris 8。只好將作業系統升級到Solaris 10

前面已經對Solaris 8下的安裝進行了比較詳細的描述,這裡只是簡單記錄一下Solaris 10下的安裝步驟。和8類似的步驟會簡單帶過。

這篇介紹Oracle Clusterware的安裝過程。

RAC安裝的準備工作可以參考:Solaris10下安裝Oracle10203RAC環境(一):http://yangtingkun.itpub.net/post/468/276589


首先,解開CLUSTERWARE壓縮包:

$ gunzip 10gr2_cluster_sol.cpio.gz
$ cpio -idmv < 10gr2_cluster_sol.cpio$ gunzip 10gr2_cluster_sol.cpio.gz
$ cpio -idmv < 10gr2_cluster_sol.cpio

建立安裝所需的目錄:

$ mkdir -p /data/oracle/product/10.2
$ mkdir /data/oracle/oraInventory
$ mkdir /data/oracle/product/10.2/crs
$ mkdir /data/oracle/product/10.2/database

建立ocrvoting disk所需的裸裝置,使用VeritasVolumn Manager建立所需的裸裝置:

root@ahrac1 # cd /dev/vx/rdsk/datadg
root@ahrac1 # vxassist make ocr 300m
root@ahrac1 # vxassist make ocr2 300m
root@ahrac1 # vxassist make vot 300m
root@ahrac1 # vxassist make vot2 300m
root@ahrac1 # vxassist make vot3 300m
root@ahrac1 # chown oracle:oinstall *

利用root登陸圖形介面執行,注意,一定需要在安裝之前執行ssh的驗證工作,否則安裝過程執行一半的時候會出現錯誤:Specified Nodes Are Not Clusterable

root@ahrac1 # xhost +
access control disabled, clients can connect from any host
root@ahrac1 # su - oracle
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
$ ssh ahrac1 date

Enter passphrase for key '/export/home/oracle/.ssh/id_rsa':

Mon Mar 26 18:31:18 CST 2007

$ exec /usr/bin/ssh-agent $SHELL

$ /usr/bin/ssh-add

Enter passphrase for /export/home/oracle/.ssh/id_rsa:

Identity added: /export/home/oracle/.ssh/id_rsa (/export/home/oracle/.ssh/id_rsa)

Enter passphrase for /export/home/oracle/.ssh/id_dsa:

Identity added: /export/home/oracle/.ssh/id_dsa (/export/home/oracle/.ssh/id_dsa)

$ cd /data
$ cd cluster_disk
$ ./runInstaller

安裝步驟中在Cluster主目錄位置填入:OraCrs10g_home1/data/oracle/product/10.2/crs資訊,並選擇簡體中文字元。

Cluster配置頁面選擇預設的Cluster namecrs,並輸入節點二的資訊:ahrac2ahrac2-privahrac2-vip

interface的選擇介面:由於Oracle對於IP地址的解析存在bug,因此這裡將172.25.0.0interface型別改為PUBLIC

orc配置介面,輸入剛才建立好的/dev/vx/rdsk/datadg/ocr/dev/vx/rdsk/datadg/ocr2,點選確定。

Voting disk配置介面,分別輸入剛才建立好的/dev/vx/rdsk/datadg/vot/dev/vx/rdsk/datadg/vot2/dev/vx/rdsk/datadg/vot3,點選確定。

檢查彈出的彙總資訊,確認無誤後,點選開始安裝。

安裝完成後,分別在兩個節點執行下面的兩個指令碼:

root@ahrac1 # . /data/oracle/oraInventory/orainstRoot.sh
Changing permissions of /data/oracle/oraInventory to 770.
Changing groupname of /data/oracle/oraInventory to oinstall.
The execution of the script is complete
root@ahrac1 # . /data/oracle/product/10.2/crs/root.sh
WARNING: directory '/data/oracle/product/10.2' is not owned by root
WARNING: directory '/data/oracle/product' is not owned by root
WARNING: directory '/data/oracle' is not owned by root
WARNING: directory '/data' is not owned by root
Checking to see if Oracle CRS stack is already configured

Setting the permissions on OCR backup directory
Setting up NS directories
Oracle Cluster Registry configuration upgraded successfully
WARNING: directory '/data/oracle/product/10.2' is not owned by root
WARNING: directory '/data/oracle/product' is not owned by root
WARNING: directory '/data/oracle' is not owned by root
WARNING: directory '/data' is not owned by root
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node :
node 1: ahrac1 ahrac1-priv ahrac1
node 2: ahrac2 ahrac2-priv ahrac2
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Now formatting voting device: /dev/vx/rdsk/datadg/vot
Now formatting voting device: /dev/vx/rdsk/datadg/vot2
Now formatting voting device: /dev/vx/rdsk/datadg/vot3
Format of 3 voting devices complete.
Startup will be queued to init within 30 seconds.
Adding daemons to inittab
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
ahrac1
CSS is inactive on these nodes.
ahrac2
Local node checking complete.
Run root.sh on remaining nodes to start CRS daemons.

另一個節點執行root.sh指令碼的時候會報錯:

root@ahrac2 # . /data/oracle/product/10.2/crs/root.sh
WARNING: directory '/data/oracle/product/10.2' is not owned by root
WARNING: directory '/data/oracle/product' is not owned by root
WARNING: directory '/data/oracle' is not owned by root
WARNING: directory '/data' is not owned by root
Checking to see if Oracle CRS stack is already configured

Setting the permissions on OCR backup directory
Setting up NS directories
Oracle Cluster Registry configuration upgraded successfully
WARNING: directory '/data/oracle/product/10.2' is not owned by root
WARNING: directory '/data/oracle/product' is not owned by root
WARNING: directory '/data/oracle' is not owned by root
WARNING: directory '/data' is not owned by root
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 10G Release 2.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node :
node 1: ahrac1 ahrac1-priv ahrac1
node 2: ahrac2 ahrac2-priv ahrac2
clscfg: Arguments check out successfully.

NO KEYS WERE WRITTEN. Supply -force parameter to override.
-force is destructive and will destroy any previous cluster
configuration.
Oracle Cluster Registry for cluster has already been initialized
Startup will be queued to init within 30 seconds.
Adding daemons to inittab
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
ahrac1
ahrac2
CSS is active on all nodes.
Waiting for the Oracle CRSD and EVMD to start
Oracle CRS stack installed and running under init(1M)
Running vipca(silent) for configuring nodeapps
The given interface(s), "ce0" is not public. Public interfaces should be used to configure virtual IPs.

這個錯誤的具體描述在Solaris8RAC安裝文件中已經詳細描述了,解決方法是手工啟動vipca進行配置。

root@ahrac1 # cd /data/oracle/product/10.2/crs/bin
root@ahrac1 # ./vipca

Xmanager中啟動一個終端,啟動vipca圖形介面。點選next,出現所有可用的網路介面,由於ce0配置的是PUBLIC INTERFACT,這裡選擇ce0,點選next,在出現的配置中IP Alias Name分別填入:ahrac1-vipahrac2-vipIP address處填入:172.25.198.44172.25.198.45。這裡如果你的配置是正確的,那麼你填完一個IPOracle會自動將剩下三個配置補齊。點選next,出現彙總頁面,檢查無誤後,點選Finish

Oracle會執行6個步驟,Create VIP application resourceCreate GSD application resourceCreate ONS application resourceStart VIP application resourceStart GSD application resourceStart ONS application resource

全部成功後點選OK,結束VIPCA的配置。

這時候返回Cluster Ware的安裝介面,點選OKOracle自動啟動兩個工具,並再次執行驗證,順利結束後,安裝完成。

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

相關文章