Saturday 22 October 2011

Installing Hbase on Ubuntu

I've been playing with this more than expected so this is to save you from all the troubles I was in.
Here goes:
1) Download desired (stable) Hbase version
2) Copy entire folder to your machine. I used folder /usr/lib
3) Save path into .profile.
export HBASE_HOME=/usr/lib/hbase-0.20.3
export PATH=$HBASE_HOME/bin:$PATH"
4) Install Java, set paths and home if necessary
5) Edit conf/hbase-env.sh and define JAVA_HOME
6) Change ownership of hbase-0.20.3 folder. Log files need write permissions!!
7) Install SSH if necessary
sudo apt-get install openssh-server openssh-client
8) Setup SSH without password
ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

9) Make sure that you can log into localhost without a password
10) Run ./start-hbase.sh from bin folder

In case of troubles, check this post:
Stackoverflow: Server could not be reached after 1 tries, giving up.