一、环境信息
mac 11.6 bigSur java jdk1.8
二、安装
brew install hbase
安装信息
==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/lzo-2.10.big_sur.bottle.tar.gz
######################################################################## 100.0%
==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/openjdk%4011-11.0.12.big_sur.bottle.tar.gz
######################################################################## 100.0%
==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/hbase-2.4.5.big_sur.bottle.1.tar.gz
######################################################################## 100.0%
To start hbase:
brew services start hbase
Or, if you don't want/need a background service you can just run:
/usr/local/opt/hbase/bin/hbase --config /usr/local/opt/hbase/libexec/conf master start
三、配置
安装路径 /usr/local/opt/hbase/bin/start-hbase.sh
配置Hbase 在conf/hbase-env.sh 设置JAVA_HOME
cd /usr/local/Cellar/hbase/2.4.5/libexec/
$ vim conf/hbase-env.sh
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home
在conf/hbase-site.xml设置HBase的核心配置
<configuration>
<property>
<name>hbase.rootdir</name>
//这里设置让HBase存储文件的地方
<value>file:///usr/local/var/hbase</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
//这里设置让HBase存储内建zookeeper文件的地方
<value>/usr/local/var/zookeeper</value>
</property>
</configuration>
四、启动
cd ../bin
./start-hbase.sh
jps
28592 Elasticsearch
67411 HMaster
96834
35492 RemoteMavenServer36
41589 RemoteMavenServer36
67464 Jps
五、hbase的webUI
http://localhost:16010
六、启动hbase shell
在/usr/local/Cellar/hbase/2.4.5/libexec目录下
./bin/hbase shell
2022-05-03 22:39:05,634 WARN [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
HBase Shell
Use "help" to get list of supported commands.
Use "exit" to quit this interactive shell.
For Reference, please visit: http://hbase.apache.org/2.0/book.html
Version 2.4.5, r03b8c0cf426cbae3284225b73040ec574d5bac34, Tue Jul 27 09:44:16 PDT 2021
Took 0.0014 seconds
hbase:001:0>
|