一键启动集群的shell脚本,包括HDFS HA + YARN相关所有程序,FBI00X是主机名,供大家参考:
#!/bin/bash echo "-------------------------Step1----------------------------" echo "Now,starting Zookeeper." ssh FBI001 $ZOOKEEPER_HOME/bin/zkServer.sh start ssh FBI002 $ZOOKEEPER_HOME/bin/zkServer.sh start ssh FBI003 $ZOOKEEPER_HOME/bin/zkServer.sh start ssh FBI001 $ZOOKEEPER_HOME/bin/zkServer.sh status ssh FBI002 $ZOOKEEPER_HOME/bin/zkServer.sh status ssh FBI003 $ZOOKEEPER_HOME/bin/zkServer.sh status echo "Now,Zookeeper is started." echo "-------------------------Step2----------------------------" echo "Now,starting ZKFC." ssh FBI001 $HADOOP_HOME/sbin/hadoop-daemon.sh start zkfc ssh FBI002 $HADOOP_HOME/sbin/hadoop-daemon.sh start zkfc echo "Now,ZKFC started." echo "-------------------------Step3----------------------------" echo "Now,starting JN." ssh FBI001 $HADOOP_HOME/sbin/hadoop-daemon.sh start journalnode ssh FBI002 $HADOOP_HOME/sbin/hadoop-daemon.sh start journalnode ssh FBI003 $HADOOP_HOME/sbin/hadoop-daemon.sh start journalnode echo "Now,JN started." echo "-------------------------Step4----------------------------" echo "Now,starting Active,Standby NN." ssh FBI001 $HADOOP_HOME/sbin/hadoop-daemon.sh start namenode ssh FBI002 $HADOOP_HOME/sbin/hadoop-daemon.sh start namenode echo "Now,Active,Standby NN started." echo "-------------------------Step5----------------------------" echo "Now,starting DataNodes." ssh FBI001 $HADOOP_HOME/sbin/hadoop-daemons.sh start datanode echo "Now,DataNodes started." echo "-------------------------Step6----------------------------" echo "Now,starting YARN." ssh FBI003 $HADOOP_HOME/sbin/start-yarn.sh echo "Now,YARN started." echo "-------------------------Step7----------------------------" echo "Now,starting MR JobHistory Server." ssh FBI004 $HADOOP_HOME/sbin/mr-jobhistory-daemon.sh start historyserver echo "Now,MR JobHistory Server started."
本栏目更多精彩内容:http://www.bianceng.cnhttp://www.bianceng.cn/webkf/tools/
以上是小编为您精心准备的的内容,在的博客、问答、公众号、人物、课程等栏目也有的相关内容,欢迎继续使用右上角搜索按钮进行搜索ssh
, zookeeper
, echo
, hadoop集群
, hive zookeeper
, start
, hadoop 启动
, linux hadoop ssh
, 集群java需求zookeeper
, zkfc
, 脚本集群hadoop
, linux发布zookeeper
, zookeeper 无法正常启动
Now
shell 一键安装脚本、一键加密shell脚本、redis 集群启动脚本、weblogic集群启动脚本、hadoop集群启动脚本,以便于您获取更多的相关知识。