hbase 2.1.1 单机部署

#下载hbase

wget https://mirrors.cnnic.cn/apache/hbase/2.1.1/hbase-2.1.1-bin.tar.gz

#下载jdk1.8

https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

#上传jdk

rz -bye 

#解压jdk和hbase

tar -zxvf jdk-8u191-linux-x64.tar.gz 

tar -zxvf hbase-2.1.1-bin.tar.gz

#配置hbase环境变量

vi /etc/profile

export HBASE_HOME=/home/hbase-2.1.1

export PATH=$PATH:$HBASE_HOME/bin

source /etc/profile

#修改hbase-env.sh

vi /home/hbase-2.1.1/conf/hbase-env.sh

export JAVA_HOME=/home/jdk1.8.0_191

export HBASE_CLASSPATH=/home/hbase-2.1.1/conf

export HBASE_MANAGES_ZK=true

#修改hbase-site.xml

vi /home/hbase-2.1.1/conf/hbase-site.xml
<configuration>  
  <property>  
      <name>hbase.rootdir</name>  
      <value>file:///home/hbase-2.1.1/logs/site</value>  
  </property>  
   <property>  
      <name>hbase.tmp.dir</name>  
      <value>/home/hbase-2.1.1/tmp</value>  
  </property>  
  <property>  
      <name>hbase.cluster.distributed</name>  
      <value>true</value>  
  </property>  
  <property>  
      <name>hbase.zookeeper.quorum</name>  
      <value>lfwer</value>  
  </property>  
</configuration>  

#查看hbase是否安装成功

hbase version

#启动hbase

/home/hbase-2.1.1/conf/.start-hbase.sh

#用hbase shell 访问一下

hbase shell
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.1.1, rb60a92d6864ef27295027f5961cb46f9162d7637, Fri Oct 26 19:27:03 PDT 2018

Took 0.0020 seconds                                                                                                                    

hbase(main):001:0> 

hbase(main):002:0* 

#执行list命令

hbase(main):002:0* list
TABLE                                                                                                                                  

test                                                                                                                                   

1 row(s)

Took 0.3306 seconds                                                                                                                    

=> ["test"]

hbase(main):003:0> 

#通过浏览器查看hbase状态信息

http://ip:16030
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值