11g RAC完全安装图解(VM Workstation8.0+Centos5.5)01-Grid安装


Created By Cryking 转载请注明出处,谢谢

环境:
VMware Workstation8.0 +Centos 5.5(32位)+Oracle 11.2.0.1.0
两个节点crydb01(节点1)和crydb02(节点2)

一、设置主机名及 网络环境配置
在节点1上:
设置主机名

# hostname crydb01
# vi /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=crydb01
GATEWAY=192.168.123.1
# vi /etc/hosts
127.0.0.1               localhost.localdomain localhost
#Public IP
192.168.123.109 crydb01
192.168.123.108 crydb02
#Private IP
10.0.0.100      crydb01-pri
10.0.0.101      crydb02-pri
#VIP
192.168.123.209 crydb01-vip
192.168.123.208 crydb02-vip
#scan-ip
192.168.123.200 crydb-scan
::1             localhost6.localdomain6 localhost6

# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.123.109
NETMASK=255.255.255.0
GATEWAY=192.168.123.1
HWADDR=00:0c:29:6c:59:9c

节点1的虚拟机添加网卡:
这里写图片描述
这里写图片描述
这里写图片描述

添加完网卡后重启系统并设置eth1的ip:

# reboot
# vi /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=static
ONBOOT=yes
IPADDR=10.0.0.100
NETMASK=255.255.255.0
HWADDR=00:0c:29:6c:59:a6
# service network restart

在节点2上:

# hostname crydb02
# vi /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=crydb02
GATEWAY=192.168.123.1

# vi /etc/hosts
127.0.0.1               localhost.localdomain localhost
#Public IP
192.168.123.109 crydb01
192.168.123.108 crydb02
#Private IP
10.0.0.100      crydb01-pri
10.0.0.101      crydb02-pri
#VIP
192.168.123.209 crydb01-vip
192.168.123.208 crydb02-vip
#scan-ip
192.168.123.200 scan
::1             localhost6.localdomain6 localhost6

# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.123.108
NETMASK=255.255.255.0
GATEWAY=192.168.123.1
HWADDR=00:0c:29:6c:59:9c

重复上面的添加网卡过程,然后重启系统,然后:

# vi /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=static
ONBOOT=yes
IPADDR=10.0.0.101
NETMASK=255.255.255.0
HWADDR=00:0c:29:85:3b:3f

二、 用户及用户组设置
分别在两个节点上以root用户进行如下操作:

# groupadd -g 500 oinstall
# groupadd -g 501 dba
# groupadd -g 1020 asmadmin
# groupadd -g 1022 asmoper
# groupadd -g 1021 asmdba
# useradd -u 1100 -g oinstall -G dba,asmadmin,asmdba,asmoper -d /home/grid -s /bin/bash grid
# useradd -u 1101 -g oinstall -G dba,asmdba -d /home/oracle -s /bin/bash oracle
# passwd grid
# passwd oracle
# mkdir -p /u01/app/11.2.0/grid
# mkdir -p /u01/app/grid
# mkdir -p /u01/app/oracle
# chown grid:oinstall /u01/app/11.2.0/grid
# chown grid:oinstall /u01/app/grid
# chown oracle:oinstall /u01/app/oracle
# chmod -R 775 /u01/

三、配置用户SSH等效性
先配置Oracle用户SSH等效性.
在节点1上:

[oracle@crydb01 ~]$ su - oracle
[oracle@crydb01 ~]$ mkdir ./ssh
[oracle@crydb01 ~]$ chmod 700 ./ssh
[oracle@crydb01 ~]$ /usr/bin/ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_rsa): 
Created directory '/home/oracle/.ssh'.
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/oracle/.ssh/id_rsa.
Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.
The key fingerprint is:
d1:85:66:a2:78:65:8c:db:81:f6:90:52:21:4b:b2:6b oracle@crydb01
[oracle@crydb01 ~]$ /usr/bin/ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_dsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/oracle/.ssh/id_dsa.
Your public key has been saved in /home/oracle/.ssh/id_dsa.pub.
The key fingerprint is:
0f:10:50:57:c5:2f:06:b2:61:52:5a:61:5b:18:9c:1d oracle@crydb01
[oracle@crydb01 ssh]$ cat ~/.ssh/id_rsa.pub >>~/.ssh/authorized_keys
[oracle@crydb01 ssh]$ cat ~/.ssh/id_dsa.pub >>~/.ssh/authorized_keys
[oracle@crydb01 ~]$ chmod 600 ~/.ssh/authorized_keys

在节点2上进行同样操作:

[root@crydb02 ~]# su - oracle
[oracle@crydb02 ~]$ mkdir ./ssh
[oracle@crydb02 ~]$ chmod 700 ./ssh
[oracle@crydb02 ~]$ /usr/bin/ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_rsa): 
/home/oracle/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/oracle/.ssh/id_rsa.
Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.
The key fingerprint is:
ff:6b:3e:b5:39:80:2b:37:88:d6:fe:cf:c6:b5:3b:ec oracle@crydb02
[oracle@crydb02 ~]$ /usr/bin/ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_dsa): 
/home/oracle/.ssh/id_dsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/oracle/.ssh/id_dsa.
Your public key has been saved in /home/oracle/.ssh/id_dsa.pub.
The key fingerprint is:
aa:b8:46:02:60:aa:83:72:df:43:d1:1
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值