>

HBase的伪分布式安装

- 编辑:正版管家婆马报彩图 -

HBase的伪分布式安装

Hbase安装格局介绍

单机方式
1> Hbase不选用HDFS,仅使用当和姑件系统
2> ZooKeeper与Hbase运转在同八个JVM中

遍及式情势
– 伪布满式形式
1> 全数进度运营在同三个节点上,不相同进度运行在区别的JVM个中
2> 比较契合实验测量检验
– 完全布满式模式
1> 进度运营在多少个服务器集群中
2> 分布式信任于HDFS系统,由此布署Hbase以前必供给有贰个常规办事的HDFS集群

Linux情况希图

闭馆防火墙和SELinux

# service iptables stop

# chkconfig iptables off

# vim /etc/sysconfig/selinux

SELINUX=disabled

布署主机名及主机名绑定

# vim /etc/sysconfig/network

NETWORKING=yes
HOSTNAME=hbase

# vim /etc/hosts

192.168.244.30 hbase

SSH免密码登陆

# ssh-keygen

一直按Enter键

# ssh-copy-id -i /root/.ssh/id_rsa.pub root@192.168.244.30

安装jdk

# tar xvf jdk-7u79-linux-x64.tar.gz -C /usr/local/

# vim /etc/profile

export JAVA_HOME=/usr/local/jdk1.7.0_79
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

# source /etc/profile

Hadoop的装置配置

下载地址:

在这里,选择2.5.2版本

# wget

# tar xvf hadoop-2.5.2.tar.gz -C /usr/local/

# cd /usr/local/hadoop-2.5.2/

# vim etc/hadoop/hadoop-env.sh

export JAVA_HOME=/usr/local/jdk1.7.0_79

 

配置HDFS

# mkdir /usr/local/hadoop-2.5.2/data/

# vim etc/hadoop/core-site.xml

<configuration>
    <property>
        <name>fs.defaultFS</name>
        <value>hdfs://192.168.244.30:8020</value>
    </property>
    <property>
        <name>hadoop.tmp.dir</name>
        <value>/usr/local/hadoop-2.5.2/data/tmp</value>
    </property>
</configuration> 

# vim etc/hadoop/hdfs-site.xml

<configuration>
    <property>
        <name>dfs.replication</name>
        <value>1</value>
    </property>
</configuration>

配置YARN

# mv etc/hadoop/mapred-site.xml.template etc/hadoop/mapred-site.xml

# vim etc/hadoop/mapred-site.xml

<configuration>
    <property>
        <name>mapreduce.framework.name</name>
        <value>yarn</value>
    </property>
</configuration>

 

# vim etc/hadoop/yarn-site.xml

<configuration>
    <property>
        <name>yarn.nodemanager.aux-services</name>
        <value>mapreduce_shuffle</value>
    </property>
</configuration>

启动HDFS

早先化文件系统

# bin/hdfs namenode -format

...
16/09/25 20:33:02 INFO common.Storage: Storage directory /tmp/hadoop-root/dfs/name has been successfully formatted.
...

出口上述音信即表示文件系统初阶化成功

启动NameNod和DataNode进程

# sbin/start-dfs.sh

16/10/09 19:35:03 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes wh
ere applicableStarting namenodes on [hbase]
The authenticity of host 'hbase (192.168.244.30)' can't be established.
RSA key fingerprint is 1a:12:f5:e3:5d:e1:2c:5c:8c:56:52:ba:42:1c:ac:ba.
Are you sure you want to continue connecting (yes/no)? yes
hbase: Warning: Permanently added 'hbase' (RSA) to the list of known hosts.
hbase: starting namenode, logging to /usr/local/hadoop-2.5.2/logs/hadoop-root-namenode-hbase.out
The authenticity of host 'localhost (::1)' can't be established.
RSA key fingerprint is 1a:12:f5:e3:5d:e1:2c:5c:8c:56:52:ba:42:1c:ac:ba.
Are you sure you want to continue connecting (yes/no)? yes
localhost: Warning: Permanently added 'localhost' (RSA) to the list of known hosts.
localhost: starting datanode, logging to /usr/local/hadoop-2.5.2/logs/hadoop-root-datanode-hbase.out
Starting secondary namenodes [0.0.0.0]
The authenticity of host '0.0.0.0 (0.0.0.0)' can't be established.
RSA key fingerprint is 1a:12:f5:e3:5d:e1:2c:5c:8c:56:52:ba:42:1c:ac:ba.
Are you sure you want to continue connecting (yes/no)? yes
0.0.0.0: Warning: Permanently added '0.0.0.0' (RSA) to the list of known hosts.
0.0.0.0: starting secondarynamenode, logging to /usr/local/hadoop-2.5.2/logs/hadoop-root-secondarynamenode-hbase.out
16/10/09 19:35:32 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes wh
ere applicable 

