伪分布hadoop2.8.5+hbase2.2.1的安装使用(后因版本问题切换到1.4.10,安装过程相同)

本文详细介绍了如何在伪分布模式下安装Hadoop 1.4.10和Hbase 2.2.1,包括单机版Zookeeper部署、Hbase的配置与启动,以及Hbase的基本操作,如创建命名空间、表,插入和查询数据,快照管理,分区操作等。
摘要由CSDN通过智能技术生成

安装环境

jdk1.8
zookeeper3.4.14
hbase 2.2.1
hadoop 2.8.5

版本兼容一览
在这里插入图片描述
首推清华镜像下载站下载所需包
清华镜像

单机版zookeeper部署

解压下载好的zookeeper包,到自己的目录

cd zookeeper/

进入zookeeper目录
创建文件夹data 用来存储同步信息

mkdir data

进入到conf目录

cp zoo_sample.cfg zoo.cfg
vim zoo.cfg

修改添加zoo.cfg文件内容如下:

# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial 
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between 
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just 
# example sakes.
dataDir=/usr/zookeeper/data #这是刚刚创建的data目录用来存储同步信息
# the port at which the clients will connect
clientPort=2181
# the maximum number of client connections.
# increase this if you need to handle more clients
#maxClientCnxns=60
#
# Be sure to read the maintenance section of the 
# administrator guide before turning on autopurge.
#
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=3
# Purge task interval in hours
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1
server.1=localhost:2888:3888 #单机版添加一个server即可

然后再回到创建的data目录:

touch myid
echo 1 >> myid

进入到bin目录

./zkServer.sh start
./zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /usr/zookeeper/bin/../conf/zoo.cfg
Mode: standalone

发现是standalone即可

安装Hbase

解压下载好的hbase包到自定义的目录

wget https://mirrors.tuna.tsinghua.edu.cn/apache/hbase/2.2.1/hbase-2.2.1-bin.tar.gz

进入到hbase目录下,将lib中zookeeper的jar包换成自己相应版本的

[root@hadoop lib]# cp /usr
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值