The prerequisite for HBase installation are Java and Hadoop installed on your Linux machine.
Hbase can be installed in three modes: standalone, Pseudo Distributed mode and Fully Distributed mode.
Download the Hbase package from http://www.interior-dsgn.com/apache/hbase/stable/ and unzip it with the below commands.
- $cd usr/local/$wget http://www.interior-dsgn.com/apache/hbase/stable/hbase-0.98.8-hadoop2-bin.tar.gz
- $tar -zxvf hbase-0.98.8-hadoop2-bin.tar.gz
Login as super user as shown below
- $password: enter your password here
- mv hbase-0.99.1/* Hbase/
Configuring HBase in Standalone Mode
Set the java Home for HBase and open hbase-env.sh file from the conf folder. Edit JAVA_HOME environment variable and change the existing path to your current JAVA_HOME variable as shown below.
- cd /usr/local/Hbase/conf
- gedit hbase-env.sh
Replace the existing JAVA_HOME value with your current value as shown below.
- export JAVA_HOME=/usr/lib/jvm/java-1.7.0
Inside /usr/local/Hbase you will find hbase-site.xml. Open it and within configuration add the below code.
- //Here you have to set the path where you want HBase to store its files.
- //Here you have to set the path where you want HBase to store its built in zookeeper files.
Now start the Hbase by running the start-hbase.sh present in the bin folder of Hbase.
- $cd /usr/local/HBase/bin
Cloudera VM is recommended as it has Hbase preinstalled on it.
Starting Hbase: Type Hbase shell in terminal to start the hbase.