1.查看目录

安装java  https://www.cnblogs.com/yoyo1216/category/1490567.html
安装hadoop https://www.cnblogs.com/yoyo1216/p/12668966.html
安装zookeeper https://www.cnblogs.com/yoyo1216/p/12700989.html
mkdir -p /usr/local/hbase/data
cd /usr/local/hbase

2.下载 https://archive.cloudera.com/cdh5/cdh/5/

wget https://archive.cloudera.com/cdh5/cdh/5/hbase-1.2.0-cdh5.16.2.tar.gz

3.解压

tar -zvxf hbase-1.2.0-cdh5.16.2.tar.gz    # 解压

4.配置环境变量

vim /etc/profile
export HBASE_HOME=/usr/local/hbase/hbase-1.2.0-cdh5.16.2
export PATH=$HBASE_HOME/bin:$PATH

source /etc/profile

5.修改配置文件

cd /usr/local/hbase/hbase-1.2.0-cdh5.16.2/conf
vim hbase-env.sh
export JAVA_HOME=/usr/local/java1.8/jdk1.8.0_241
export HBASE_MANAGES_ZK=flase  # 使用自己的zookeeper管理

vim hbase-site.xml
<property>
  <name>hbase.cluster.distributed</name>
  <value>true</value>
</property>
<property>
  <name>hbase.tmp.dir</name>
  <value>/usr/local/hbase/data</value>
</property>
<property>
  <name>hbase.rootdir</name>
  <value>hdfs://192.168.104.94:8020/hbase</value>
</property>
<property>
  <name>hbase.zookeeper.quorum</name>
  <value>192.168.104.94</value>  或 <value>192.168.104.94,192.168.104.96,192.168.104.97</value>
</property>
<property>
  <name>hbase.zookeeper.property.dataDir</name>
  <value>/usr/local/zookeeper/data</value>
</property>

vim regionservers
192.168.104.94

6.启动

bash start-hbase.sh  #  启动
bash stop-hbase.sh  # 停止
bash hbase-daemon.sh start/stop/restart regionserver   # 启动/停止/重启 regionserver和master server

7.查看是否启动成功

jps

HMaster
HRegionServer   出现这个两个启动正常

8.Hbase监控页面

http://192.168.104.94:60010/master-status