hbase 伪分布安装 java_hbase伪分布安装

本文介绍了如何在Linux环境中进行HBase 2.1.4的伪分布式安装,包括下载解压、配置环境变量、修改配置文件、启动HBase以及验证安装过程。内容涵盖JDK设置、HBase的hbase-site.xml配置以及启动过程中的日志信息。
摘要由CSDN通过智能技术生成

准备工作

hadoop

zookeeper(可选,简单起见不用安装,hbase自带zookeeper功能)

步骤

1、下载解压,

wget https://mirrors.tuna.tsinghua.edu.cn/apache/hbase/2.1.4/hbase-2.1.4-bin.tar.gz

tar zxf hbase-2.1.4-bin.tar.gz -C /usr/local/

建立软链接

cd /usr/local/

ln -s hbase-2.1.4 hbase

2、环境变量

$ vim /etc/profile.d/hbase.sh

export HBASE_HOME=/usr/local/hbase

export PATH=$PATH:$HBASE_HOME/bin

$ source /etc/profile

3、配置文件

修改jdk环境变量,vim /usr/local/hbase/conf/hbase-env.sh

# export JAVA_HOME=/usr/java/jdk1.8.0/

export JAVA_HOME=/usr/local/jdk

修改 vim /usr/local/hbase/conf/hbase-site.xml

先创建目录 mkdir -p /usr/local/hbase/data/zookeeper,用来存放zookeeper的数据

hbase.zookeeper.quorum

192.168.68.128

hbase.zookeeper.property.dataDir

/usr/local/hbase/data/zookeeper

hbase.cluster.distributed

true

hbase.rootdir

hdfs://192.168.68.128:9000/hbase

4、启动hbase

先确保hadoop已经启动

[root@master1] /usr/local/hbase$ jps

16546 NameNode

16643 DataNode

16804 SecondaryNameNode

17003 ResourceManager

17196 NodeManager

17407 Jps

启动hbase

[root@master1] /usr/local/hbase$ start-hbase.sh

SLF4J: Class path contains multiple SLF4J bindings.

SLF4J: Found binding in [jar:file:/usr/local/hadoop-2.7.6/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/itaticLoggerBinder.class]

SLF4J: Found binding in [jar:file:/usr/local/hbase-2.1.4/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/slfpl/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]

SLF4J: Class path contains multiple SLF4J bindings.

SLF4J: Found binding in [jar:file:/usr/local/hadoop-2.7.6/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/itaticLoggerBinder.class]

SLF4J: Found binding in [jar:file:/usr/local/hbase-2.1.4/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/slfpl/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]

192.168.68.128: running zookeeper, logging to /usr/local/hbase/logs/hbase-root-zookeeper-master1.hanli.com.out

192.168.68.128: SLF4J: Class path contains multiple SLF4J bindings.

192.168.68.128: SLF4J: Found binding in [jar:file:/usr/local/hadoop-2.7.6/share/hadoop/common/lib/slf4j-log4j12-1.7.10.org/slf4j/impl/StaticLoggerBinder.class]

192.168.68.128: SLF4J: Found binding in [jar:file:/usr/local/hbase-2.1.4/lib/client-facing-thirdparty/slf4j-log4j12-1.7ar!/org/slf4j/impl/StaticLoggerBinder.class]

192.168.68.128: SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

192.168.68.128: SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

running master, logging to /usr/local/hbase/logs/hbase-root-master-master1.hanli.com.out

SLF4J: Class path contains multiple SLF4J bindings.

SLF4J: Found binding in [jar:file:/usr/local/hadoop-2.7.6/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/itaticLoggerBinder.class]

SLF4J: Found binding in [jar:file:/usr/local/hbase-2.1.4/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/slfpl/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]

: running regionserver, logging to /usr/local/hbase/logs/hbase-root-regionserver-master1.hanli.com.out

: SLF4J: Class path contains multiple SLF4J bindings.

: SLF4J: Found binding in [jar:file:/usr/local/hadoop-2.7.6/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/StaticLoggerBinder.class]

: SLF4J: Found binding in [jar:file:/usr/local/hbase-2.1.4/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar!/org/simpl/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]

验证进程是否完整

[root@master1] /usr/local/hbase$ jps

18240 Jps

16546 NameNode

16643 DataNode

16804 SecondaryNameNode

17721 HQuorumPeer

17929 HRegionServer

17003 ResourceManager

17196 NodeManager

17820 HMaster

访问web界面 http://192.168.68.128:16030

ff349cccdc48ccaff96814a319a0c6d4.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值