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
  
    
      hbase.rootdir  
      file:///home/hbase-2.1.1/logs/site  
    
     
      hbase.tmp.dir  
      /home/hbase-2.1.1/tmp  
    
    
      hbase.cluster.distributed  
      true  
    
    
      hbase.zookeeper.quorum  
      lfwer  
    
  

#查看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

你可能感兴趣的:(hbase)