五、安装配置ASMLIB,格式化共享磁盘
1.格式化共享磁盘
[root@rac1 ~]# cd /dev/
[root@rac1 dev]# ls sd*
[root@rac1 dev]#fdisk /dev/sdb
重复操作格式化 /dev/sdc /dev/sdd /dev/sde /dev/sdf
[root@rac1 dev]# ls sd*
[root@rac1 dev]# fdisk –l
2.安装配置ASMLIB
1)安装ASMLIB
使用ftp工具上传asmlib安装包,其中注意版本号对应
[root@rac1 ~]# uname -a
Linux rac1 2.6.18-238.el5 #1SMP Sun Dec 19 14:22:44 EST 2010 x86_64 x86_64 x86_64 GNU/Linux
oracleasm-support-2.1.8-1.el5.x86_64
oracleasmlib-2.0.4-1.el5.x86_64
oracleasm-2.6.18-238.el5-2.0.5-1.el5.x86_64
[root@rac2 ~]# cd /software/
[root@rac2 software]# rpm -Uvhoracleasmlib-2.0.4-1.el5.x86_64
oracleasm-support-2.1.8-1.el5.x86_64
oracleasm-2.6.18-238.el5-2.0.5-1.el5.x86_64
2)配置ASMLIB
[root@rac1 ~]#oracleasm configure –i
[root@rac1 ~]# oracleasm init
[root@rac1 ~]# /etc/init.d/oracleasm status
Checking if ASM is loaded: yes
Checking if /dev/oracleasm is mounted: yes
[root@rac1 ~]# oracleasmcreatedisk DISK1 /dev/sdb1
重复设置sdc1,sdd1,sde1,sdf1
[root@rac1 ~]# oracleasm scandisks
[root@rac1 ~]# oracleasm listdisks
如果在rac2上执行也能看到上图内容,说明ASMLIB配置成功
虚拟机时可以直接复制的,我们是学习阶段,所以建议rac2也安装上述操作步骤,重新操作一遍,其中安装Linux选择磁盘时,就可以选择rac1上的共享的那5个磁盘,不要在自己设置了
六、调试网络,配置信任关系
1.调试网络
1)在主节点rac1上ping节点rac2
[root@rac1 ~]#ping -c 3 rac2
[root@rac1 ~]#ping -c 3 192.168.1.202
[root@rac1 ~]#ping -c 3 rac2-priv
[root@rac1~]# ping -c 3 10.10.10.22
2)在节点rac2上ping节点rac1
[root@rac2 ~]#ping -c 3 rac1
[root@rac2 ~]#ping -c 3 192.168.1.201
[root@rac2 ~]#ping -c 3 rac1-priv
[root@rac2 ~]#ping -c 3 10.10.10.21
2.配置信任关系
1)在主节点rac1上以Oracle用户身份生成用户的公钥和私钥
[oracle@rac1 ~]$mkdir ~/.ssh
[oracle@rac1 ~]$ssh-keygen -t rsa
[oracle@rac1 ~]$ssh-keygen -t dsa
2)在rac2上以Oracle用户身份生成用户的公钥和私钥
[oracle@rac2 ~]$mkdir ~/.ssh
[oracle@rac2 ~]$ssh-keygen -t rsa
[oracle@rac2~]$ ssh-keygen -t dsa
3)在主节点rac1上Oracle用户执行秘钥同步操作
[oracle@rac1 ~]$cat ~/.ssh/id_rsa.pub >> ./.ssh/authorized_keys
[oracle@rac1 ~]$cat ~/.ssh/id_dsa.pub >> ./.ssh/authorized_keys
[oracle@rac1 ~]$ssh rac2 cat ~/.ssh/id_rsa.pub >> ./.ssh/authorized_keys
[oracle@rac1 ~]$ssh rac2 cat ~/.ssh/id_dsa.pub >> ./.ssh/authorized_keys
[oracle@rac1 ~]$ssh rac2 cat ~/.ssh/id_dsa.pub >> ./.ssh/authorized_keys
4)在两个节点上执行检验操作
[oracle@rac1 ~]$ ssh rac1 date
The authenticity of host 'rac1 (192.168.1.201)' can'tbe established.
RSA key fingerprint is4c:2b:f4:9b:86:87:40:0b:f2:ad:e9:3d:12:eb:ff:70.
Are you sure you want to continue connecting (yes/no)?yes
Warning: Permanently added 'rac1,192.168.1.201' (RSA)to the list of known hosts.
Sat May 17 17:21:13 CST 2014
出现上述内容,全部填写yes,并且一直测试到不再提示任何需要输入yes时,才算配置成功
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24626757/viewspace-2121279/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/24626757/viewspace-2121279/