需要安装JDK:
https://blog.csdn.net/qq_39680564/article/details/82768938
需要配置免秘钥与修改主机名:
https://blog.csdn.net/qq_39680564/article/details/89498678
需要安装zookeeper集群:
https://blog.csdn.net/qq_39680564/article/details/89500281
需要安装hadoop集群:
https://blog.csdn.net/qq_39680564/article/details/89513162
IP | 主机名 | HDFS | MapReduce/Yarn | 角色 |
---|---|---|---|---|
192.168.1.159 | server1 | NameNode | ResourceManager | Master |
192.168.1.198 | server2 | DataNode | NodeManager | RegionServer、Backup Master |
192.168.1.199 | server3 | DataNode | NodeManager | RegionServer |
cd /opt
wget https://archive.apache.org/dist/hbase/2.1.0/hbase-2.1.0-bin.tar.gz
tar -zxvf hbase-2.1.0-bin.tar.gz
vim ~/.bashrc
添加如下内容
#Hbase
export HBASE_HOME=/opt/hbase-2.1.0
export HBASE_CONF_DIR=/opt/hbase-2.1.0/conf
export PATH=$PATH:$HBASE_HOME/bin
[root@server1 hbase-2.1.0]# source ~/.bashrc
[root@server1 hbase-2.1.0]# echo $HBASE_HOME
/opt/hbase-2.1.0
vim /opt/hbase-2.1.0/conf/hbase-env.sh
修改如下内容
export JAVA_HOME=/opt/jdk-1.8
export HBASE_MANAGES_ZK=false
vim /opt/hbase-2.1.0/conf/hbase-site.xml
添加如下内容
<property>
<name>hbase.rootdirname>
<value>hdfs://server1:9000/hbasevalue>
property>
<property>
<name>hbase.cluster.distributedname>
<value>truevalue>
property>
<property>
<name>hbase.zookeeper.quorumname>
<value>server1,server2,server3value>
property>
<property>
<name>hbase.unsafe.stream.capability.enforcename>
<value>falsevalue>
property>
vim /opt/hbase-2.1.0/conf/regionservers
改为如下内容
server2
server3
vim /opt/hbase-2.1.0/conf/backup-masters
添加如下内容(该文件是不存在的,需要自己创建,里面的主机当作master的备份机)
server2
rm -rf /opt/hbase-2.1.0/lib/client-facing-thirdparty/slf4j-log4j12-1.7.25.jar
cp /opt/hbase-2.1.0/lib/client-facing-thirdparty/htrace-core-3.1.0-incubating.jar /opt/hbase-2.1.0/lib/
[root@server1 opt]# /opt/hbase-2.1.0/bin/start-hbase.sh
server1: running zookeeper, logging to /opt/hbase-2.1.0/logs/hbase-root-zookeeper-server1.out
server2: running zookeeper, logging to /opt/hbase-2.1.0/logs/hbase-root-zookeeper-server2.out
server3: running zookeeper, logging to /opt/hbase-2.1.0/logs/hbase-root-zookeeper-server3.out
running master, logging to /opt/hbase-2.1.0/logs/hbase-root-master-server1.out
server2: running regionserver, logging to /opt/hbase-2.1.0/logs/hbase-root-regionserver-server2.out
server3: running regionserver, logging to /opt/hbase-2.1.0/logs/hbase-root-regionserver-server3.out
server2: running master, logging to /opt/hbase-2.1.0/logs/hbase-root-master-server2.out
server1
server2(作为master的备份机,也有一个HMaster进程)
server3
Master:http://192.168.1.159:16010/master-status
Backup Master:http://192.168.1.198:16010/master-status
RegionServer:http://192.168.1.198:16030/rs-status
RegionServer:http://192.168.1.199:16030/rs-status