HBase 安装部署

本文详细介绍了Hadoop、Zookeeper和HBase的集群部署步骤,包括Zookeeper和Hadoop的启动,HBase的安装、配置、分发及启动,并提供了启动成功后访问HBase管理页面的方法。确保所有节点时间同步,以防止regionserver启动异常。
摘要由CSDN通过智能技术生成

环境要求

Zookeeper集群的正常部署并启动

[linux@node1 zookeeper-3.5.7]$ bin/zkServer.sh start
[linux@node2 zookeeper-3.5.7]$ bin/zkServer.sh start
[linux@node3 zookeeper-3.5.7]$ bin/zkServer.sh start

Hadoop集群的正常部署并启动

[linux@node1 hadoop-3.1.3]$ sbin/start-dfs.sh
[linux@node2 hadoop-3.1.3]$ sbin/start-yarn.sh

HBase的安装部署

1.上传jar到服务器上

hbase-2.0.5-bin.tar.gz

2.解压HBase到指定目录并改名

[linux@node1 software]$ tar -zxvf hbase-2.0.5-bin.tar.gz -C /opt/module/
[linux@node1 module]$ mv hbase-2.0.5/ hbase

3.配置hbase环境变量

sudo vim /etc/profile.d/my_env.sh
#HBASE_HOME
export HBASE_HOME=/opt/module/hbase
export PATH=$PATH:$HBASE_HOME/bin
source /etc/profile.d/my_env.sh

4.修改HBase的配置文件

1)hbase-env.sh修改内容:

export HBASE_MANAGES_ZK=false

2)hbase-site.xml修改内容:

<property>
		<name>hbase.rootdir</name>
		<value>hdfs://node1:9820/HBase</value>
</property>
<property>
    	<name>hbase.unsafe.stream.capability.enforce</name>
     	<value>false</value>
</property>
<property>
		<name>hbase.cluster.distributed</name>
		<value>true</value>
</property>
<property>
		<name>hbase.zookeeper.quorum</name>
		<value>node1,node2,node3</value>
</property>

3)regionservers修改内容:

node1
node2
node3

5.HBase发送至其他机器

[linux@node1 module]$ xsync hbase/

[linux@node1 module]$ sudo /home/linux/bin/xsync /etc/profile.d/my_env.sh

其他机器

source /etc/profile.d/my_env.sh

6.HBase服务的启动
启动方式1:

[linux@node1 hbase]$ bin/hbase-daemon.sh start master

[linux@node1 hbase]$ bin/hbase-daemon.sh start regionserver
[linux@node2 hbase]$ bin/hbase-daemon.sh start regionserver
[linux@node3 hbase]$ bin/hbase-daemon.sh start regionserver

提示:如果集群之间的节点时间不同步,会导致regionserver无法启动,抛出ClockOutOfSyncException异常。

启动方式2

[linux@node1 hbase]$ bin/start-hbase.sh
 
#关闭
[linux@node1 hbase]$ bin/stop-hbase.sh

7.启动成功查看HBase页面

启动成功后,可以通过“host:port”的方式来访问HBase管理页面,例如:

http://192.168.42.101:16010
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值