美文网首页
伪分布式-hbase

伪分布式-hbase

作者: 蕴重Liu | 来源:发表于2019-08-16 17:55 被阅读0次

    wget https://www.apache.org/dyn/closer.lua/hbase/2.0.5/hbase-2.0.5-bin.tar.gz

    1. 下载文件
    wget http://mirror.bit.edu.cn/apache/hbase/2.0.5/hbase-2.0.5-bin.tar.gz
    

    注意https://www.apache.org/dyn/closer.lua/hbase/2.0.5/hbase-2.0.5-bin.tar.gz 下载的是html,不是tar.gz文件

    1. 解压安装包
    tar -zxvf hbase-2.0.5-bin.tar.gz
    
    1. 重命名文件夹
    mv hbase-2.0.5 hbase
    
    1. 配置环境变量
    vim /etc/profile
    ------
    export HBASE_HOME=/usr/local/src/hbase
    export PATH=$PATH:$JAVA_HOME/bin:/usr/local/src/hadoop/bin:$HBASE_HOME/bin
    export HBASE_MANAGES_ZK=true
    
    1. 查看HBase版本,确定hbase安装成功
    root@503ae25fe58d:/usr/local/src/hbase/conf# hbase version
    SLF4J: Class path contains multiple SLF4J bindings.
    SLF4J: Found binding in [jar:file:/usr/local/src/hbase/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
    SLF4J: Found binding in [jar:file:/usr/local/src/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.10.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 2.0.5
    Source code repository git://dd7c519a402b/opt/hbase-rm/output/hbase revision=76458dd074df17520ad451ded198cd832138e929
    Compiled by hbase-rm on Mon Mar 18 00:41:49 UTC 2019
    From source with checksum fd9cba949d65fd3bca4df155254ac28c
    
    1. conf的hbase-site.xml
      在启动HBase前需要设置属性hbase.rootdir,用于指定HBase数据的存储位置,
      默认为/tmp/hbase-${user.name},这意味着每次重启系统都会丢失数据。
      此处设置为HBase安装目录下的hbase-tmp文件夹即(/usr/local/hbase/hbase-tmp),添加配置如下:
    <configuration>
            <property>
                    <name>hbase.rootdir</name>
                    <value>hdfs://localhost:9000/hbase</value>
            </property>
            <!--指定HBase数据的存储位置 -->
            <property>
                    <name>hbase.cluster.distributed</name>
                    <value>true</value>
            </property>
    </configuration>
    
    1. hbase-env.sh添加java环境变量
    export JAVA_HOME=/usr/local/src/jdk/jdk1.8
    

    相关文章

      网友评论

          本文标题:伪分布式-hbase

          本文链接:https://www.haomeiwen.com/subject/nwsqsctx.html