1.假定已安装好 hadoop 0.23.7 分布安装
2.选择与hadoop 版本相支持的Hbase 参考 https://hbase.apache.org/book/configuration.html
Hbase 0.94
3. 设置 conf/hbase-site.xml
<configuration> <property> <name>hbase.rootdir</name> <value>hdfs://namenode1:9000/hbase</value> </property> <property> <name>hbase.cluster.distributed</name> <value>true</value> </property> <property> <name>hbase.master</name> <value>namenode1:60000</value> </property> <property> <name>hbase.tmp.dir</name> <value>/opt/hadoop/hbase_data/tmp</value> </property> <property> <name>hbase.zookeeper.quorum</name> <value>datanode1,datanode2,datanode3</value></property> <property> <name>hbase.zookeeper.property.dataDir</name> <value>/opt/hadoop/zk_data/tmp</value> </property> </configuration>
export HBASE_MANAGES_ZK=
true
5. conf/regionservers 与slaves相同, 设置
datanode1
datanode2
datanode3
6.启动命令:
hbase/bin/start-hbase.sh
Build Hbase:
mvn package -Dhadoop.profile=23/2.0 (-Dmaven.test.skip.exec=true to build -tests.jar without running tests )
查看状态: http://namenode1:60010/master-status