首先启动zookeeper集群,三天机子执行同样的操作:
xiaoye@ubuntu:~/zookeeper$ ./sbin/zkServer.sh start
(1)启动三个机器的日志节点:xiaoye@ubuntu:~$ hadoop/sbin/hadoop-daemons.sh start jorunalnode
(2)单独启动ubuntu的namenode,注意命令的daemon不带s哦。xiaoye@ubuntu:~$ hadoop/sbin/hadoop-daemon.sh start namenode
(3)ubuntu2节点执行命令:xiaoye@ubuntu2:~$ ./hadoop/bin/hdfs namenode -bootstrapStandby
(4)ubuntu2节点单独启动namenode;xiaoye@ubuntu2:~$ ./hadoop/sbin/hadoop-daemon.sh start namemode
(5) ubuntu启动所有datanode :xiaoye@ubuntu:~$ ./hadoop/sbin/hadoop-daemons.sh start datanode
(6)ubuntu3启动yarn资源管理:xiaoye@ubuntu3:~$ ./hadoop/sbin/start-yarn.sh
(7)ubuntu启动所有zkfc :xiaoye@ubuntu:~$ ./hadoop/sbin/hadoop-daemons.sh start zkfc
上面是分步骤启动,当然也可以在启动好zookeeper后直接执行:
xiaoye@ubuntu:~$ ./hadoop/sbin/start-dfs.sh
但还是要另外单独启动Yarn
就能够全部启动了。