基于Hadoop2.6.5(HA)的HBase2.0.5配置

1.配置

在CentOS7Three上配置,注意:一定要安装bin包,不能安装src包

/usr/local/hbase/hbase-2.0.5/conf

编辑hbase-env.sh,替换成如下配置

export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk
export HBASE_MANAGES_ZK=false  #用外部zk

编辑hbase-site.xml,增加配置


    hbase.rootdir
     hdfs://ns1/hbase


    hbase.cluster.distributed
     true


    hbase.zookeeper.quorum
    CentOS7Five:2181,CentOS7Six:2181,CentOS7Seven:2181

编辑regionservers

CentOS7Five
CentOS7Six
CentOS7Seven

复制Hadoop的core-site.xml和hdfs-site.xml到hbase的conf下,为了hbase能识别nameservice

cp /usr/local/hadoop-2.6.5/hadoop-2.6.5/etc/hadoop/{core-site.xml,hdfs-site.xml} /usr/local/hbase/hbase-2.0.5/conf/

 复制到其他机器

scp -r /usr/local/hbase/ CentOS7Four:/usr/local/
scp -r /usr/local/hbase/ CentOS7Five:/usr/local/
scp -r /usr/local/hbase/ CentOS7Six:/usr/local/
scp -r /usr/local/hbase/ CentOS7Seven:/usr/local/

新建backup-masters

填入CentOS7Four,作为备用HMaster

2.启动

在CentOS7Three上启动hbase

sh /usr/local/hbase/hbase-2.0.5/bin/start-hbase.sh

浏览器输入http://centos7three:16010/master-status

基于Hadoop2.6.5(HA)的HBase2.0.5配置_第1张图片

 进入hbase的shell

sh /usr/local/hbase/hbase-2.0.5/bin/hbase shell

 

你可能感兴趣的:(基于Hadoop2.6.5(HA)的HBase2.0.5配置)