美文网首页我爱编程
分布式协调框架zookeeper分布式部署

分布式协调框架zookeeper分布式部署

作者: 紫苓 | 来源:发表于2018-06-21 21:48 被阅读32次
1、首先是到http://zookeeper.apache.org/releases.html官网下载安装包,这里下载的版本为3.4.12
2、解压到相应的目录
3、在zookeeper文件夹下新建zookeeper存放数据的目录
mkdid -p data/zkdata

创建好后整个文件路径如下:

[T2YZL3SVW984C%T9_R2]GD.png
4、重命名conf下的zoo-sample.cfg为zoo.cfg
5、修改zoo.cfg,主要配置数据存放路径和znode所在服务器
# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial 
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between 
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just 
# example sakes.
###############1、配置zookeeper数据存放位置#############
dataDir=/home/luozheng/tools/zookeeper-3.4.12/data/zkdata
# the port at which the clients will connect
clientPort=2181
###############2、分布式集群添加节点####################
server.1=luozheng.bigdata:2888:3888
server.2=luozheng.bigdata1:2888:3888
server.3=luozheng.bigdata2:2888:3888
######################################################
# the maximum number of client connections.
# increase this if you need to handle more clients
#maxClientCnxns=60
#
# Be sure to read the maintenance section of the 
# administrator guide before turning on autopurge.
#
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=3
# Purge task interval in hours
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1
6、在zookeeper文件夹下新建myid文件,里面写入1,对应zoo.cfg中server.1中的1
7、zookeeper同步到其他服务器
scp -r zookeeper-3.4.12/ luozheng@luozheng.bigdata1:~/tools/
scp -r zookeeper-3.4.12/ luozheng@luozheng.bigdata2:~/tools/
image.png image.png
8、分别修改其他两个节点myid文件中的值
9、zookeeper服务启动,这个要每台服务器都要运行启动命令
bin/zkServer.sh start
image.png
image.png
image.png

相关文章

  • zookeeper(分布式协调框架) ——01入门

    zookeeper(分布式协调框架)简介与集群搭建 ZooKeeper 的由来: Zookeeper最...

  • 一文了解Zookeeper

    Zookeeper是Apache开源的一个分布式框架,它主要为分布式应用提供协调服务。 Zookeeper主要负责...

  • Zookeeper简介

    Zookeeper概述 Zookeeper是一个开源的,分布式的,为分布式框架提供协调服务的Apache项目。 分...

  • Zookeeper 简介

    Zookeeper 简介 Zookeeper是什么? Zookeeper 是一个分布式协调服务的开源框架。 主要⽤...

  • 基于 ZooKeeper 实现爬虫集群的监控

    ZooKeeper ZooKeeper 是一个开源的分布式协调服务,ZooKeeper框架最初是在“Yahoo!"...

  • 搭建zookeeper集群

    Zookeeper是一个高性能,分布式的,开源分布式应用协调服务 。Zookeeper 有三种部署模式: 1. 单...

  • 大数据 - (六-1)- Zookeeper

    Zookeeper简介 Zookeeper是什么? Zookeeper是一个分布式协调服务的开源框架。 主要⽤用来...

  • ZooKeeper 简介

    ZooKeeper: 分布式应用的分布式协调服务 ZooKeeper 是一个用于分布式应用的分布式、开源的协调服务...

  • zookeeper

    ZooKeeper:分布式应用程序的分布式协调服务 ZooKeeper是面向分布式应用程序的分布式开源协调服务。它...

  • 二、ZooKeeper 概述

    ZooKeeper: 分布式应用的分布式协调服务 ZooKeeper是一个分布式应用下的分布式、开源的协调服务。分...

网友评论

    本文标题:分布式协调框架zookeeper分布式部署

    本文链接:https://www.haomeiwen.com/subject/ltlfyftx.html