hbase伪分布式安装

安装准备

  1. 下载hadoop安装包
  2. 下载hbase安装包(下载二进制包binary即可)
  3. 下载zookeeper安装包

部署hadoop

  1. 修改hadoop-x.x.x/etc/hadoop/core-site.xml文件
<configuration>
   <property>
       <name>fs.defaultFS</name>
       <value>hdfs://localhost:9000</value>
   </property>
   <property>
       <name>hadoop.tmp.dir</name>
       <value>/Users/dummy/work/hadoop-2.7.5/current/tmp</value>
   </property>
   <property>
       <name>fs.trash.interval</name>
       <value>8</value>
   </property>
</configuration>
  1. 修改hadoop-x.x.x/etc/hadoop/mapred-site.xml
<configuration>
    <property>
        <name>mapreduce.framework.name</name>
        <value>yarn</value>
    </property>
</configuration>    
  1. 进入hadoop-x.x.x目录下,执行sbin/sbin/start-dfs.sh,执行sbin/start-yarn.sh
  2. 查看hadoop是否正常工作
> jps
17424 SecondaryNameNode
14369 Main
17812 NameNode
19162 ResourceManager
17323 DataNode
21003 Jps
19246 NodeManager

部署zookeeper

  1. 复制zookeeper-x.x.x/conf/zoo_sample.cfg为zoo.cfg
  2. 修改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=/Users/dummy/work/zookeeper-3.4.14/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
  1. 在dataDir目录下创建一个myid文件,并且myid内容为1
// myid file
1
  1. 进入zookeeper-x.x.x目录,启动zookeeper:bin/zkServer.sh
  2. 查看zookeeper是否正常启动:
> jps
17424 SecondaryNameNode
14369 Main
17812 NameNode
24633 Jps
19162 ResourceManager
23066 QuorumPeerMain
17323 DataNode
19246 NodeManager

部署hbase

  1. 修改hbase-x.x.x/conf/hbase-site.xml文件
<configuration>
    <property>
        <name>hbase.rootdir</name>
        <value>hdfs://localhost:9000/hbase</value>
    </property>
    <property>
        <name>hbase.zookeeper.property.dataDir</name>
        <value>/Users/dummy/work/hbase-2.2.0/data/zookeeper</value>
    </property>
    <property>
        <name>dfs.replication</name>
        <value>1</value>
    </property>
    <property>
        <name>hbase.cluster.distributed</name>
        <value>true</value>
    </property>
    <property>
        <name>hbase.zookeeper.quorum</name>
        <value>localhost</value>
    </property>
</configuration>
  1. 修改conf/hbase-env.sh文件,添加如下命令:
export HBASE_MANAGES_ZK=false
  1. 进入hbase-x.x.x目录,执行bin/start-hbase.sh
  2. 查看hbase是否正常启动
> jps
17424 SecondaryNameNode
14369 Main
22355 HRegionServer
17812 NameNode
22453 Jps
19162 ResourceManager
17323 DataNode
19246 NodeManager
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值