即接HADOOP HA机制基础上部署参考一下连接HADOOP HA部署连接1 Hbase搭建HA机制1.1 hbase安装1.2 下发hbase1.3 启动hbase1 Hbase搭建HA机制在hanode01上配置hbase1.1 hbase安装a> 解压hbase-1.4.13.tar.gz到/opt/software下$ tar -xvf hbase-1.4.14.tar.gz -C /opt/softwareb> 添加hbase环境变量$ vim /etc/profile.d/hbase.sh #!/bin/bash # hbase export HBASE_HOME=/opt/software/hbase-1.4.13 export PATH=$PATH:$HBASE_HOME/binc> 修改hbase-env.sh$ cd /opt/software/hbase-1.4.14/conf $ vim hbase-env.sh export JAVA_HOME=/usr/java/jdk1.8.0_151 export HBASE_OPTS="-XX:+UseConcMarkSweepGC" export HBASE_PID_DIR=/opt/software/hbase-1.4.13/pids export HBASE_MANAGES_ZK=falsed>修改hbase-site.xml$ vim hbase-site.xml hbase.rootdir hdfs://ns1/hbase hbase.cluster.distributed true hbase.master hdfs://hanode01:60000 hbase.master.info.port 60010 hbase.zookeeper.quorum hanode05:2181,hanode06:2181,hanode07:2181 hbase.zookeeper.property.dataDir /opt/software/apache-zookeeper-3.6.2-bin hbase.zookeeper.property.clientPort 2181 e>修改regionservers$ vim regionservers hanode05 hanode06 hanode07f>复制hadoop中2个配置文件到hbase中$ pwd /opt/software/hbase-1.4.13/conf $ cp /opt/software/hadoop-3.2.1/etc/hadoop/core-site.xml . $ cp /opt/software/hadoop-3.2.1/etc/hadoop/hdfs-site.xml .1.2 下发hbase# 把修改好的hbase下发hanode02，hanode05，hanode06，hanode07上 $ scp -r /opt/software/hbase-1.4.13 hanode02:/opt/software/ $ scp -r /opt/software/hbase-1.4.13 hanode05:/opt/software/ $ scp -r /opt/software/hbase-1.4.13 hanode06:/opt/software/ $ scp -r /opt/software/hbase-1.4.13 hanode07:/opt/software/ # 分发hbase环境变量 $ scp -r /etc/profile.d/hbase.sh hanode02:/etc/profile.d/ $ scp -r /etc/profile.d/hbase.sh hanode05:/etc/profile.d/ $ scp -r /etc/profile.d/hbase.sh hanode06:/etc/profile.d/ $ scp -r /etc/profile.d/hbase.sh hanode07:/etc/profile.d/ # 变量生效,分别在hanode01，hanode02，hanode05，hanode06，hanode07上执行 $ source /etc/profile.d/hbase.sh1.3 启动hbase# 在hanode01上 $ pwd /opt/software/hbase-1.4.13/bin $ ./start-hbase.sh # 启动另一个Hmaster节点,在hanode02上 $ pwd /opt/software/hbase-1.4.13/bin $ ./hbase-daemon.sh start master