RAC 安装 简单步骤

13 建立和测试用户等效性
仅在一个节点上执行
exec /usr/bin/ssh-agent $SHELL
/usr/bin/ssh-add

例如
[oracle@inthrac01 ~]$ exec /usr/bin/ssh-agent $SHELL
[oracle@inthrac01 ~]$ /usr/bin/ssh-add
Enter passphrase for /home/oracle/.ssh/id_rsa:
Identity added: /home/oracle/.ssh/id_rsa (/home/oracle/.ssh/id_rsa)
Identity added: /home/oracle/.ssh/id_dsa (/home/oracle/.ssh/id_dsa)

测试
[oracle@inthrac01 ~]$ ssh oracle@inthrac02 date
Wed Jan 27 01:07:58 CST 2010
如果前面没有输入过密码的话,这里会提示输入密码一次。以后就不会叻

14 安装CRS
加入CRS的环境变量
建立CRS目录
export ORACLE_BASE=/u01/app/oracle
export CRS_HOME=$ORACLE_BASE/product/10.2.0/crs_1

mkdir $ORACLE_BASE/product/10.2.0/crs_1 -p

从Oracle网站下载10201_clusterware_linux32.zip

15. 安装ASM和Raw device
asm的安装这里不做介绍叻
ASM在10g的CRS里是不能存ocr和vote disk,所以我们这里可用ocfs/ocfs2和raw device来存ocr和vote disk
这里介绍raw device的方法。
这里我是用NAS的方式做的共享存储。
共享设备是/dev/sdd /dev/sde
其中
/dev/sdd 400M
/dev/sde 600M
/dev/sdd 给vote disk /dev/sde给ocr

在每个节点上修改/etc/sysconfig/rawservices
/dev/raw/raw1 /dev/sde1
/dev/raw/raw2 /dev/sdd1

执行
service rawdevices start
chown root:oinstall /dev/raw/raw[12]
chmod 660 /dev/raw/raw[12]

一切就绪,下面就开始安装叻

以Oracle用户登录一个节点,或者用客户端图形软件,我一般使用nx
unzip -x 10201_clusterware_linux32.zip

执行上面提到的建立用户等效性
exec /usr/bin/ssh-agent $SHELL
/usr/bin/ssh-add

保险起见,你可以先运行安装包里的cluvfy来检验一下安装
cluvfy/runcluvfy.sh stage -pre crsinst -n inthrac01
cluvfy/runcluvfy.sh stage -pre crsinst -n inthrac02

如果有时在节点上等效性验证失败的话,你可以执行一下ssh oracle@inthrac01 date,比如我在节点1上等效性验证失败,执行ssh oracle@inthrac01 dat,第一次输入密码,再执行一次,如果不需要密码,在检验一次,就可以通过叻。

 

安装crs软件

安装完成,根据提示,分别在两个节点执行$ORACLE_BASE/oraInventor/orainstRoot.sh

都执行完以后,再分别在两个节点执行$CRS_HOME/root.sh

执行结果如下
WARNING: directory '/u01/app/oracle/product/10.2.0' is not owned by root
WARNING: directory '/u01/app/oracle/product' is not owned by root
WARNING: directory '/u01/app/oracle' 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 '/u01/app/oracle/product/10.2.0' is not owned by root
WARNING: directory '/u01/app/oracle/product' is not owned by root
WARNING: directory '/u01/app/oracle' is not owned by root
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 10G Release 2.
assigning default hostname inthrac01 for node 1.
assigning default hostname inthrac02 for node 2.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node <nodenumber>: <nodename> <private interconnect name> <hostname>
node 1: inthrac01 inth-pri01 inthrac01
node 2: inthrac02 inth-pri02 inthrac02
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 90 seconds.
Adding daemons to inittab
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
inthrac01
inthrac02
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), "eth0" is not public. Public interfaces should be used to configure virtual IPs.

我们现在执行crsctl check crs看看crs的状况
[oracle@inthrac01 ~]$ crsctl check crs
CSS appears healthy
CRS appears healthy
EVM appears healthy

CRS已经安装成功了。

下面用crs_stat -t看看我们的crs里的应用
[oracle@inthrac02 ~]$ crs_stat -t
CRS-0202: No resources are registered.
这里提示是没有资源注册,为什么了。你可以注意到我们在上面root.sh的结果看到
在最后执行的节点上,会出现
The given interface(s), "eth0" is not public. Public interfaces should be used to configure virtual IPs.
vip配置失败,而vip的资源应用时所有的基础,这个有问题,其他的也都没有registery进来,解决方法在其中一个节点上以root执行vipca,手工配置vip。
[oracle@inthrac01 ~]$vipca
安装结束我们在看看这些resouce的状态

[oracle@inthrac01 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....c01.gsd application ONLINE ONLINE inthrac01
ora....c01.ons application ONLINE ONLINE inthrac01
ora....c01.vip application ONLINE ONLINE inthrac01
ora....c02.gsd application ONLINE ONLINE inthrac02
ora....c02.ons application ONLINE ONLINE inthrac02
ora....c02.vip application ONLINE ONLINE inthrac02

CRS已经安装成功叻。

数据库的安装如果是ASM的话,就和普通的ASM安装没什么差异叻。这里不就详解叻。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

inthirties

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值