Hbase的集群安装
Posted guoyansi19900907
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Hbase的集群安装相关的知识,希望对你有一定的参考价值。
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>
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的集群安装的主要内容,如果未能解决你的问题,请参考以下文章