First you need to make sure that Hadoop is already installed on your computer. Then you just need to download the Hhase configuration.
STEP1: Download hbase http://archive.apache.org/dist/hbase/1.2.6/Select hbase-1.2.6-bin.tar.gz
STEP2: Extract HBase to the specified directory
STEP3: Modify the configuration file (go to the Conf folder)
Step 3.1:hbase-env.sh
Export java_home=/library/java/javavirtualmachines/jdk1.8.0_171.jdk/contents/homeexport HBASE_MANAGES_ZK =true //Here I am using HBase's own zookeper, so I need to set this variable value to True
Step 3.2:hbase-site.xml
The path in Hbase.rootdir here needs to be consistent with the configuration in Hadoop core.site.xml
<configuration>
<property>
<name>hbase.rootdir</name> <value>hdfs://localhost:9000/hbase</value> </property > <property> <name>hbase.cluster.distributed</name> <value>true</value > </property></configuration>
Step 4: Start hhase
You need to start Hadoop here, because HBase uses Hadoop's HDFs service
Step 4.1: Start Hadoop
./start-all.sh
Step 4.2: Start HBase
./start-hbase. Sh
Step 4.3: If the above is working properly, you will see the following interface using JPS.
27780 NameNode27860 DataNode28839 HMaster4312 29754 Jps28941 HRegionServer27965 SecondaryNameNode28383 hquorumpeer
Step 4.4: Access the HBase shell test
gogo:bin my$./hbase shell2018-07-08 12:17:44,820 WARN [main] util. nativecodeloader:unable to load Native-hadoop library for your platform ... using Builtin-java classes where APPLICABLESLF 4j:class path contains multiple slf4j bindings. Slf4j:found Binding in [jar:file:/users/chong/opt/hbase-1.2.6/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/ Staticloggerbinder.class]slf4j:found Binding in [jar:file:/users/chong/opt/hadoop-2.8.2/share/hadoop/common/lib/ Slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/staticloggerbinder.class]slf4j:see http://www.slf4j.org/codes.html# Multiple_bindings for an explanation. Slf4j:actual binding is of type [Org.slf4j.impl.log4jloggerfactory]hbase Shell; Enter ' help<return> ' for list of supported commands. Type "exit<return>" to leave the HBase shellversion 1.2.6, Runknown, Mon may 02:25:32 CDT 2017hbase (main): 001:0&G T Status1 Active master, 0 backup Masters, 1 servers, 0 dead, 3.0000 average loadhbase (main):002:0>
Macbook Hbase (1.2.6) pseudo-distributed installation, Hadoop (2.8.2), using your own zookeeper