CentOS安装HBase

1.下载HBASE

http://www.apache.org/dyn/closer.cgi/hbase/

2.解压文件到安装目录

#mkdir hbase

#cd hbase

#tar -zxvf ~/Downloads/hbase-1.2.4-bin.tar.gz

3.配置存储数据路径

#完全分布式模式配置

#vim /usr/hbase/hbase-1.2.4/conf/hbase-site.xml

<configuration>

<property>

<name>hbase.rootdir</name>

<value>hdfs://namenodeserver:9000/hbase</value>

</property>

<property>

<name>hbase.cluster.distributed</name>

<value>true</value>

</property>

</configuration>

#配置region server

#vim hbase-1.2.4/conf/regionservers

#安装启用ZooKeeper

#hbase-1.2.4/conf/hbase-env.sh

export HBASE_MANAGES_ZK=true

4.启动hbase & 打开shell

#bin/start-hbase.sh

#bin/habase shell

5.退出shell & 停止hbase

#exit

#bin/stop-hbase.sh