Hbase installation and configuration tutorial under Linux

Hbase installation and configuration tutorial under Linux

Hbase installation and configuration under Linux

First, install Hadoop

Linux Hadoop 2.7.3 Installation and Setup

1. Download the Hbase installation package

Click to enter the Hbase official website to download

http://hbase.apache.org/downloads.html

2. Installation

Upload the downloaded Hbase installation package to the specified directory on the server (unlimited, depending on the actual situation) and decompress it.

insert image description here

3. Configure the JAVA_HOME environment variable

Find the conf/hbase-env.sh file in the hbase installation directory, uncomment the JAVA_HOME line in the file and change it to the actual path of the local JDK.

	export JAVA_HOME=/wys/jdk1.8.0_311/
	# Because hbase comes with zk, here true is to use export HBASE_MANAGES_ZK=true

insert image description here

4. (Optional) Configure hbase-site.xml

Modify the conf/hbase-site.xml file

<configuration>
 <!-- hbase data storage directory -->
  <property>
    <name>hbase.rootdir</name>
    <value>file:/hadoop/hbase-2.4.7/data</value>
  </property>

  <!-- ZooKeeper data file path -->
  <property>
    <name>hbase.zookeeper.property.dataDir</name>
    <value>/hadoop/hbase-2.4.7/zkdata</value>
  </property>

<!--Specify the zk address as the machine name-->
<property>
        <name>hbase.zookeeper.quorum</name>
        <value>VM-16-8-centos</value>
</property>
<property>
  <name>hbase.zookeeper.property.clientPort</name>
  <value>2181</value>
</property>
 <!-- ZooKeeper node name for storing hbase data -->
    <property>
        <name>zookeeper.znode.parent</name>
        <value>/hbase</value>
    </property>
    <!-- Cluster mode, distributed or stand-alone mode. If set to false, the HBase process and Zookeeper process will be in the same JVM process. If set to true, an error will be reported. -->
    <property>
        <name>hbase.cluster.distributed</name>
        <value>true</value>
    </property>
<property>
  <name>hbase.unsafe.stream.capability.enforce</name>
  <value>false</value>
</property>
<property>
   <name>hbase.master.maxclockskew</name>
   <value>120000</value>
</property>
 <!--Set the enabled port to be accessible from the external network-->
<property>
<name>hbase.master.ipc.address</name>
<value>0.0.0.0</value>
</property>
<property>
<name>hbase.regionserver.ipc.address</name>
<value>0.0.0.0</value>
</property>

</configuration>

Note: The following controls whether the port can be accessed from the external network.

<property>
<name>hbase.master.ipc.address</name>
<value>0.0.0.0</value>
</property>
<property>
<name>hbase.regionserver.ipc.address</name>
<value>0.0.0.0</value>
</property>
 0 0.0.0.0: The one that starts with 127.0.0.1:40648 is accessible from the Internet. This Internet cannot access it. 

insert image description here

5. Start Hbase

Run the ./bin/start-hbase.sh command in the Hbase installation directory to start Hbase.

insert image description here

In stand-alone mode, after Hbase is successfully started, an HMaster and ZooKeeper background process will be generated. You can browse the Hbase monitoring page by accessing http://localhost:16010 in the browser.

insert image description here

After successful startup, execute ./bin/hbase shell in the Hbase installation directory to enter the Hbase command line interface.

insert image description here

list can view all tables

insert image description here

Phoenix installation and configuration

1. Download the Hbase installation package

Click to enter Phoenix official website to download

2. Installation

Upload the downloaded Phoenix installation package to the specified directory on the server (unlimited, depending on the actual situation) and decompress it.

insert image description here

3. Configuration

Copy phoenix-[version]-server.jar in the Phoenix installation directory to the lib directory of Hbase and restart Hbase.

insert image description here
insert image description here

4. Run

Execute ./bin/sqlline.py 127.0.0.1:2181 in the Phoenix installation directory to connect to Hbase. After the connection is successful, execute the !tables command to see several system tables that are automatically created.

insert image description here

**Note:** The first connection may be slow because several system tables will be created, as shown above.

Connecting to Phoenix from other hosts on the Internet or intranet

Connect Phoenix to HBase via DBeaver

This is the end of this article about Hbase installation and configuration under Linux. For more relevant Linux Hbase installation and configuration content, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future!

<<:  Pure CSS to achieve candle melting (water droplets) sample code

>>:  Import CSS files using judgment conditions

Recommend

Detailed Example of MySQL InnoDB Locking Mechanism

1. InnoDB locking mechanism The InnoDB storage en...

Solution to the MySQL error "Every derived table must have its own alias"

MySQL reports an error when executing multi-table...

CSS modular solution

There are probably as many modular solutions for ...

Simple Mysql backup BAT script sharing under Windows

Preface This article introduces a simple BAT scri...

Common errors and solutions for connecting Navicat to virtual machine MySQL

Question 1 solve Start the service: service mysql...

Solution to "Specialized key was too long" in MySQL

Table of contents Solution 1 Solution 2 When crea...

jQuery implements navigation bar effect with expansion animation

I designed and customized a navigation bar with a...

Vue Element front-end application development to obtain back-end data

Table of contents Overview 1. Acquisition and pro...

JavaScript data flattening detailed explanation

Table of contents What is Flattening recursion to...

Summary of MySQL commonly used type conversion functions (recommended)

1. Concat function. Commonly used connection stri...

JavaScript event capture bubbling and capture details

Table of contents 1. Event Flow 1. Concept 2. DOM...

Implementation of react routing guard (routing interception)

React is different from Vue. It implements route ...

Mysql solution to improve the efficiency of copying large data tables

Preface This article mainly introduces the releva...