Hbase部署

来源:互联网 发布:数据提取软件 编辑:程序博客网 时间:2024/06/06 02:05

一、下载与Hadoop版本对应的hbase包,我的hadoop是2.6.0-cdh5.7.0
所以我下载的hbase版本是hbase-1.2.0-cdh5.7.0。

二、解压到指定目录

tar -zxcf hbase-1.2.0-cdh5.7.0.tar.gz -C /opt/app/

配置环境变量

export HBASE_HOME=/opt/app/hbase-1.2.0-cdh5.7.0export PATH=$HBASE_HOME/bin:$PATH

source生效

source /etc/profile

三、更改配置文件

编辑$HBAS_HOME/conf下的hbase-env.sh# The java implementation to use.  Java 1.7+ required. export JAVA_HOME=/usr/java/jdk1.8 export HBASE_CLASSPATH=/opt/app/2.6.0-cdh5.7.0/etc/hadoop HBASE_CLASSPATH指向Hadoop的配置文件目录
编辑$HBAS_HOME/conf下的hbase-site.xml<property>        <name>hbase.rootdir</name>        <value>file:///opt/app/hbase-1.2.0-cdh5.7.0/data</value></property><property>        <name>hbase.cluster.distributed</name>        <value>true</value></property>

四、启动hbase

start-hbase.sh 

JPS查看是否有Hbase的进程HMaster等

[root@hadoop001 conf]# jps6099 HQuorumPeer4996 NameNode8167 Jps5513 NodeManager6297 HRegionServer5273 SecondaryNameNode5418 ResourceManager6171 HMaster5116 DataNode

进入hbase

hbase shell

查看表

hbase(main):001:0> listTABLE                                                                                                                              0 row(s) in 0.5670 seconds
原创粉丝点击