Hbase的单机版搭建

来源:互联网 发布:ubuntu 16.04 五笔 编辑:程序博客网 时间:2024/04/19 09:03

前提:a.搭建hadoop集群;b.关闭外部zookeeper集群,因为单机版自己内部维护zookeeper集群,会导致冲突

1.官网下载hbase包

2.上传到服务器的usr下解压

tar -zxvf hbase-1.1.3-bin.tar.gz 

3.修改配置hbase-env.sh

vi conf/hbase-env.sh

配置JAVA_HOME

export JAVA_HOME=/usr/java/jdk1.7.0_79

4.修改配置hbase-site.xml

vi conf/hbase-site.xml

<configuration>
<property>
<name>hbase.rootdir</name>
<value>file:///opt/hbase/hbase</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/opt/hbase/zookeeper</value>
</property>
</configuration>

5.启动hbase

bin/start-hbase.sh

6.验证

使用sell登录输入list命令

[root@node1 hbase-1.1.3]# bin/hbase shell
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/hbase-1.1.3/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hadoop-2.5.1/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 1.1.3, r72bc50f5fafeb105b2139e42bbee3d61ca724989, Sat Jan 16 18:29:00 PST 2016
hbase(main):001:0> list
TABLE                                                                                                                    
0 row(s) in 0.3120 seconds
=> []
hbase(main):002:0> 


0 0
原创粉丝点击