首先保证Zookeeper集群的正常部署,并启动之:
[fancyry@hadoop102 zookeeper-3.4.10]$ bin/zkServer.sh start
[fancyry@hadoop103 zookeeper-3.4.10]$ bin/zkServer.sh start
[fancyry@hadoop104 zookeeper-3.4.10]$ bin/zkServer.sh start
Hadoop集群的正常部署并启动:
[fancyry@hadoop102 hadoop-2.7.2]$ sbin/start-dfs.sh
[fancyry@hadoop103 hadoop-2.7.2]$ sbin/start-yarn.sh
解压 HBase 到指定目录:
[fancyry@hadoop102 software]$ tar -zxvf hbase-1.3.1-bin.tar.gz -C /opt/module
修改 HBase 对应的配置文件。
hbase-env.sh 修改内容:
export JAVA_HOME=/opt/module/jdk1.8.0_144
export HBASE_MANAGES_ZK=false
hbase-site.xml 修改内容:
<configuration>
<property>
<name>hbase.rootdirname>
<value>hdfs://hadoop102:9000/hbasevalue>
property>
<property>
<name>hbase.cluster.distributedname>
<value>truevalue>
property>
<property>
<name>hbase.master.portname>
<value>16000value>
property>
<property>
<name>hbase.zookeeper.quorumname>
<value>hadoop102:2181,hadoop103:2181,hadoop104:2181value>
property>
<property>
<name>hbase.zookeeper.property.dataDirname>
<value>/opt/module/zookeeper-3.4.10/zkDatavalue>
property>
configuration>
regionservers:
hadoop102
hadoop103
hadoop104
软连接hadoop配置文件到 HBase:
[fancyry@hadoop102 module]$ ln -s /opt/module/hadoop-2.7.2/etc/hadoop/core-site.xml /opt/module/hbase/conf/core-site.xml
[fancyry@hadoop102 module]$ ln -s /opt/module/hadoop-2.7.2/etc/hadoop/hdfs-site.xml /opt/module/hbase/conf/hdfs-site.xml
[fancyry@hadoop102 module]$ xsync hbase/
启动方式1
[fancyry@hadoop102 hbase]$ bin/hbase-daemon.sh start master
[fancyry@hadoop102 hbase]$ bin/hbase-daemon.sh start regionserver
修复提示:
a、同步时间服务
b、属性:hbase.master.maxclockskew设置更大的值
<property>
<name>hbase.master.maxclockskewname>
<value>180000value>
<description>Time difference of regionserver from masterdescription>
property>
启动方式2
[fancyry@hadoop102 hbase]$ bin/start-hbase.sh
对应的停止服务:
[fancyry@hadoop102 hbase]$ bin/stop-hbase.sh
启动成功后,可以通过“host:port”的方式来访问 HBase 管理页面,例如:
http://hadoop102:16010