Installing HBase on a Single Ubuntu Box

HBase needs Hadoop HDFS and Zookeeper together in a production cluster. So you should install Hadoop and Zookeeper first. I will add a separate post for this later. But for testing, a stand-alone running is enough.

But it is very helpful to follow or read this post to warm yourself up:

At least for best practice, you should create a dedicated user hduser for all Hadoop related work and install latest Java (now Oracle Java 7).


  • download hbase from, I download “hbase-0.92.1.tar.gz”
  • open a terminal, and type following commands
    cd /usr/local
    sudo tar -zxf /home/hadoop/Downloads/hbase-0.92.1.tar.gz (change it to your path)
    sudo chown -R hduser:hadoop hbase-0.92.1/
    sudo ln -s hbase-0.92.1 hbase
    sudo chown -R hduser:hadoop hbase
  • edit conf/, to set correct Java path, for example, in my system: export JAVA_HOME=/usr/lib/jvm/java-7-oracle
  • To avoid error like this: “… Unable to find a viable location to assign region …”, chang to in /etc/hosts
  • start Hbase in terminal:
    cd hbase
    su hduser
    hduser@ubuntu:/usr/local/hbase$ bin/
    starting master, logging to /usr/local/hbase/bin/../logs/hbase-hduser-master-ubuntu.out
    hduser@ubuntu:/usr/local/hbase$ bin/hbase shell
    HBase Shell; enter 'help<RETURN>' for list of supported commands.
    Type "exit<RETURN>" to leave the HBase Shell
    Version 0.92.1, r1298924, Fri Mar  9 16:58:34 UTC 2012

But, one problem of this configuration is that your hbase table is save to /tmp/hbase-${} which means you’ll lose all your data whenever your server reboots (Most operating systems clear /tmp on restart). So you might want to edit conf/hbase-site.xml and set the directory you want HBase to write to, hbase.rootdir.

You can write to a local folder. Edit the conf/hbase-site.xml, replace the file path to your location:


Check Hbase status at: http://localhost:60030/rs-status

you can save table into HDFS, this will be discussed in later post.



9 thoughts on “Installing HBase on a Single Ubuntu Box

  1. Thank you!!!
    This post helped me to solve:
    “this: “… Unable to find a viable location to assign region …”, change to in /etc/hosts”

  2. I want to install HBase in standalone mode only I need to install hadoop and zookeeper for stand alone mode installation of HBace?
    for standalone mode what shoud I set for hbase.rootdir in conf/hbase-site.xml?
    thank you

      1. on some forum I read that for distributed and Pseudo-distributed one need to install hadoop and zookeeper to hbase work. but no need to install hadoop and zookeeper for standalon HBase. please tell is it true? or i really need to install hadoop and zookeeper to install HBase even in standalone mode. I followed
        this does not saying anything about hadoop and zookeeper for standalone.
        thanks 🙂

      2. It says: “This guide describes setup of a standalone HBase instance that uses the local filesystem.” Please note “local file system” not HDFS. The beauty of HBase is the distribution based on HDFS for real enterprise usage.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s