Big data cluster construction --- "High-availability Habse articles" - rookie Xiaohui

Big Data Cluster Construction-"Highly Available Habse"-Cainiao Xiaohui


Summary:
Big data cluster construction (zookeeper, high-availability hadoop, high-availability hbase)
Continued from the previous chapter:
big data cluster construction-"high-availability hadoop chapter"


Four, Hbase cluster construction

  1. Ensure that the first two configurations are correct (or configure the zhiyou001 host first and then copy)
  2. create:mkdir -p /opt/hbase
  3. enter:cd /opt/hbase
  4. Upload:
    enter description here
  5. Unzip:tar -zxvf hbase-2.0.0-bin.tar.gz
  6. Modify hbase-env.sh
cd /opt/hbase/hbase-2.0.0/conf/
vi hbase-env.sh 
//去掉注释并修改
export JAVA_HOME=/opt/java/jdk1.8.0_141
export HBASE_MANAGES_ZK=false
  1. Modify hbase-site.xml
vi hbase-site.xml 
//添加如下:
<!-- 指定hbase在HDFS上存储的路径 -->
<property>
                <name>hbase.rootdir</name>
                <value>hdfs://ns/hbase</value>
</property>
<!-- 指定hbase是分布式的 -->
<property>
                <name>hbase.cluster.distributed</name>
                <value>true</value>
</property>
<!-- 指定zk的地址,多个用“,”分割 -->
<property>
                <name>hbase.zookeeper.quorum</name>
                <value>zhiyou001:2181,zhiyou002:2181,zhiyou003:2181</value>
</property>

<property>
        <name>hbase.master.maxclockskew</name>
        <value>150000</value>
</property>

<property>
        <name>hbase.master.info.port</name>
        <value>60010</value>
</property>

  • enter description here
  1. there regionservers
//losthost换为:
zhiyou001
zhiyou002
zhiyou003
  1. Copy the hadoop configuration files hdfs-site.xml and core-site.xml to hbase conf
cp /opt/hadoop/hadoop-2.7.3/etc/hadoop/hdfs-site.xml /opt/hbase/hbase-2.0.0/conf/
cp /opt/hadoop/hadoop-2.7.3/etc/hadoop/core-site.xml /opt/hbase/hbase-2.0.0/conf/
  1. Send files to two other hosts
scp -r /opt/hbase/ root@zhiyou002:/opt/hbase/
scp -r /opt/hbase/ root@zhiyou003:/opt/hbase/
  1. Synchronize system time (three sets at the same time)
//安装ntpdate
yum install -y ntp
ntpdate ntp.api.bz
  1. start up
//启动zookeeper(三台)
cd /opt/zookeeper/zookeeper-3.4.12/bin/
./zkServer.sh start
//启动hadoop(三台)
/opt/hadoop/hadoop-2.7.3/sbin/
./start-all.sh 
//Hbase(只要在主节点启动就可以了)
cd /opt/hbase/hbase-2.0.0/bin/
./start-hbase.sh 

enter description here

  1. Access through the browser (three host configuration completed):zhiyou001:60010
    enter description here

Guess you like

Origin blog.csdn.net/qq_39231769/article/details/102780227
Recommended