How to Install HBase in Ubuntu

  • Step 1. Prerequisites for installing HBase

    Ubuntu 12.04
    Java 1.8.0
    Hadoop-1.2.1

  • Step 2. Download HBase from the following link

    https://archive.apache.org/dist/hbase/hbase-0.94.16/

  • Step 3. Extract hbase-0.94.16.tar.gz into the /usr/local/ directory using the following command

    $sudo tar xzf hbase-0.94.16.tar.gz -C /usr/local/

  • Step 4. Set HBase environment variable as follows

    Modify .bashrc
    vi /home/admin(system name)/.bashrc
    Add the following lines to .bashrc file
    # Set Hbase-related environment variables
    export HBASE_HOME=/usr/local/hbase/hbase-0.94.16
    # Add Hbase bin/ directory to PATH
    export PATH=$PATH:$HBASE_HOME/bin

  • Step 5. Configuration of HBase directory

    Add the following lines to HBase xml files
    These files are contained in the following directory
    $ cd /usr/local/hbase-0.94.16/conf

  • 1. hbase-env.sh

    export JAVA_HOME = / usr / lib/jvm/ jdk1.8.0export HBASE_MANAGES_ZK = true

  • 2. hbase-site.xml

    hbase.cluster.distributedtrue

  • Step 6. Start Hadoop Daemons

    $start-all.sh

  • Step 7. Start Verify the running state of Hadoop daemonss

    $jps6146 JobTracker
    6400 TaskTracker
    6541 Jps
    5806 DataNode
    6057 SecondaryNameNode
    5474 NameNode

  • Step 8.  Start Hbase

    $./start-hbase.sh

  • Step 9. Start Verify the running state of HBase daemons

    7498 HQuorumPeer
    5835 HMaster
    8929 TaskTracker
    7854 HRegionServer
    8079 NameNode
    8677 JobTracker
    8975 Jps
    8327 DataNode
    8582 SecondaryNameNode

  • Step 10. Start HBase Shell

    $./hbase shell