Home > Database > Mysql Tutorial > Zookeeper 3.4.6在Hadoop 2.2.0的安装

Zookeeper 3.4.6在Hadoop 2.2.0的安装

WBOY
Release: 2016-06-07 15:33:07
Original
1031 people have browsed it

1.环境配置 本次集群有三台节点 Master : hpd1 Slave:hdp2,hdp3 OS:CentOS6.5 2.下载 Zookeeper3.4.6 Zookeeper3.4.6 下载地址: http://mirrors.cnnic.cn/apache/zookeeper/zookeeper-3.4.6/ 3.解压安装 $tar-zxvfzookeeper-3.4.6.tar.gz 4.配置 设置环境

1.环境配置

本次集群有三台节点

Masterhpd1

Slave:hdp2,hdp3

OS:CentOS 6.5

2.下载Zookeeper 3.4.6

Zookeeper 3.4.6下载地址:http://mirrors.cnnic.cn/apache/zookeeper/zookeeper-3.4.6/

3.解压安装

$tar -zxvf zookeeper-3.4.6.tar.gz

4.配置

设置环境变量

vim /etc/profile

export ZOOKEEPER_HOME=”具体目录”

export PATH=$PATH:$ZOOKEEPER_HOME/bin

关闭profile文件:执行source /etc/profile

集群部署

进入zookeeper-3.4.6/conf

 Zookeeper 3.4.6在Hadoop 2.2.0的安装

Zookeeper 3.4.6在Hadoop 2.2.0的安装

 

在上面的配置文件中"server.id=host:port:port"中的第一个port是从机器(follower)连接到主机器(leader)的端口号,第二个port是进行leadership选举的端口号。

接着在dataDir指定的目录下创建一个myid的文件,并且写上一行(有且只有一行),为本机对应的id值,如上图中server.1=hdp1:2888:3888那么在hdp1机器中德myid写入1,同理hdpn的机器中的myid上写入n.

远程复制分发安装文件

将上面的的安装文件拷贝到集群中的其他机器上对应的目录下:

scp -r zookeeper/ hdp2:/home/shenlong/distribution/

scp -r zookeeper/ hdp3:/home/shenlong/distribution/

修改对应节点上的myid

5.启动Zookeeper集群

Zookeeper集群的每个节点上,执行启动

$zkServer.sh start

Zookeeper 3.4.6在Hadoop 2.2.0的安装

其中QuorumPeerMain就是zookeeper进程,启动正常。

 

6.停止进程

zkServer.sh stop

Zookeeper安装完成!

 

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template