HBase Download Install

HBase can be installed in three modes. They are,

  1. Standalone mode
  2. Pseudo-Distributed mode
  3. Fully Distributed mode

Software Requirements

* A machine with Linux operating system.

* Apache hadoop should be installed (https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-common/SingleCluster.html)

Download Hbase tar file stable version

Step 1: Click on the below link and download the latest version of hbase.

http://www-us.apache.org/dist/hbase/

Step 2: Copy the tar file into an installation location “/home/hduser”

1. Standalone mode

It is default mode in Hbase, it runs against local file system.

* It doesn’t use Hadoop HDFS, Only HMaster daemon can run .

* Not recommended for production environment.

* It runs in single JVM (java virtual machine).

Installation

Step 1: Unzip the content using the below command. it will create hbase-1.4.2 in the location “/home/hduser”.

 $tar -xvf hbase-1.4.2-bin.tar.gz

Step 2: Open hbase-env.sh as below and mention JAVA_HOME path.

 $gedit hbase-env.sh

export JAVA_HOME=/usr/lib/jvm/java-1.7.0

Step 3: Open “~/.bashrc” file and mention HBASE_HOME path as shown below.

 export HBASE_HOME=/home/hduser/hbase-1.4.2

export PATH= $PATH:$HBASE_HOME/bin

Step 4: Open hbase-site.xml and place the following content inside the file.

  $ gedit hbase-site.xml

<property>

<name>hbase.rootdir</name>

<value>file:///home/hduser/HBASE/hbase</value>

</property>

<property>

<name>hbase.zookeeper.property.dataDir</name>

<value>/home/hduser/HBASE/zookeeper</value>

</property>

Step 5: Now verify the installation by using below commands.

$ Start-hbase.sh

$jps

Note:  Here “jps” command is used to check whether HMaster is running or not.

Step 6: Start Hbase shell command line using the below command.

$ hbase shell

2. Pseudo Distributed mode

It is a Single node Hadoop system, run on Hadoop HDFS.

* It is recommended for production environment.

Installation

Step 1: Unzip the content using the below command. It will create hbase-1.4.2 in the location “/home/hduser”.

$tar -xvf hbase-1.4.2-bin.tar.gz

Step 2: Open “hbase-env.sh” and mention JAVA_HOME path and Region servers’ path in the location and export the command as shown below.

$gedit hbase-env.sh

export JAVA_HOME=/usr/lib/jvm/java-1.7.0

export HBASE_REGIONSERVERS=/usr/lib/hbase/hbase-1.4.2/conf/regionservers

export HBASE_MANAGERS_ZK=true

Step 3: Open “~/.bashrc” file and mention the HBASE_HOME path.

$gedit ~/.bashrc

export HBASE_HOME=/home/hduser/hbase-1.4.2

export PATH=$PATH:$HBASE_HOME/bin

Step 4: Open “HBase-site.xml” and mention the below contents in the file.

$gedit HBase-site.xml
  <property>

<name>hbase.rootdir</name>

<value>hdfs://localhost:9000/hbase</value>

</property>

<property>

<name>hbase.cluster.distributed</name>

<value>true</value>

</property>

<property>

<name>hbase.zookeeper.quorum</name>

<value>localhost</value>

</property>

<property>

<name>dfs.replication</name>

<value>1</value>

</property>

<property>

<name>hbase.zookeeper.property.clientPort</name>

<value>2181</value>

</property>

<property>

<name>hbase.zookeeper.property.dataDir</name>

<value>/home/hduser/hbase/zookeeper</value>

</property>

Step 5: Verify the installation by using below commands.

$ ./start-all.sh

$start-hbase.sh

3. Fully Distributed mode

It is a Multinode Hadoop environment, it runs on Hadoop HDFS.

* It is highly recommended for production environment.

Note: The installation is same as pseudo distributed mode.

Reference

http://hbase.apache.org/0.94/book/standalone_dist.html