Hbase-00-MAC 安装Hbase 单机模式

1.前置条件:

  • JDK

2.安装

brew install hbase

安装路径:

/usr/local/opt/hbase/bin/start-hbase.sh

3.配置Hbase

conf/hbase-env.sh设置JAVA_HOME

cd /usr/local/Cellar/hbase/2.4.4/libexec/conf
$ vim hbase-env.sh

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_271.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>
➜  bin ./start-hbase.sh
running master, logging to /usr/local/var/log/hbase/hbase-bytedance-master-C02F70J1MD6R.out
➜  bin jps #  查看是否启动成功
10084 RemoteMavenServer36
12725 HMaster
375
377
12762 Jps

4.可以查看hbase的web ui

http://localhost:16010

5.启动hbase shell

➜  bin ./hbase shell
2021-07-02 13:21:22,677 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#shell
Version 2.4.4, r20e7ba45b0c3affdc0c06b1a0e5cbddd1b2d8d18, Mon Jun  7 15:31:55 PDT 2021
Took 0.0014 seconds
hbase:001:0>

参考:https://www.jianshu.com/p/510e1d599123

posted @ 2021-07-19 23:30  sixinshuier  阅读(421)  评论(0编辑  收藏  举报