zoukankan      html  css  js  c++  java
  • HBase(三)——搭建Fully-distributed

    HBase搭建--Fully-distributed

    1、搭建方式说明

    	By default, HBase runs in standalone mode. Both standalone mode and pseudo-distributed mode are provided for the purposes of small-scale testing. For a production environment, distributed mode is advised. In distributed mode, multiple instances of HBase daemons run on multiple servers in the cluster.
    

    2、搭建步骤

    1、将集群中的所有节点的hosts文件配置完成

    2、将集群中的所有节点的防火墙关闭

    3、将集群中的所有节点的时间设置一致

    yum install ntpdate
    ntpdate ntp1.aliyun.com
    

    4、将所有的节点设置免密钥登陆

    ssh-keygen
    ssh-copy-id -i /root/.ssh/id_rsa.pub node01(节点名称)
    

    5、解压hbase安装包

    tar xzvf hbase-2.0.5-bin.tar.gz -C /opt/bigdata
    cd hbase-2.0.5/
    

    6、在/etc/profile文件中配置HBase的环境变量

    export HBASE_HOME=/opt/bigdata/hbase-2.0.5
    将$HBASE_HOME设置到PATH路径中
    

    7、进入到/opt/bigdata/hbase-2.0.5/conf目录中,在hbase-env.sh文件中添加JAVA_HOME

    设置JAVA的环境变量
    JAVA_HOME=/usr/java/jdk1.8.0_181-amd64
    设置是否使用自己的zookeeper实例
    HBASE_MANAGES_ZK=false
    

    8、进入到/opt/bigdata/hbase-2.0.5/conf目录中,在hbase-site.xml文件中添加hbase相关属性

    <configuration>
      <property>
        <name>hbase.rootdir</name>
        <value>hdfs://mycluster/hbase</value>
      </property>
      <property>
        <name>hbase.cluster.distributed</name>
        <value>true</value>
      </property>
      <property>
        <name>hbase.zookeeper.quorum</name>
        <value>node02,node03,node04</value>
      </property>
    </configuration>
    

    9、修改regionservers文件,设置regionserver分布在哪几台节点

    node02
    node03
    node04
    

    10、如果需要配置Master的高可用,需要在conf目录下创建backup-masters文件,并添加如下内容:

    node04
    

    11、拷贝hdfs-site.xml文件到conf目录下

    cp /opt/bigdate/hbase-2.6.5/etc/hadoop/hdfs-site.xml /opt/bigdata/hbase-2.0.5/conf
    

    12、在任意目录下运行hbase shell的命令,进入hbase的命令行进行相关操作。

  • 相关阅读:
    如何在Ubuntu Unity上修改应用程序图标
    Ubuntu添加PPA源
    Ubuntu14.04下Unity桌面托盘图标显示问题
    apt-get用法
    解决ubuntu无法调整和保存屏幕亮度的问题
    终端调测命令易用性的改进
    关于Linux系统basename函数缺陷的思考
    基于VLAN的二三层转发
    【译】编写可重入和线程安全的代码
    Writing Reentrant and Thread-Safe Code(译:编写可重入和线程安全的代码)
  • 原文地址:https://www.cnblogs.com/littlepage/p/11293829.html
Copyright © 2011-2022 走看看