- 下载HBase
mkdir -p /home/ellis/HBase/
cd /home/ellis/HBase/
wget https://downloads.apache.org/hbase/2.5.8/hbase-2.5.8-bin.tar.gz
tar -xvf hbase-2.5.8-bin.tar.gz
- 安装java jdk
sudo apt install openjdk-11-jdk
sudo vim /etc/profile
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/
export PATH=$PATH:$JAVA_HOME/bin
source /etc/environment
- 修改conf/hbase-env.sh
添加
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/
- 添加HBase环境变量
sudo vim /etc/profile
export HBASE_HOME=/home/ellis/HBase/hbase-2.5.8/
export PATH=$HBASE_HOME/bin:$PATH
source /etc/environment
- 修改conf/hbase-site.xml
添加
<property>
<name>hbase.rootdir</name>
<value>file:home/ellis/HBase/hbase/</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/home/ellis/HBase/zookeeper/</value>
</property>
- 运行HBase
/home/ellis/HBase/hbase-2.5.8/bin/stop-hbase.sh
- 查看状态
jps
- 运行HBase shell
cd /home/ellis/HBase/hbase-2.5.8/bin
hbase shell
- 访问
http://ip:16010
https://www.guru99.com/hbase-installation-guide.html