在启动hbase时,要提前确保HDFS和zookeeper是已经启动状态,
先用jps,查询全部启动的进程

[root@node01 ~]# jps
2816 DataNode
6642 RunJar
3074 ResourceManager
2677 NameNode
6454 RunJar
5992 HRegionServer
5833 HMaster
2169 -- process information unavailable
7562 Jps
3597 QuorumPeerMain
3182 NodeManager

HDFS的进程名:::2816 DataNode 2677 NameNode
zookeeper的进程名:::3597 QuorumPeerMain

启动HDFS和zookeeper前,
一定要关闭防火墙 和所有节点的时间同步
一定要关闭防火墙 和所有节点的时间同步
一定要关闭防火墙 和所有节点的时间同步
一定要关闭防火墙 和所有节点的时间同步
一定要关闭防火墙 和所有节点的时间同步
一定要关闭防火墙 和所有节点的时间同步

关闭防火墙命令:

[root@node01 ~]# service iptables stop
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Unloading modules:                               [  OK  ]
[root@node01 ~]# chkconfig iptables off

查询防火墙命令:

[root@node01 ~]# service iptables status
iptables: Firewall is not running

永久关闭防火墙命令:

[root@node01 ~]# chkconfig iptables off

所有节点的时间同步命令:ntpdate ntp2.aliyun.com
建议再总命令行执行次命令
在这里插入图片描述

确保防火墙关闭和时间同步无误后,在启动hdfs和zookeeper的进程

如果没有HDFS的进程名,则需要启动HDFS,
启动方法:start-all.sh
启动完后,在用jps查看下是否启动成功

[root@node01 ~]# start-all.sh
This script is Deprecated. Instead use start-dfs.sh and start-yarn.sh
Starting namenodes on [node01]
node01: starting namenode, logging to /export/servers/hadoop-2.6.0-cdh5.14.0/logs/hadoop-root-namenode-node01.out
node02: starting datanode, logging to /export/servers/hadoop-2.6.0-cdh5.14.0/logs/hadoop-root-datanode-node02.out
node01: starting datanode, logging to /export/servers/hadoop-2.6.0-cdh5.14.0/logs/hadoop-root-datanode-node01.out
node03: starting datanode, logging to /export/servers/hadoop-2.6.0-cdh5.14.0/logs/hadoop-root-datanode-node03.out
Starting secondary namenodes [node02]
node02: starting secondarynamenode, logging to /export/servers/hadoop-2.6.0-cdh5.14.0/logs/hadoop-root-secondarynamenode-node02.out
starting yarn daemons
starting resourcemanager, logging to /export/servers/hadoop-2.6.0-cdh5.14.0/logs/yarn-root-resourcemanager-node01.out
node01: starting nodemanager, logging to /export/servers/hadoop-2.6.0-cdh5.14.0/logs/yarn-root-nodemanager-node01.out
node02: starting nodemanager, logging to /export/servers/hadoop-2.6.0-cdh5.14.0/logs/yarn-root-nodemanager-node02.out
node03: starting nodemanager, logging to /export/servers/hadoop-2.6.0-cdh5.14.0/logs/yarn-root-nodemanager-node03.out
[root@node01 ~]# jps
8689 NodeManager
6642 RunJar
6454 RunJar
8326 DataNode
8582 ResourceManager
5992 HRegionServer
8184 NameNode
5833 HMaster
2169 -- process information unavailable
9019 Jps
3597 QuorumPeerMain

HDFS启动成功,先登录hdfs的web页面查看下,
hdfs的web页面端口号:50070
在这里插入图片描述

启动zookeeper进程:
1、先要到zookeeper目录中的bin目录下
2、在bin目录中执行 zkServer.sh start
执行完,在用jps查看zookeeper的进程名:QuorumPeerMain

[root@node01 ~]# cd /export/servers/zookeeper/bin
[root@node01 bin]# zkServer.sh start
[root@node01 bin]# jps
8689 NodeManager
9476 Jps
8326 DataNode
8582 ResourceManager
5992 HRegionServer
8184 NameNode
9448 QuorumPeerMain
5833 HMaster

确保hdfs跟zookeeper启动成功后,
再启动HBase
一键启动:start-hbase.sh

HBase的web端口号为:60010 可以登陆下,看看hbase是否启动成功

在这里插入图片描述

看到此页面就是启动成功 看到此页面就是启动成功 看到此页面就是启动成功 看到此页面就是启动成功 看到此页面就是启动成功

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