HBase的下载、安装与配置

声明:作者原创,转载注明出处。

作者:帅气陈吃苹果

(一)安装

下载、解压:

wget http://mirror.bit.edu.cn/apache/hbase/1.3.1/hbase-1.3.1-bin.tar.gz

tar -zxvf hbase-1.3.1.tar.gz -C /root/hadoop/

(二)配置

cd $HBASE_HOME/conf

vim hbase-site.xml
1)单机模式
<!-- 指定HRegion服务器的位置,即数据存放位置  -->
<property>
    <name>hbase.rootdir</name>
    <value>file:///tmp/hbase-${user.name}/hbase</value>
</property>
2)伪分布式模式
<!-- 指定HRegion服务器的位置,即数据存放位置  -->
<property>
    <name>hbase.rootdir</name>
    <value>hdfs://localhost:9000/hbase</value>
</property>
<!-- 指定HLog和Hfile的副本个数  -->
<property>
    <name>dfs.replication</name>
    <value>1</value>
</property>
3)完全分布式模式
<!--  指定HRegion服务器的位置,即数据存放位置 -->
<property>
    <name>hbase.rootdir</name>
    <value>hdfs://master:9000/hbase</value>
</property>
<!-- 指定HBase运行模式,false表示单机模式或伪分布式,true表示完全分布式模式  -->
<property>
    <name>hbase.clister.distributed</name>
    <value>true</value>
</property>
<!-- 指定master位置  -->
<property>
    <name>hbase.master</name>
    <value>hdfs://master:60000</value>
</property>
<!--  指定zookeeper集群 -->
<property>
    <name>hbase.zookeeper.quorum</name>
    <value>master,slave1,slave2</value>
</property>

(三)运行

cd $HBASE_HOME/bin

1)单机模式
start-hbase.sh
2)伪分布式模式
start-dfs.sh

start-hbase.sh
3)完全分布式模式
start-dfs.sh

zookeeper.sh start

start-hbase.sh

最后,欢迎指正。喜欢的话,点个赞呗,请你吃苹果。

最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容