Step-by-Step Guide to Installing an HBase Cluster on Hadoop
This article explains what HBase is, describes its Master, RegionServer, and Zookeeper components, and provides detailed environment preparation and configuration steps—including host setup, SSH key distribution, JDK installation, HBase deployment, configuration file edits, and cluster startup—so you can run HBase on a Hadoop cluster.
1. Introduction
HBase is a distributed, open‑source, column‑oriented database that differs from relational databases and is suited for storing unstructured data. It uses a column‑based model similar to Google BigTable: rows have a primary key and any number of columns grouped into column families, which are stored in HFiles for efficient caching. Tables are loosely stored, allowing rows to have varying columns, and data is sorted by primary key and split into multiple Regions.
In production, HBase runs on top of HDFS, using HDFS as its storage layer. Applications access HBase data through a Java API. An HBase cluster consists of a Master, RegionServers, and Zookeeper, as illustrated below:
Master
The Master coordinates multiple RegionServers, monitors their status, balances load, and assigns Regions to RegionServers. Multiple Masters can exist for HA, but only one is active at a time; Zookeeper helps manage failover.
RegionServer
A RegionServer hosts several Regions, manages tables, and handles read/write operations. Clients connect directly to RegionServers to retrieve data. A Region is the basic unit of storage and availability in HBase.
Zookeeper
Zookeeper is critical for HBase HA: it ensures at least one Master is running, registers Regions and RegionServers, and provides fault‑tolerance for many distributed big‑data frameworks.
Because HBase relies on Hadoop, you must have a working Hadoop cluster before installing HBase.
2. Environment Preparation
(1) Update hostnames, edit /etc/hosts, and disable firewalls on all servers.
# cat >> /etc/hosts << EOF
192.168.16.135 c7001
192.168.16.80 c7002
192.168.16.95 c7003
192.168.16.97 c7004
192.168.16.101 c7005
EOF(2) Configure password‑less SSH from c7001 to the other nodes.
ssh-keygen -t rsa
ssh-copy-id -i ~/.ssh/id_rsa.pub c7001
ssh-copy-id -i ~/.ssh/id_rsa.pub c7002
ssh-copy-id -i ~/.ssh/id_rsa.pub c7003
ssh-copy-id -i ~/.ssh/id_rsa.pub c7004
ssh-copy-id -i ~/.ssh/id_rsa.pub c7005(3) Install JDK 1.7+ on each server.
# tar zxf jdk-8u171-linux-x64.tar.gz -C /opt/
# mv jdk1.8.0_171/ jdk1.8
# echo "export JAVA_HOME=/opt/jdk1.8" >> /etc/profile
# echo "export PATH=\$PATH:\$JAVA_HOME/bin" >> /etc/profile
# source /etc/profile
# java -version3. Install HBase
Extract the binary package on the primary node (c7003).
# tar zxf /usr/src/hbase-1.3.0-bin.tar.gz -C /opt/Edit configuration files:
hbase-env.sh
# vim conf/hbase-env.sh
export JAVA_HOME=/opt/jdk1.8.0_121
export HBASE_MANAGES_ZK=falsehbase-site.xml
<?xml version="1.0"?>
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://c7001:9000/hbase</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>c7003,c7004,c7005</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/opt/hbase-1.3.0/tmp/zk/data</value>
</property>
</configuration>Update regionservers to list the RegionServer hosts:
# vi regionservers
c7004
c7005Copy the HBase installation to the other nodes:
# scp -r hbase-1.3.0 root@c7004:/opt/
# scp -r hbase-1.3.0 root@c7005:/opt/Start the cluster: # bin/start-hbase.sh Access the web UI at http://<your‑ip>:16010.
Node processes overview:
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
