本篇分四部分:
1、cluster安装前检查;
2、安装cluster;
3、配置VIP;
4、安装Oracle软件;
--------------------------------------------------------------------------------------------------------------
获取安装介质
oracle用户:/home/oracle
数据库软件:
gunzip 10201_database_linux_x86_64.cpio.gz
cpio -idmv<10201_database_linux_x86_64.cpio
集群件:
gunzip 10201_clusterware_linux_x86_64.cpio.gz
cpio -idmv<10201_clusterware_linux_x86_64.cpio
10.2.0.4补丁包:
p6810189_10204_Linux-x86-64.zip
unzip p6810189_10204_Linux-x86-64.zip
1、安装前预检查:
[oracle@dbcc1~]$ /home/oracle/clusterware/cluvfy/runcluvfy.shstage-pre crsinst -n dbcc1,dbcc2-verbose
Performing pre-checksforcluster services setup
Checking node reachability...
Check: Nodereachabilityfrom node "dbcc1"
Destination Node Reachable?
------------------------------------ ------------------------
dbcc1 yes
dbcc2 yes
Result: Nodereachabilitycheck passed from node "dbcc1".
Checking userequivalence...
Check:Userequivalence foruser "oracle"
Node Name Comment
------------------------------------ ------------------------
dbcc2 passed
dbcc1 passed
Result:Userequivalence check passedfor user "oracle".
Checking administrative privileges...
Check:Existenceof user "oracle"
Node Name User Exists Comment
------------ ------------------------ ------------------------
dbcc2 yes passed
dbcc1 yes passed
Result:Userexistence check passedfor "oracle".
Check:Existenceof group "oinstall"
Node Name Status Group ID
------------ ------------------------ ------------------------
dbcc2 exists 500
dbcc1 exists 500
Result:Groupexistence check passedfor "oinstall".
Check:Membershipof user "oracle" in group"oinstall" [asPrimary]
Node Name User Exists Group Exists Userin Group Primary Comment
---------------- ------------ ------------ ------------ ------------ ------
dbcc2 yes yes yes yes passed
dbcc1 yes yes yes yes passed
Result:Membershipcheck for user "oracle" in group"oinstall" [as Primary] passed.
Administrative privileges checkpassed.
Checking node connectivity...
Interface information for node"dbcc2"
Interface Name IP Address Subnet
------------------------------ ------------------------------ ----------------
eth0 192.168.100.162 192.168.100.0
eth2 192.168.0.162 192.168.0.0
Interface information for node"dbcc1"
Interface Name IP Address Subnet
------------------------------ ------------------------------ ----------------
eth0 192.168.100.161 192.168.100.0
eth2 192.168.0.161 192.168.0.0
Check: Nodeconnectivityof subnet "192.168.100.0"
Source Destination Connected?
------------------------------ ------------------------------ ----------------
dbcc2:eth0 dbcc1:eth0 yes
Result: Nodeconnectivitycheck passed for subnet "192.168.100.0"with node(s)dbcc2,dbcc1.
Check: Nodeconnectivityof subnet "192.168.0.0"
Source Destination Connected?
------------------------------ ------------------------------ ----------------
dbcc2:eth2 dbcc1:eth2 yes
Result: Nodeconnectivitycheck passed for subnet "192.168.0.0"with node(s)dbcc2,dbcc1.
Suitable interfaces for the private interconnecton subnet "192.168.100.0":
dbcc2 eth0:192.168.100.162
dbcc1 eth0:192.168.100.161
Suitable interfaces for the privateinterconnecton subnet "192.168.0.0":
dbcc2 eth2:192.168.0.162
dbcc1 eth2:192.168.0.161
ERROR:
Could not find a suitable set ofinterfaces for VIPs.
Result: Node connectivity checkfailed.
Checking system requirements for'crs'...
No checks registered for thisproduct.
Pre-check for cluster services setupwas unsuccessful on all the nodes.
实际上VIP是配置了的,这是oracle的问题,忽略;
2、oracle用户下启动界面安装:
选择inventory 目录:
配置CRS变量环境变量:
选择两个节点,节点2要手工Add
配置PublicIP和PrivateIP
配置OCR磁盘,之前已经建立好了对应的裸设备,这里直接输入即可
选择VOT磁盘:
这里出现一个错误提示,从提示来看,似乎是时间的问题。
检查我的两个节点的时间,是一致的。这是后来安装后,再次检查的时间:
[root@dbcc1 ~]# date
Fri Feb 21 17:21:38 CST 2014
[root@dbcc2 ~]# date
Fri Feb 21 17:21:38 CST 2014
网上查阅资料,在这里先忽略,‘Yes’,继续(改天再具体研究一下)
到了执行root脚本的时候
节点1:
[root@dbcc1oracle]#/oracle/oraInventory/orainstRoot.sh
Changing permissions of /oracle/oraInventoryto770.
Changing groupname of /oracle/oraInventoryto oinstall.
The executionof the script is complete
[root@dbcc1oracle]#/oracle/product/10.2.0/crs_1/root.sh
WARNING:directory '/oracle/product/10.2.0'is not owned by root
WARNING:directory '/oracle/product'is not owned by root
WARNING:directory '/oracle'is notowned by root
Checking to seeifOracle CRS stack is already configured
/etc/oracle doesnot exist. Creating it now.
Setting thepermissionson OCR backup directory
Setting up NS directories
Oracle ClusterRegistry configuration upgraded successfully
WARNING:directory '/oracle/product/10.2.0'is not owned by root
WARNING:directory '/oracle/product'is not owned by root
WARNING:directory '/oracle'is notowned by root
Successfully accumulated necessaryOCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node :
node 1: dbcc1 dbcc1-pip dbcc1
node 2: dbcc2 dbcc2-pip dbcc2
Creating OCR keys for user 'root', privgrp'root'..
Operation successful.
Now formatting voting device:/dev/raw/raw5
Now formatting voting device:/dev/raw/raw6
Now formatting voting device:/dev/raw/raw7
Format of3voting devices complete.
Startup will be queued to init within90seconds.
Adding daemons toinittab
Expecting the CRSdaemonsto be up within 600 seconds.
CSS isactive on these nodes.
dbcc1
CSS isinactiveon these nodes.
dbcc2
Local node checking complete.
Run root.sh onremaining nodes to start CRS daemons.
[root@dbcc1oracle]#/oracle/product/10.2.0/crs_1/bin/crs_stat-t
CRS-0184:Cannot communicatewith the CRS daemon.
需要在第二节点执行完成后 才可以启动CRS进程:
节点2:
[root@dbcc2oracle]#/oracle/product/10.2.0/crs_1/root.sh
WARNING:directory '/oracle/product/10.2.0'is not owned by root
WARNING:directory '/oracle/product'is not owned by root
WARNING:directory '/oracle'is notowned by root
Checking to seeifOracle CRS stack is already configured
SettingthepermissionsonOCRbackupdirectory
Setting up NS directories
Oracle ClusterRegistry configuration upgraded successfully
WARNING:directory '/oracle/product/10.2.0'is not owned by root
WARNING:directory '/oracle/product'is not owned by root
WARNING:directory '/oracle'is notowned by root
clscfg:EXISTING configurationversion 3 detected.
clscfg:version 3 is 10GRelease 2.
Successfully accumulated necessaryOCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node :
node 1: dbcc1 dbcc1-pip dbcc1
node 2: dbcc2 dbcc2-pip dbcc2
clscfg:Argumentscheck out successfully.
NO KEYS WERE WRITTEN. Supply-force parameter to override.
-forceisdestructive and will destroyany previous cluster
configuration.
Oracle ClusterRegistryfor cluster has already beeninitialized
Startup will be queued to init within90seconds.
Adding daemons toinittab
Expecting the CRSdaemonsto be up within 600 seconds.
CSS isactive on these nodes.
dbcc1
dbcc2
CSS isactiveon all nodes.
Waiting fortheOracle CRSD and EVMDto start
Waiting fortheOracle CRSD and EVMDto start
Waiting fortheOracle CRSD and EVMDto start
Waiting fortheOracle CRSD and EVMDto start
Waiting fortheOracle CRSD and EVMDto start
Waiting fortheOracle CRSD and EVMDto start
Waiting fortheOracle CRSD and EVMDto start
Waiting fortheOracle CRSD and EVMDto start
Oracle CRS stack installed andrunning under init(1M)
Running vipca(silent)forconfiguring nodeapps
The given interface(s),"eth0" is not public. Public interfaces should be used to configurevirtual IPs.
注意:
The given interface(s),"eth0" is not public. Public interfaces should be used to configurevirtual IPs.
需要手工配置VIP
这里,实际上在第二节点执行时遇到了另外一个问题,改天再总结一下;这里先展示这个相对比较成功的信息
3、配置VIP
节点1,root用户 启动VIPCA界面
/oracle/product/10.2.0/crs_1/bin/vipca
这里手工输入节点1的vip的ip地址后,其他的oracle就自动补全了
VIP配置完成;
最后记得之前cluster等待执行root脚本的界面继续
完成cluster的安装:
现在可以查看组件状态了:
[root@dbcc1bin]# pwd
/oracle/product/10.2.0/crs_1/bin
[root@dbcc1bin]# ./crs_stat-t
Name Type Target State Host
------------------------------------------------------------------------------
ora.dbcc1.gsd application ONLINE ONLINE dbcc1
ora.dbcc1.ons application ONLINE ONLINE dbcc1
ora.dbcc1.vip application ONLINE ONLINE dbcc1
ora.dbcc2.gsd application ONLINE ONLINE dbcc2
ora.dbcc2.ons application ONLINE ONLINE dbcc2
ora.dbcc2.vip application ONLINE ONLINE dbcc2
4、安装oracle软件
下面安装Oracle10.2.0.1软件,不建库:
这里配置安装目录,看上去是直接从oracle环境变量里获取到了信息:
选择两个节点
注意:这里选择不创建数据库,仅安装数据库软件:
又遇到这个时间戳的问题,继续忽略:‘Yes’
又到执行root脚本的时候,这里是database部分的脚本,基本上不会出什么问题;
节点1:
[root@dbcc1~]#/oracle/product/10.2.0/db_1/root.sh
Running Oracle10 root.sh script...
Thefollowingenvironment variables aresetas:
ORACLE_OWNER= oracle
ORACLE_HOME= /oracle/product/10.2.0/db_1
Enter thefullpathname of the local bindirectory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Creating /etc/oratabfile...
Entries will be added to the /etc/oratabfileas needed by
Database Configuration Assistantwhen a database iscreated
Finished running generic part ofroot.sh script.
Now product-specificroot actions will be performed.
节点2:
[root@dbcc2~]#/oracle/product/10.2.0/db_1/root.sh
Running Oracle10 root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /oracle/product/10.2.0/db_1
Enter thefullpathname of the local bindirectory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Creating /etc/oratabfile...
Entries will be added to the /etc/oratabfileas needed by
Database Configuration Assistantwhen a database is created
Finished running generic partofroot.sh script.
Now product-specificroot actions will be performed.
执行后,回到等待root脚本执行的界面,OK,完成安装
cluster和database软件安装完成;