HBase的安装和编程实践

HBase的安装和编程实践

1.HBase2.4.2安装

1.1 解压安装包

解压到/usr/local

[root@hadoop-master ~]# tar -zvxf hbase-2.4.2-bin.tar.gz -C /usr/local/
1.2 将解压的文件名hbase-2.4.2改为hbase
[root@hadoop-master local]# mv hbase-2.4.2/ hbase
1.3 配置环境变量
[root@hadoop-master hbase]# vim ~/.bashrc
[root@hadoop-master hbase]# cat ~/.bashrc 
# .bashrc

# User specific aliases and functions

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# Source global definitions
if [ -f /etc/bashrc ]; then
	. /etc/bashrc
fi
export PATH=$PATH:/usr/local/hbase/bin
[root@hadoop-master hbase]# source ~/.bashrc
1.4 查看HBase版本,确定hbase安装成功
[root@hadoop-master ~]# /usr/local/hbase/bin/hbase version
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/hadoop/hadoop-3.1.4/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/hbase/lib/client-facing-thirdparty/slf4j-log4j12-1.7.30.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 2.4.2
Source code repository git://apurtell-ltm.internal.salesforce.com/Users/apurtell/src/hbase revision=3e98c51c512cbd5ef779ae6bcef178ce89c46e37
Compiled by apurtell on Mon Mar  8 16:49:11 PST 2021
From source with checksum 01fd6e6591e3e79b34b4921861434ed0c39f8d69994ca9a59284532a6608703533601371c8797bef261788cd812480da37a007f19c8590feec1dbeed85e4ad5d

2.HBase配置

2.1 伪分布式配置

1.配置/usr/local/hbase/conf/hbase-env.sh

[root@hadoop-master ~]# vim /usr/local/hbase/conf/hbase-env.sh

配置JAVA_HOME,HBASE_CLASSPATH,HBASE_MANAGES_ZK

export JAVA_HOME=/usr/java/jdk1.8.0_281-amd64#这是我本机的JDK安装路径
export HBASE_CLASSPATH=/usr/local/hbase/conf 
export HBASE_MANAGES_ZK=true

2.配置/usr/local/hbase/conf/hbase-site.xml

[root@hadoop-master ~]# vim /usr/local/hbase/conf/hbase-site.xml 
[root@hadoop-master ~]# cat /usr/local/hbase/conf/hbase-site.xml 
<?xml version="1.0"?>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

MirkoLin596

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值