启动YARN

# sbin/start-yarn.sh 

starting yarn daemons
starting resourcemanager, logging to /usr/local/hadoop-2.5.2/logs/yarn-root-resourcemanager-hbase.out
localhost: starting nodemanager, logging to /usr/local/hadoop-2.5.2/logs/yarn-root-nodemanager-hbase.out

经过jps查看各进程是不是运转成功

# jps

2421 NodeManager
2339 ResourceManager
1924 NameNode
2029 DataNode
2170 SecondaryNameNode
2721 Jps

 

也可由此会见

图片 1

 

Hbase的设置配置

下载地址:

在这里地,下载的是1.2.3本子

有关hbase和hadoop的版本对应音讯,可参照他事他说加以考查官档的求证

# wget

# tar xvf hbase-1.2.3-bin.tar.gz -C /usr/local/

# cd /usr/local/hbase-1.2.3/

# vim conf/hbase-env.sh

export JAVA_HOME=/usr/local/jdk1.7.0_79

配置Hbase

# mkdir /usr/local/hbase-1.2.3/data

# vim conf/hbase-site.xml 

<configuration>
  <property>
    <name>hbase.rootdir</name>
    <value>hdfs://192.168.244.30:8020/hbase</value>
  </property>
  <property>
    <name>hbase.zookeeper.property.dataDir</name>
    <value>/usr/local/hbase-1.2.3/data/zookeeper</value>
  </property>
  <property>
    <name>hbase.cluster.distributed</name>
    <value>true</value>
  </property>
</configuration> 

# vim conf/regionservers 

192.168.244.30

启动Hbase

# bin/hbase-daemon.sh start zookeeper

starting zookeeper, logging to /usr/local/hbase-1.2.3/bin/../logs/hbase-root-zookeeper-hbase.out

# bin/hbase-daemon.sh start master

starting master, logging to /usr/local/hbase-1.2.3/bin/../logs/hbase-root-master-hbase.out

# bin/hbase-daemon.sh start regionserver

starting regionserver, logging to /usr/local/hbase-1.2.3/bin/../logs/hbase-root-regionserver-hbase.out

透过jps查看新添的java进度

# jps

2421 NodeManager
2975 HQuorumPeer
3302 HRegionServer
3051 HMaster
2339 ResourceManager
1924 NameNode
2029 DataNode
2170 SecondaryNameNode
3332 Jps

能够看出,新添了HQuorumPeer,HRegionServer和HMaster两个进程。

通过

图片 2

 

由来,Hbase的伪布满式集群搭建完结~

Hadoop+HBase搭建云存款和储蓄计算 PDF http://www.linuxidc.com/Linux/2013-05/83844.htm

Ubuntu Server 14.04 下 Hbase数据库安装  http://www.linuxidc.com/Linux/2016-05/131499.htm

HBase 结点之间时间分歧等导致regionserver运营战败 http://www.linuxidc.com/Linux/2013-06/86655.htm

Hadoop+ZooKeeper+HBase集群配置 http://www.linuxidc.com/Linux/2013-06/86347.htm

Hadoop集群安装&HBase实验碰到搭建 http://www.linuxidc.com/Linux/2013-04/83560.htm

依赖Hadoop集群的HBase集群的安排 http://www.linuxidc.com/Linux/2013-03/80815.htm‘

Hadoop安装配置笔记之-HBase完全分布情势安装 http://www.linuxidc.com/Linux/2012-12/76947.htm

单机版搭建HBase情形图像和文字化教育程详细明白 http://www.linuxidc.com/Linux/2012-10/72959.htm

HBase 的详实介绍:请点这里
HBase 的下载地址:请点这里

本文永远更新链接地址:http://www.linuxidc.com/Linux/2016-10/135865.htm

图片 3

本文由计算机操作发布,转载请注明来源:HBase的伪分布式安装