hbase安装,
1.修改conf/hbase-env.sh,添加jdk支持
export JAVA_HOME=/usr/local/jdk
export HBASE_MANAGES_ZK=true
export HBASE_LOG_DIR=/data/logs/hbase
2. 修改conf/hbase-site.xml,<property>
<name>hbase.rootdir</name>
<value>hdfs://master:9000/hbase</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.master</name>
<value>hdfs://master:60000</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>slave-001,slave-002,slave-003</value>
<description>Comma separated list of servers in the ZooKeeper Quorum. For example, "host1.mydomain.com,host2.mydomain.com,host3.mydomain.com". By default this is set to localhost for local and pseudo-distributed modes of operation. For a fully-distributed setup, this should be set to a full list of ZooKeeper quorum servers. If HBASE_MANAGES_ZK is set in hbase-env.sh this is the list of servers which we will start/stop ZooKeeper on. </description>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/data/work/zookeeper</value>
<description>Property from ZooKeeper's config zoo.cfg. The directory where the snapshot is stored. </description>
</property>
hbase.rootdir设置hbase在hdfs上的目录,主机名为hdfs的namenode节点所在的主机
hbase.cluster.distributed设置为true,表明是完全分布式的hbase集群
hbase.master设置hbase的master主机名和端口
hbase.zookeeper.quorum设置zookeeper的主机,建议使用单数
3.修改hadoop的目录下的conf/hdfs-site.xml
4.修改conf/regionservers
将所有的datanode添加到这个文件,类似与hadoop中slaves文件
5.拷贝hbase到所有的节点
6. 启动hbase
$ ./bin/start-hbase.sh
http://master:60010/
7.登录hbase客户端
./bin/hbase shell
本站文章为和通数据库网友分享或者投稿,欢迎任何形式的转载,但请务必注明出处.
同时文章内容如有侵犯了您的权益,请联系QQ:970679559,我们会在尽快处理。