您好,登錄后才能下訂單哦!
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>
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。