iamdll 2020-06-01
1.在NameNode的一个节点下执行以下命令
#!/bin/bash for i in 192.168.1.101 192.168.1.102 192.168.1.103 do ssh $i "source /etc/profile;source ~/.bash_profile;/home/abby/zookeeper-3.4.14/bin/zkServer.sh start;exit" done echo ‘zookeeper启动完毕‘ echo ‘正在启动hadoop‘ source /etc/profile source ~/.bash_profile /home/abby/hadoop-3.2.1/sbin/start-all.sh echo ‘启动hadoop 完成‘
三个IP地址是zookeeper所在的节点需要启动
后面的是启动hadoop .
至此 , zookeeper和hadoop全部启动