免密和防火墙
1.生成密钥
[hadoop @master ~]$ ssh-keygen [按四个回车] (或者:ssh-keygen -t rsa)
2.密钥拷贝到目标机器
[hadoop @master ~]$ ssh-copy-id slave01 会要求输入密码: hadoop@slave01's password: 123456 同时拷贝到另外两台机器: [hadoop @master ~]$ ssh-copy-id slave02 [hadoop @master ~]$ ssh-copy-id master
3.关闭防火墙
*查看防火墙状态
sudo service iptables status
*关闭防火墙
sudo service iptables stop
*查看防火墙开机启动状态
sudo chkconfig iptables --list
*关闭防火墙开机启动
sudo chkconfig iptables off
注意:如果是 CentOS7,则执行以下命令:
sudo systemctl stop firewalld.service sudo systemctl disable firewalld.service



