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.
Good work !!!!
ReplyDeleteHi, thanks for this post :)
ReplyDeleteI want to setup HBase in standalone mode on local filesystem.
I want to use local file system so I guess no need to install hadoop
and zookeeper.
I followed the instructions from http://hbase.apache.org/book/quickstart.html
i didnt set hbase.rootdir in conf/hbase-site.xml as it will use default /tmp
I am using Kubuntu 12.10 and and
JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk as java 1.6 is required.
HBase shell is running fine but I am unable to create table
I am getting error
hbase(main):001:0> create 'test', 'cf'
ERROR: org.apache.hadoop.hbase.MasterNotRunningException: Retried 7 times
Here is some help for this command:
Create table; pass table name, a dictionary of specifications per
column family, and optionally a dictionary of table configuration.
Dictionaries are described below in the GENERAL NOTES section.
Examples:
hbase> create 't1', {NAME => 'f1', VERSIONS => 5}
hbase> create 't1', {NAME => 'f1'}, {NAME => 'f2'}, {NAME => 'f3'}
hbase> # The above in shorthand would be the following:
hbase> create 't1', 'f1', 'f2', 'f3'
hbase> create 't1', {NAME => 'f1', VERSIONS => 1, TTL => 2592000,
BLOCKCACHE => true}
hbase> create 't1', 'f1', {SPLITS => ['10', '20', '30', '40']}
hbase> create 't1', 'f1', {SPLITS_FILE => 'splits.txt'}
hbase> # Optionally pre-split the table into NUMREGIONS, using
hbase> # SPLITALGO ("HexStringSplit", "UniformSplit" or classname)
hbase> create 't1', 'f1', {NUMREGIONS => 15, SPLITALGO => 'HexStringSplit'}
hbase(main):002:0>
can you tell me where I am wrong?
It seems Hbase didn't start. Do you use start-hbase.sh? What do your logs say?
ReplyDeletecan you provide me the link to download from hbase. There are so many version. i m confused :(
ReplyDeleteYou can try http://apache.claz.org/hbase/stable/ and just follow the previous instructions...
ReplyDeleteOn Ubuntu sudo apt-get install hadoop-hbase
ReplyDeleteThank u
ReplyDeleteI have problem with logs folder psl tell me how to provide write permissions!! to log file....
ReplyDeletesudo chwon -R hduser:hadoop /usr/local/hadoop-2
Deletesudo chmod -R 755 /usr/local/hadoop-2
chmod u+w logfile ?
ReplyDeletehttp://apache.claz.org/hbase/hbase-0.96.0/
ReplyDeletehbase-0.96.0-hadoop2-bin.tar.gz