常用命令(自己备用)

#开启hdfs和yarn
cd /opt/modules/hadoop-2.6.0-cdh5.9.0/sbin
./start-all.sh
#开启zookeeper
cd /opt/modules/zookeeper-3.4.5-cdh5.9.0/bin
./zkServer.sh start
#开启hbase
cd /opt/modules/hbase-1.2.0-cdh5.9.0/bin
./start-hbase.sh
#查看mysql运行状态
service mysql status
#开启mysql
service mysql start
#关闭mysql
service mysql stop
#开启jobhistoryserver
cd /opt/modules/hadoop-2.6.0-cdh5.9.0/sbin
./mr-jobhistory-daemon.sh start historyserver
#开启spark
cd /opt/modules/spark-1.6.3-bin-hadoop2.6/sbin
./start-all.sh
#开启hiveserver2
hiveserver2
 
#安全模式状态查看
cd /opt/modules/hadoop-2.6.0-cdh5.9.0/bin
./hdfs dfsadmin-safemode get
#离开安全模式
cd /opt/modules/hadoop-2.6.0-cdh5.9.0/bin
hdfs dfsadmin -safemode leave
#centos7查看防火墙状态
firewall-cmd --state
#centos7关闭防火墙
systemctl stop firewalld.service

猜你喜欢

转载自www.cnblogs.com/wtb0810/p/9777652.html
今日推荐