elrepo ELRepo.org Community Enterprise Linux Repository - el6 300
epel Extra Packages for Enterprise Linux 6 - x86_64 12,071+108
extras CentOS-6 - Extras 62
updates CentOS-6 - Updates 293
repolist: 19,422
6、节点之间配置SSH互信:
node1:
[root@node1 ~]# ssh-keygen -t rsa -f ~/.ssh/id_rsa -P ''
[root@node1 ~]# ssh-copy-id -i .ssh/id_rsa.pub root@node2.test.com
[root@node1 ~]# ssh node2
[root@node1 ~]# ssh node2
Last login: Mon Jul 18 02:25:13 2016 from 172.18.109.207
[root@node2 ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:f8:c2:31 brd ff:ff:ff:ff:ff:ff
inet 172.18.109.235/26 brd 172.18.109.255 scope global eth0
inet6 fe80::20c:29ff:fef8:c231/64 scope link
valid_lft forever preferred_lft forever
node2:
[root@node2 ~]# ssh-keygen -t rsa -f ~/.ssh/id_rsa -P ''
[root@node2 ~]# ssh-copy-id -i .ssh/id_rsa.pub root@node1.test.com
[root@node2 ~]# ssh node1
[root@node2 ~]# ssh node1
Last login: Sat Jul 23 22:49:11 2016 from 172.18.109.207
[root@node1 ~]# ip a
(责任编辑:liangzh) |