HBase在Hadoop上的最新安装教程



                                HBase安装教程

  1. 在官网是下载hbase-1.3.1-bin.tar.gz (不用解压)

     

  2. hbase-1.3.1-bin.tar.gz上传到虚拟机的-C /usr/local目录下

     

  3. 解压hbase-1.3.1-bin.tar.gzusr/local/apps目录下,命令:tar -zxvf hbase-1.3.1-bin.tar.gz  -C /usr/local/apps/

     

  4.  cd usr/local/apps/hbase-1.3.1/conf目录下,运行vi hbase-env.sh

    添加

    export JAVA_HOME=/usr/local/apps/jdk1.8  //Java路径

    扫描二维码关注公众号,回复: 1936854 查看本文章

    export HBASE_MANAGES_ZK=false

    保存离开

     

  5.  vi hbase-site.xml末尾添加代码,保存离开

<configuration>

  <property>

    <name>hbase.rootdir</name>

    <value>hdfs://hdp-node-01:9000/hbase</value>

  </property>

  <property>

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

    <value>true</value>

  </property>

  <property>

    <name>hbase.zookeeper.property.dataDir</name>

    <value>/usr/local/apps/zookeeper-3.4.8/data</value>

  </property>

  <property>

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

    <value>192.168.239.102,192.168.239.103,192.168.239.104</value>

  </property>

  <property>

    <name>hbase.zookeeper.property.clientPort</name>

    <value>2080</value>

  </property>

  <property>

    <name>hbase.unsafe.stream.capability.enforce</name>

    <value>true</value>

    <description>

      Controls whether HBase will check for stream capabilities (hflush/hsync).

 

      Disable this if you intend to run on LocalFileSystem, denoted by a rootdir

      with the 'file://' scheme, but be mindful of the NOTE below.

 

      WARNING: Setting this to false blinds you to potential data loss and

      inconsistent system state in the event of process and/or node failures. If

      HBase is complaining of an inability to use hsync or hflush it's most

      likely not a false positive.

    </description>

  </property>

</configuration>

 

  1.  hbase-1.3.1文件传给从节点

    scp -r hbase-1.3.1 hdp-node-02:/usr/local/apps/

    scp -r hbase-1.3.1 hdp-node-03:/usr/local/apps/

    scp -r hbase-1.3.1 hdp-node-04:/usr/local/apps/

     

  2.  刷新source /etc/profile,在bin/start-hbase.sh打开hbase

     

  3. Jps主节点

     

    Jps从节点

     

    http://IP:16010/master-status查看web界面

     

    安装成功

  4. 为了以后方便,我们需要对环境变量进行配置

       su root

        vi /etc/profile 在里面添加

        export HBASE_HOME=/usr/local/apps/hbase-1.3.1

        export PATH=$PATH:$HBASE_HOME/bin

保存离开

以后即使在其他目录下,也可以启动hbase了



猜你喜欢

转载自blog.csdn.net/gouzhi6606/article/details/80945722