一、部署准备
1. 依赖框架
* 大数据Hadoop系列之Hadoop分布式集群部署:
https://blog.csdn.net/volitationLong/article/details/80285123
<https://blog.csdn.net/volitationLong/article/details/80285123>
* 大数据Zookeeper系列之Zookeeper集群部署:
https://blog.csdn.net/volitationLong/article/details/82706210
<https://blog.csdn.net/volitationLong/article/details/82706210>
2. 安装介质
* hbase-2.1.0:
http://mirrors.hust.edu.cn/apache/hbase/2.1.0/hbase-2.1.0-bin.tar.gz
<http://mirrors.hust.edu.cn/apache/hbase/2.1.0/hbase-2.1.0-bin.tar.gz>
3. 主机规划
二、HBase部署
1. 上传解压介质
scp -r hbase-2.1.0-bin.tar.gz host16:/opt/tools/hadoop-system/ ssh host16 cd
/opt/tools/hadoop-system/ mkdir -p /opt/apache/hbase/ tar zxf
./hbase-2.1.0-bin.tar.gz -C /opt/apache/hbase/
2. 配置HBase
cd /opt/apache/hbase/hbase-2.1.0
2.1 配置hbase-env
mkdir -p /opt/apache/hbase/pids
vim conf/hbase-env.sh
export JAVA_HOME=/apps/svr/java/jdk1.8.0_172 export
HADOOP_HOME=/opt/apache/hadoop/hadoop-2.7.3 export
HBASE_CLASSPATH=$HADOOP_HOME/etc/hadoop export HBASE_MANAGES_ZK=false export
HBASE_PID_DIR=/opt/apache/hbase/pids
2.2 配置regionservers
vim conf/regionservers
host14 host15
2.3 配置hbase-site.xml
cp /opt/apache/hadoop/hadoop-2.7.3/etc/hadoop/core-site.xml ./conf
cp /opt/apache/hadoop/hadoop-2.7.3/etc/hadoop/hdfs-site.xml ./conf
vim conf/hbase-site.xml
<configuration> <!-- 指定ZooKeeper集群位置 --> <property>
<name>hbase.zookeeper.quorum</name> <value>host14,host15,host16</value>
</property> <!-- Zookeeper写数据目录,与ZooKeeper集群上配置相一致 --> <property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/opt/apache/zookeeper/data</value> </property> <!-- Zookeeper的端口号 -->
<property> <name>hbase.zookeeper.property.clientPort</name> <value>2181</value>
</property> <!-- RegionServers共享目录 --> <property> <name>hbase.rootdir</name>
<value>hdfs://host16:9000/hbase</value> </property> <!-- 开启分布式模式 --> <property>
<name>hbase.cluster.distributed</name> <value>true</value> </property> <!--
指定Hbase的master的位置 --> <property> <name>hbase.master</name>
<value>hdfs://host16:60000</value> </property> <!--
使用本地文件系统设置为false,使用hdfs设置为true --> <property>
<name>hbase.unsafe.stream.capability.enforce</name> <value>true</value>
</property> </configuration>
3. 配置HBase环境变量
3.1 配置.bash_profile
$ vim ~/.bash_profile
# HBASE_HOME export HBASE_HOME=/opt/apache/hbase/hbase-2.1.0 export
PATH=$PATH:$HBASE_HOME/bin
3.2 立即生效
$ source ~/.bash_profile
4. 拷贝HBase
scp -r /opt/apache/hbase host14:/opt/apache/ scp -r /opt/apache/hbase
host15:/opt/apache/
5. 启动HBase
start-hbase.sh
5.1 WEB UI验证
* http://host16:16010 <http://host16:16010>
热门工具 换一换