Hbase 1.0.1单机版安装

摘要: Hbase 1.0.1单机版安装,首先说一下环境,目前用的hadoop 2.6.0版本,系统为suse linux 64位

1.首先从官网上下载http://mirror.bit.edu.cn/apache/hbase/hbase-1.0.1/hbase-1.0.1-bin.tar.gz   安装包

2.解压缩到安装目录,tar -xvf hbase-1.0.1-bin.tar.gz

3.修改conf/hbase-site.xml

hbase.rootdirhdfs://192.168.233.11:8020/hbasehbase.cluster.distributedtruehbase.zookeeper.quorum192.168.233.11hbase.tmp.dir/usr/hbase-1.0.1/tmp

Hbase 1.0.1单机版安装_第1张图片

3.修改hbase-env.sh,添加

exportJAVA_HOME=/usr/java/jdk1.7.0_75/exportHBASE_CLASSPATH=/usr/hbase-1.0.1/confexportHBASE_MANAGES_ZK=true

注意:一个分布式运行的HBase依赖一个zookeeper集群。所有的节点和客户端都必须能够访问zookeeper。默认的情况下HBase会管理一个zookeep集群。这个集群会随着HBase的启动而启动。当然,你也可以自己管理一个zookeeper集群,但需要配置HBase。你需要修改conf/hbase-env.sh里面的HBASE_MANAGES_ZK

来切换。这个值默认是true的,作用是让HBase启动的时候同时也启动zookeeper

4.首先启动hdoop,然后再启动hbase

>cdhbase-1.0.1/bin/>./start-hbase.sh>./stop-hbase.sh

5.jps查看相关进程,应该有如下进程(如果出错,请去logs目录下查找相应错误),特别注意HMaster是否启动成功

13764 HRegionServer

4539 NameNode

19860 Jps

18087 HQuorumPeer

18298 HRegionServer

4996 ResourceManager

18177 HMaster

4839 SecondaryNameNode

4650 DataNode

5108 NodeManager

Hbase 1.0.1单机版安装_第2张图片

6.启动hbase shell(最好配置PATH)

hbaseshell

hadoop@slave01:/usr/hbase-1.0.1/bin> ./hbase shell2015-05-1106:02:27,925WARN  [main] conf.Configuration:bad conffile:element not 2015-05-1106:02:30,720WARN  [main] conf.Configuration:bad conffile:element not SLF4J:Class path contains multiple SLF4J bindings.SLF4J:Found bindingin[jar:file:/usr/hbase-1.0.1/lib/slf4j-log4j12-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]SLF4J:Found bindingin[jar:file:/usr/hadoop-2.6.0/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]SLF4J:Seehttp://www.slf4j.org/codes.html#multiple_bindings for an explanation.SLF4J:Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]2015-05-1106:02:31,268WARN  [main] util.NativeCodeLoader:Unable to load native-hadoop libraryforyour platform... using builtin-java classes where applicable2015-05-1106:02:31,594WARN  [main] conf.Configuration:bad conffile:element not 2015-05-1106:02:31,804WARN  [main] conf.Configuration:bad conffile:element not 2015-05-1106:02:32,217WARN  [main] conf.Configuration:bad conffile:element not 2015-05-1106:02:32,438WARN  [main] conf.Configuration:bad conffile:element not 2015-05-1106:02:33,300WARN  [main] conf.Configuration:bad conffile:element not HBase Shell; enter'help'forlist of supported commands.Type"exit"to leave the HBase ShellVersion1.0.1, r66a93c09df3b12ff7b86c39bc8475c60e15af82d, Fri Apr1722:14:06PDT2015hbase(main):001:0> listTABLE0row(s)in0.4370seconds=> []hbase(main):002:0>

Hbase 1.0.1单机版安装_第3张图片

启动成功.

你可能感兴趣的:(Hbase 1.0.1单机版安装)