天天看點

hbase安裝

搭建完全分布式叢集

HBase叢集建立在hadoop叢集基礎之上,是以在搭建HBase叢集之前需要把Hadoop叢集搭建起來,并且要考慮二者的相容性

軟體版本:hbase-0.98.12.1-hadoop2-bin.tar.gz

3台機器IP:192.168.129.101(node1)、192.168. 129.102(node2)、192.168. 129.103(node3)、

一.安裝zookeeper 

二. 搭建Hadoop叢集

先将Zookeeper叢集和Hadoop叢集啟動起來

三.部署hbase

提供百度雲連結(裡面也提供了搭建文檔)

連結:https://pan.baidu.com/s/1qh1WH2PX-ONYecQ2n-_2QQ

提取碼:0g84 

1.解壓縮hbase的軟體包,使用指令:

tar -zxvf hbase-0.98.12.1-hadoop2-bin.tar.gz

2.進入hbase的配置目錄,在hbase-env.sh檔案裡面加入java環境變量.即:

export JAVA_HOME=/usr/local/soft/jdk1.8.0_171

關閉HBase自帶的Zookeeper,使用Zookeeper叢集: hbase-env.sh

export  HBASE_MANAGES_ZK=false  

3. 編輯hbase-site.xml ,添加配置檔案:

<?xml version="1.0"?>

<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<configuration>

<property> 

<name>hbase.rootdir</name> 

<value>hdfs://node:9000/hbase</value> 

</property> 

<name>hbase.cluster.distributed</name> 

<value>true</value> 

<name>hbase.zookeeper.quorum</name> 

<value>node1,node2,node3</value> 

</configuration>

4. 編輯配置目錄下面的檔案regionservers. 指令:

vi   regionservers    

加入如下内容:

node2

node3

5. 把Hbase複制到其他機器,指令如下:

scp -r hbase-0.98.12.1-hadoop2 node1:/usr/local/soft/

scp -r hbase-0.98.12.1-hadoop2 node2:/usr/local/soft/

6. 在node1機器開啟hbase服務。指令如下:

[root@node1 hbase-1.3.0]$ bin/start-hbase.sh   

在node1、node2、node3中的任意一台機器使用bin/hbase shell 進入hbase自帶的shell環境,然後使用指令version等,進行檢視hbase資訊及建立表等操作。 

Hadoop安全模式導緻的問題

hbase安裝
hbase安裝

繼續閱讀