Hbase简单搭建(33)

Hbase的集群搭建过程:

            注意:(1)hadoop必须启动,并且可以写入文件.

                    (2)zookeeper必须在各个节点启动成功.

  1. 确定集群结构,以hadoop0作为主节点,hadoop1和hadoop2作为从节点.

  2. 在hadoop0、hadoop1、hadoop2上分别启动Zookeeper,命令是zkServer.sh     start

  3. 在hadoop0的现有的伪分布配置上做修改

  4. 修改conf/hbase-env.sh,修改export    HBASE_MANAGES_ZK=false(表示不用自身的zookeeper)

            export JAVA_HOME=/usr/local/jdk

  5.    修改conf/hbase-site.xml,修改hbase.zookeeper.quorum的值改为hadoop0,hadoop1,hadoop2

  6.    修改conf/regionservers,修改内容为hadoop1,hadoop2(每个一行)

  7.    把hbase文件夹复制到hadoop1、hadoop2的对应目录下,执行命令

         scp    -r    /usr/local/hbase        hadoop1:/usr/local

         scp    -r    /usr/local/hbase        hadoop2:/usr/local

  8.    把hadoop0上的/etc/profile复制到其他节点,然后在其他节点执行source    /etc/profile

  9.    首先关闭伪分布,执行命令stop-hbase.sh.

  10.    在hadoop0上执行命令start-hbase.sh,启动集群

  11.    进入hbase,命令:hbase    shell.

 

                                                                                                                                        Name:Xr

                                                                                                                                        Date:2014-04-05    21:03

你可能感兴趣的:(Hbase简单搭建(33))