(洋文不好,压根儿看不太明白官方文档啥意思)
1. 要在单机下搭建群集,简单的就是分别解压复制N个目录。
2. 每个目录,分配配置对应的data 和 myid ,其中myid 用来表明当前启动是哪个zookeeper
3. 配置文件的群集属性
server.1=127.0.0.1:2881:3881
server.2=127.0.0.1:2882:3883
server.3=127.0.0.1:2883:3883
server.4=127.0.0.1:2884:3884
server.5=127.0.0.1:2885:3885
4. (我被坑的地方)每个zookeeper 服务有三个端口,clientPort=2181,这个用于指明给客户端应用连接的端
(例如java 程序访问就是这个端口)
server.1=127.0.0.1:2881:3881 ,其中2881 用于群集间的服务器进行数据通讯,3881 用于群集刚启动时
或leader 当机时 进行选举。
完整的配置文件(单机环境,5个实例的端口都要不一样)
# 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.
dataDir=D:/data/zookeeper/server5/data
# the port at which the clients will connect
clientPort=2185
#
# 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
server.1=127.0.0.1:2881:3881
server.2=127.0.0.1:2882:3883
server.3=127.0.0.1:2883:3883
server.4=127.0.0.1:2884:3884
server.5=127.0.0.1:2885:3885
附上完整的配置文件 https://swtools.googlecode.com/git/linux/zookeeper/zookeeper.zip
分享到:
相关推荐
里面包含关于zookeeper学习需要的软件,如:zookeeper-3.4.5.tar.gz、zookeeper-3.4.5.jar、zkclient-0.1.jar、curator-client-2.4.2等相关jar包
文件名 : ZooInspector.rar 文件夹名: zookeeper 文件名 : zookeeper-3.4.5.tar.gz 文件名 : ZooKeeper典型应用场景.pdf 文件名 : zookeeper文档.pdf 文件名 : zookeeper课上...文件名 : zookeepr资料及代码.7z
zookeeper的使用说明和应用场景
zookeeper源码,包含java和C
动物园管理员
zookeeper官方的最新版,截止到2018年4月22日,最近两年都没啥问题
14. Nacos加载那些配置,这些配置的优先级? 15. Nacos配置中⼼宕机了,会影响服务吗? 16. 配置中⼼的技术选型 17. 为什么Feign第⼀次调⽤耗时很⻓? 18. Feign怎样实现认证的传递? 19. Feign底层默认使⽤...
kafka在centos7上搭建过程,包括jdk配置,环境变量配置,zookeepr搭建,以及使用springboot集成kafka的小demo用例
简介zkui它提供了一个管理界面,可以针对zookeepr的节点值进行CRUD操作,同时也提供了安全认证。
zookeeper连接工具,可视化数据查看
安装zookeepr,kafka和Spark: 在$ HOME / Software目录下 启动zookeepr,kafka和Spark: bin / startAllServers.sh 停止zookeepr,kafka和Spark: bin / stopAllServers.sh 下载并编译并运行: 在$ HOME / ...
包含阿里分布式开源框架dubbo视频详解,dubbo工具包,源码分析,zookeepr视频,mycat介绍
Demo地址:...由于嫌麻烦 依赖基本都放到模块外部的project pom里了, 大家可以选择导入相应的子模块。 consumer pom.xml DubboDemo02 ... 1.0-SNAPSHOT 4.0.0 user-consumer ...provider pom.xml
ZooKeeper 未授权访问漏洞处理方法和重设setAcl,需要设置超级管理密码后,方可修改
Apache Ambari是一种基于Web的工具,支持Apache Hadoop集群的供应、管理和监控。Ambari已支持大多数Hadoop组件,包括HDFS、MapReduce、Hive、Pig、 Hbase、Zookeeper、Sqoop和Hcatalog等。 Apache Ambari 支持HDFS...