Hbase2.3.5安装

Posted 逃跑的沙丁鱼

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Hbase2.3.5安装相关的知识,希望对你有一定的参考价值。

环境:

centos 7

hadoop 3.2.2

1 下载上传解压

https://mirrors.tuna.tsinghua.edu.cn/apache/hbase/

稳定版

https://mirrors.tuna.tsinghua.edu.cn/apache/hbase/stable/hbase-2.3.5-bin.tar.gz

tar -xvf hbase-2.3.5-bin.tar.gz -C ../soft

2 配置HBASE_HOME环境变量

[liucf@node1 hbase-2.3.5]$ sudo vim /etc/profile
export HBASE_HOME=/home/liucf/soft/hbase-2.3.5
PATH=$HBASE_HOME/bin:$HIVE_HOME/bin:$ZOOKEEPER_HOME/bin:$HADOOP_HOME/bin:$JAVA_HOME/bin:$PATH

3 配置文件

3.1 HDFS 配置文件软链接

ln -s $HADOOP_HOME/etc/hadoop/core-site.xml $HBASE_HOME/conf/core-site.xml
ln -s $HADOOP_HOME/etc/hadoop/hdfs-site.xml $HBASE_HOME/conf/hdfs-site.xml

3.2 hbase-env.sh

# The java implementation to use.  Java 1.8+ required.
export JAVA_HOME=/home/liucf/soft/jdk1.8.0_121

...

# Extra Java CLASSPATH elements.  Optional.
export HBASE_CLASSPATH=/home/liucf/soft/hadoop-3.2.2

...

# Tell HBase whether it should manage it's own instance of ZooKeeper or not.
# false 时使用独立的,为true时使用默认自带的
export HBASE_MANAGES_ZK=false

3.3 配置conf/regionservers

只在node2,node3上启动HRegionServer

node2
node3

3.4 分发hbase安装目录到其他节点

scp -r hbase-2.3.5 liucf@node2:/home/liucf/soft
scp -r hbase-2.3.5 liucf@node3:/home/liucf/soft

3.5 node2,node3 上也配置HBASE_HOME

...

4 启动hbase

4.1 启动

start-hbase.sh

 4.2 验证

jps

HMaster,HRegionServer都在

[liucf@node1 myShell]$ hbase-shell
bash: hbase-shell: command not found...
[liucf@node1 myShell]$ hbase shell
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/liucf/soft/hadoop-3.2.2/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/liucf/soft/hbase-2.3.5/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 Shell
Use "help" to get list of supported commands.
Use "exit" to quit this interactive shell.
For Reference, please visit: http://hbase.apache.org/2.0/book.html#shell
Version 2.3.5, rfd3fdc08d1cd43eb3432a1a70d31c3aece6ecabe, Thu Mar 25 20:50:15 UTC 2021
Took 0.0010 seconds                                                                                                                   
hbase(main):001:0> 

访问web ui

http://192.168.109.151:60010/master-status

 

完毕

 

 

 

 

 

 

 

 

 

 

 

 

以上是关于Hbase2.3.5安装的主要内容,如果未能解决你的问题,请参考以下文章

Sqoop-命令大全

Sqoop-命令大全

在Tomcat的安装目录下conf目录下的server.xml文件中增加一个xml代码片段,该代码片段中每个属性的含义与用途

PHP代码-psysh调试代码片段工具

VIM 代码片段插件 ultisnips 使用教程

Android 插件化VirtualApp 源码分析 ( 目前的 API 现状 | 安装应用源码分析 | 安装按钮执行的操作 | 返回到 HomeActivity 执行的操作 )(代码片段