首先配ssh: https://blog.csdn.net/zs391077005/article/details/106827331
要分别能和自己以及其他节点都能ssh成功。
配置 slaves
cd /opt/module/hadoop-2.7.2/etc/hadoop
vi slaves
在该文件中删掉localhost,增加如下内容:
hadoop102
hadoop103
hadoop104
注意:该文件中添加的内容结尾不允许有空格,文件中不允许有空行。
同步所有节点配置文件
xsync slaves
启动:
sbin/start-dfs.sh
在hadoop103上起动resource manager
sbin/start-yarn.sh