码迷,mamicode.com
首页 > 其他好文 > 详细

Hbase的集群安装

时间:2018-11-13 23:50:19      阅读:167      评论:0      收藏:0      [点我收藏+]

标签:perm   mat   notice   .sh   html   1.4   style   server   show   

hadoop集群的搭建

搭建真正的zookeeper集群

Hbase需要安装在成功部署的Hadoop平台,并且要求Hadoop已经正常启动。

同时,HBase需要集群部署,我们分别把HBase 部署到主机:guoyansi128  guoyansi129  guoyansi130

1.下载hbase-1.2.4-bin.tar.gz;并且上传到/usr/local/src中

2.解压缩并且把解压缩后的文件移动到上级目录

3.修改 /usr/lcoal/hbase-1.4.8/conf/hbase-env.sh文件

去掉exprot JAVA_HOME前面的#号,并且修改jdk安装目录

技术分享图片

4.修改conf/hbasie-site.xml文件

技术分享图片
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
/**
 *
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-->
<configuration>
    <property>
        <name>hbase.cluster.distributed</name>
        <value>true</value>
    </property>
    <property>
        <name>hbase.rootdir</name>
        <value>hdfs://guoyansi128:9000/hbase</value>
    </property>
    <property>
        <name>hbase.zookeeper.quorum</name>
        <value>guoyansi128</value>
    </property>
    <property>
        <name>hbase.master.info.port</name>
        <value>60010</value>
    </property>
</configuration>
View Code

技术分享图片

5.设置regionservers,该文件在conf下

regionservers文件类似Hadoop的slaves文件,启动HBase的时候,系统将根据该文件建立HBase集群。

技术分享图片

6.设置linux的环境变量文件

cd 
ls -a
vim .bash_profile
#HBase
export HBASE_HOME=/usr/local/hbase-1.4.8/
export PATH=$BASE_HOME/bin:$PATH
export HADOOP_CLASSPATH=$HBASE_HOME/lib/*

技术分享图片

 7.启动HBase    进入/usr/local/Hbase-1.4.8/bin

./start-hbase.sh

8.查看启动是否成功

jps

主节点显示的是HBase,从节点显示的是HRegionServer

技术分享图片

技术分享图片

在浏览器上输入地址:192.168.123.128:60010是否能够正常显示:

技术分享图片

 

 HBase使用独立安装的zookeeper

1.修改conf/hbase-env.sh文件

HBASE_MANGES_ZK=false表示不启用自带的zookeeper。true表示使用hbase自带的zookeeper

技术分享图片

 2.将独立安装的zookeeper的配置文件复制到HBase的CLASSPATH

cp /usr/local/zookeeper/conf/zoo.cfg /usr/local/hbase-1.4.8/conf

 

Hbase的集群安装

标签:perm   mat   notice   .sh   html   1.4   style   server   show   

原文地址:https://www.cnblogs.com/guoyansi19900907/p/9955477.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!