HBase build–Standalone HBase
1, build method description
the setup of a single-node standalone HBase. A standalone instance has all
HBase daemons — the Master, RegionServers, and ZooKeeper — running in a single JVM persisting to the local filesystem.
2, build steps
1. The JDK must be installed in the virtual machine. It is recommended to use 1.8 for the JDK version (if it is already installed, ignore this step)
2, on the official website Download the installation package corresponding to HBase in this course. This course uses version 2.0.5
3. In theory, HBase can be uploaded to any virtual machine, but because HBase requires zookeeper to act as a distributed collaboration service , And the HBase installation package includes zookeeper. After we turn on the virtual machine, we generally prepare a highly available Hadoop cluster. Therefore, the zookeeper service is already included in the cluster. Therefore, it is recommended to use the single-node HBase Configured on the node where zookeeper is not installed
4, decompress the hbase installation package
tar xzvf hbase-2.0.5-bin.tar.gz -C /opt/ bigdata
cd hbase-2.0.5/
5. Configure HBase environment variables in the /etc/profile file
export HBASE_HOME=/opt/bigdata/hbase- 2.0.5
Set $HBASE_HOME to the PATH path
6. Enter the /opt/bigdata/hbase-2.0.5/conf directory and add it to the hbase-env.sh file JAVA_HOME
JAVA_HOME=/usr/java/jdk1.8.0_181-amd64
7, enter /opt/bigdata/hbase-2.0.5/con In the f directory, add hbase-related attributes in the hbase-site.xml file
hbase.rootdir file:/ //home/testuser/hbase < property> hbase.zookeeper.property.dataDir /home/testuser/zookeeper hbase.unsafe.stream.capability.enforce false Controls whether HBase will check for stream capabilities (hflush/hsync). Disable this if you intend to run on LocalFileSystem, denoted by a rootdir with the'file://' scheme, but be mindful of the NOTE below. WARNING: Setting this to false blinds you to potential data loss and inconsistent system state in the event of process and/or node failures. If HBase is complaining of an inability to use hsync or hflush it's most likely not a false positive.
8, run hbase shell in any directory Command, enter the hbase command line to perform related operations.