Hbase+Hadoop+Zookeeper集群
一、服务器规划和基础配置
*RM-ResourceManager,HM-HMaster,SN-SecondaryNameNode,NM-NodeManager,HR-HRegionServer
IP |
Hostname |
角色 |
10.0.0.1 |
Node1 |
RM,HM,NameNode,SN |
10.0.0.2 |
Node2 |
DataNode,NM,HR |
10.0.0.3 |
Node3 |
DataNode,NM,HR |
1.ssh免密认证
ssh-keygen yum -y install openssh-clients ssh-copy-id
2.Hosts文件主机名解析
vim /etc/hosts
10.0.0.1 Node1
10.0.0.2 Node2
10.0.0.3 Node3
3.防火墙selinux关闭
setenforce 0
4.Java8安装
java 1.8.0_144
vim /etc/profile
export JAVA_HOME=/usr/local/jdk
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
5.软件版本
hbase 1.2.11+hadoop3.1.2+zookeeper3.4.13
二、Zookeeper集群搭建
1. 配置文件更改
1.mv /root/soft/zookeeper-3.4.13 /usr/local/zookeeper
2.mv conf/zoo_sample.cfg conf/zoo.cfg
3.mkdir /usr/local/zookeeper/{data,logs}
4.vim conf/zoo.cfg
-增加如下设置
dataDir=/usr/local/zookeeper/data
dataLogDir=/usr/local/zookeeper/logs
server.1=10.0.0.1:2888:3888
server.2=10.0.0.2:2888:3888
server.3=10.0.0.3:2888:3888