HBase安装配置

1、下载hbase安装包

http://www.apache.org/dyn/closer.cgi/hbase/

2、将hbase-1.0.1.1-bin.tar.gz 放入自己选好的文件夹下,如/root/software 然后解压。Shell命令如下:

tar zxvf hbase-1.0.1.1-bin.tar.gz 

3、进入 解压后的hbase-1.0.1.1

cd hbase-1.0.1.1

4、配置文件

1) hbase-env.sh

取消配置JDK的注释并做并如下修改(我的JDK安装路径):

# The java implementation to use.  Java 1.7+ required.

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

2) hbase-site.xml

修改如下:

<configuration>

 <property>

<name>hbase.rootdir</name>

<value>hdfs://10.118.46.22:9000/hbase</value>

</property>

<property>

<name>hbase.cluster.distributed</name>

<value>true</value>

</property>

<property>

<name>hbase.zookeeper.quorum</name>

<value>10.118.46.22</value>

</property>

<property>

<name>dfs.replication</name>

<value>3</value>

</property>

</configuration>

 5、启动hbase

[root@HBMS-DKXD-DEV hbase-1.0.1.1]# bin/start-hbase.sh

查看启动是否成功

jps 查看是否有下面

7758 HRegionServer

7632 HMaster

7572 HQuorumPeer


6、hbase shell命令

[root@HBMS-DKXD-DEV hbase-1.0.1.1]# bin/hbase shell


SLF4J: Class path contains multiple SLF4J bindings.

SLF4J: Found binding in [jar:file:/root/sherry/hbase-1.0.1.1/lib/slf4j-log4j12-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]

SLF4J: Found binding in [jar:file:/root/sherry/hadoop-2.6.0/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.0.1.1, re1dbf4df30d214fca14908df71d038081577ea46, Sun May 17 12:34:26 PDT 2015


hbase(main):001:0>