EVN: hadoop2.3.0 ubuntu12.04 64 hue3.5.0 pig0.12.0 hive0.12.0 oozie4.0.0
Install
Download tarball form http://mirrors.cnnic.cn/apache/hbase/hbase-0.98.0/
#tar -xzvf hbase-0.98.0-hadoop2-bin.tar.gz #cd hbase-0.98.0-hadoop2
Configure
Note:the following conf is suited to fully-distributed mode not standalone mode.
-------system env ----
In the file /etc/security/limits.conf
add a line like:
hadoop - nofile 32768
Replace hadoop
with whatever user is running Hadoop and HBase. If you have separate users, you will need 2 entries, one for each user. In the same file set nproc hard and soft limits. For example:
hadoop soft/hard nproc 32000
In the file /etc/pam.d/common-session
add as the last line in the file:
session required pam_limits.so
Don't forget to log out and back in again for the changes to take effect!
-------conf/hbase-env.sh-----
export JAVA_HOME=/usr/lib/jvm/java-7-oracle
export HBASE_MANAGES_ZK=false
//To point HBase at an existing ZooKeeper cluster, one that is not managed by HBase. Next set ensemble locations and client port, if non-standard, in hbase-site.xml
, or add a suitably configured zoo.cfg
to HBase's CLASSPATH
.
A distributed Apache HBase installation depends on a running ZooKeeper cluster
------conf/hbase-site.xml----
<property>
<name>hbase.rootdir</name>
<value>hdfs://192.168.122.1:2014/hbase</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property> <name>hbase.zookeeper.property.clientPort</name> <value>2181</value> </property> <property> <name>hbase.zookeeper.quorum</name> <value>zhj-c0,zhj-c1,zhj-c2</value> </property> <property> <name>hbase.zookeeper.property.dataDir</name> <value>/home/zhaohj/hadoop/zookeeper-3.4.6/snapshot</value> </property>
-----conf/regionservers----
192.168.122.2
192.168.122.3
192.168.122.4
==> hadoop slaves
When all configuration completed, distribute the hbase-0.98.0-hadoop2 dir to all node in cluster.
Start/Stop
#bin/start-hbase.sh #bin/stop-hbase.sh #bin/hbase shell
reference:
official documents in tarball