Centos7 install hbase stand-alone version

First download the hbase installation package

wget http://mirror.bit.edu.cn/apache/hbase/stable/hbase-2.2.3-bin.tar.gz
Unzip the compressed package
tar -zxvf hbase-2.2.3-bin.tar.gz
Insert picture description here

Modify the /opt/hbase-2.2.3/conf/hbse-env.sh file

The first step is to set up javahome

export JAVA_HOME=/usr/local/java/jdk1.8.0_144

The second part is to set zookeeper to be true for hbase's own zookeeper, and false for the zookeeper deployed by itself

export HBASE_MANAGES_ZK=false

Modify the /opt/hbase-2.2.3/conf/hbse-site.xml file

Configuration properties

<configuration>
<property>
                <name>hbase.rootdir</name>
                <value>file:///opt/hbase-2.2.3/root</value>
        </property>
        <property>
                <name>hbase.tmp.dir</name>
                <value>file:///opt/hbase-2.2.3/tmp</value>
        </property>
        <property>
                <name>hbase.zookeeper.quorum</name>
                <value>127.0.0.1</value>
        </property>
        <property>
               <name>hbase.zookeeper.property.dataDir</name>
               <value>file:///opt/hbase-2.2.3/data</value>
        </property>
<!-- 这里必须设置为true,不然会使用自带zk,若启动外部zookeeper会导致冲突 -->
        <property>
                <name>hbase.cluster.distributed</name>
                <value>true</value>
        </property>
</configuration>

Start hbase

Enter the bin directory and use the ./start-hbase.sh command to start Hbase;

View the management interface

Here you need to open the port or turn off the firewall. My server here is an Alibaba Cloud server. Just configure the port to open, and you can set the port.
Insert picture description here

Enter the command line

In the bin directory./hbase
shell
Insert picture description here

Guess you like

Origin blog.csdn.net/qq_38893133/article/details/104351121