- 最后登录
- 2015-3-31
- 在线时间
- 10 小时
- 威望
- 15
- 金钱
- 215
- 注册时间
- 2013-8-23
- 阅读权限
- 10
- 帖子
- 16
- 精华
- 0
- 积分
- 15
- UID
- 1198
|
1#
发表于 2015-1-6 13:08:24
|
查看: 3864 |
回复: 2
本帖最后由 乌鲁木齐-小小 于 2015-1-6 16:16 编辑
node1信息
[root@lxb1 ~]# more /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
10.3.21.66 lxb1 lxb1.oracle.com
10.3.21.68 lxb1-vip
10.3.21.56 lxb2 lxb2.oracle.com
10.3.21.57 lxb2-vip
1.1.1.66 lxb1-priv1
1.1.1.67 lxb2-priv2
1.1.1.56 lxb2-priv1
1.1.1.57 lxb2-priv2
10.3.21.60 lxb-cluster lxb-cluster-scan
[root@lxb1 ~]# ifconfig
bond0 Link encap:Ethernet HWaddr 00:50:56:84:39:05
inet addr:10.3.21.66 Bcast:10.255.255.255 Mask:255.0.0.0
inet6 addr: fe80::250:56ff:fe84:3905/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:1546 errors:0 dropped:0 overruns:0 frame:0
TX packets:118 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:137566 (134.3 KiB) TX bytes:17231 (16.8 KiB)
eth0 Link encap:Ethernet HWaddr 00:50:56:84:39:05
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:771 errors:0 dropped:0 overruns:0 frame:0
TX packets:118 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:68663 (67.0 KiB) TX bytes:17231 (16.8 KiB)
eth1 Link encap:Ethernet HWaddr 00:50:56:84:39:05
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:775 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:68903 (67.2 KiB) TX bytes:0 (0.0 b)
eth2 Link encap:Ethernet HWaddr 00:50:56:84:17:5B
inet addr:10.3.21.68 Bcast:10.255.255.255 Mask:255.0.0.0
inet6 addr: fe80::250:56ff:fe84:175b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:650 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:52214 (50.9 KiB) TX bytes:816 (816.0 b)
eth3 Link encap:Ethernet HWaddr 00:50:56:84:1E:90
inet addr:1.1.1.66 Bcast:1.255.255.255 Mask:255.0.0.0
inet6 addr: fe80::250:56ff:fe84:1e90/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:556 errors:0 dropped:0 overruns:0 frame:0
TX packets:90 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:46574 (45.4 KiB) TX bytes:4092 (3.9 KiB)
eth4 Link encap:Ethernet HWaddr 00:50:56:84:24:4B
inet addr:1.1.1.67 Bcast:1.255.255.255 Mask:255.0.0.0
inet6 addr: fe80::250:56ff:fe84:244b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:618 errors:0 dropped:0 overruns:0 frame:0
TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:50294 (49.1 KiB) TX bytes:746 (746.0 b)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:58 errors:0 dropped:0 overruns:0 frame:0
TX packets:58 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5008 (4.8 KiB) TX bytes:5008 (4.8 KiB)
virbr0 Link encap:Ethernet HWaddr 52:54:00:30:98:71
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
node2信息
[root@lxb2 ~]# more /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
10.3.21.66 lxb1 lxb1.oracle.com
10.3.21.68 lxb1-vip
10.3.21.56 lxb2 lxb2.oracle.com
10.3.21.57 lxb2-vip
1.1.1.66 lxb1-priv1
1.1.1.67 lxb2-priv2
1.1.1.56 lxb2-priv1
1.1.1.57 lxb2-priv2
10.3.21.60 lxb-cluster lxb-cluster-scan
[root@lxb2 ~]# ifconfig
bond0 Link encap:Ethernet HWaddr 00:50:56:84:78:55
inet addr:10.3.21.56 Bcast:10.255.255.255 Mask:255.0.0.0
inet6 addr: fe80::250:56ff:fe84:7855/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:1769 errors:0 dropped:0 overruns:0 frame:0
TX packets:123 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:157480 (153.7 KiB) TX bytes:19658 (19.1 KiB)
eth0 Link encap:Ethernet HWaddr 00:50:56:84:78:55
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:883 errors:0 dropped:0 overruns:0 frame:0
TX packets:123 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:78650 (76.8 KiB) TX bytes:19658 (19.1 KiB)
eth1 Link encap:Ethernet HWaddr 00:50:56:84:78:55
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:886 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:78830 (76.9 KiB) TX bytes:0 (0.0 b)
eth2 Link encap:Ethernet HWaddr 00:50:56:84:50:FE
inet addr:10.3.21.57 Bcast:10.255.255.255 Mask:255.0.0.0
inet6 addr: fe80::250:56ff:fe84:50fe/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:744 errors:0 dropped:0 overruns:0 frame:0
TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:59838 (58.4 KiB) TX bytes:746 (746.0 b)
eth3 Link encap:Ethernet HWaddr 00:50:56:84:21:BD
inet addr:1.1.1.56 Bcast:1.255.255.255 Mask:255.0.0.0
inet6 addr: fe80::250:56ff:fe84:21bd/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:720 errors:0 dropped:0 overruns:0 frame:0
TX packets:23 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:58398 (57.0 KiB) TX bytes:1250 (1.2 KiB)
eth4 Link encap:Ethernet HWaddr 00:50:56:84:24:81
inet addr:1.1.1.57 Bcast:1.255.255.255 Mask:255.0.0.0
inet6 addr: fe80::250:56ff:fe84:2481/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:715 errors:0 dropped:0 overruns:0 frame:0
TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:58098 (56.7 KiB) TX bytes:746 (746.0 b)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:628 (628.0 b) TX bytes:628 (628.0 b)
virbr0 Link encap:Ethernet HWaddr 52:54:00:30:98:71
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
在完成ssh配置后,打开命令行窗口,使用ssh lxb2 需要输入密码
但是我退出再登录,再次使用ssh lxb2 就不需要输入密码了
退出再次登录后两个节点可以相互ssh通过
[root@lxb1 ~]# su - grid
[grid@lxb1 ~]$ ssh lxb2
Last login: Tue Jan 6 21:07:32 2015 from lxb1
[grid@lxb2 ~]$ ssh lxb1
Last login: Tue Jan 6 21:07:43 2015 from lxb2
私有网络的ssh
[grid@lxb2 ~]$ ssh lxb1-priv1
The authenticity of host 'lxb1-priv1 (1.1.1.66)' can't be established.
RSA key fingerprint is 9d:a0:3d:f6:98:d7:dc:2f:11:ac:38:3e:5f:d8:56:32.
Warning: Permanently added 'lxb1-priv1,1.1.1.66' (RSA) to the list of known hosts.
Last login: Tue Jan 6 21:30:55 2015 from lxb2
[grid@lxb1 ~]$ ssh lxb2-priv1
The authenticity of host 'lxb2-priv1 (1.1.1.56)' can't be established.
RSA key fingerprint is 9d:a0:3d:f6:98:d7:dc:2f:11:ac:38:3e:5f:d8:56:32.
Warning: Permanently added 'lxb2-priv1,1.1.1.56' (RSA) to the list of known hosts.
Last login: Tue Jan 6 21:30:11 2015 from lxb1
|
|