Zookeeper--复制模式安装
参考:
https://www.cnblogs.com/lsdb/p/7297731.html
https://zookeeper.apache.org/doc/r3.4.13/zookeeperStarted.html#sc_RunningReplicatedZooKeeper
前提
JDK 6及其以上
安装
下载安装文件并上传到各目标机器
将下载好的 zookeeper-x.x.x.tar.gz 分别上传到目标机器,如 /usr/local/src ,当前下载的版本为3.4.9
我的目标机器

在各目标机器分别解压

在各目标机器创建软连接

在各目标机器创建配置文件

写入各目标机器的myid

(分别写入不同的myid, myid中的内容对应相关的server.x,即写入相应的ip的server的x值.如:192.168.10.130的myid配置成3)
打开各目标机器相应端口

分别启动

查看状态

相关配置解释(官方链接)
initLimit
initLimit is timeouts ZooKeeper uses to limit the length of time the ZooKeeper servers in quorum have to connect to a leader.
syncLimit
syncLimit limits how far out of date a server can be from a leader.
tickTime
the basic time unit in milliseconds used by ZooKeeper.(In this example, the timeout for initLimit is 5 ticks at 2000 milleseconds a tick, or 10 seconds. => initLimit timeout = initLimit * tickTime)
server.x=ip:port1:port2
Finally, note the two port numbers after each server name: " 2888" and "3888". Peers use the former port to connect to other peers. Such a connection is necessary so that peers can communicate, for example, to agree upon the order of updates. More specifically, a ZooKeeper server uses this port to connect followers to the leader. When a new leader arises, a follower opens a TCP connection to the leader using this port. Because the default leader election also uses TCP, we currently require another port for leader election. This is the second port in the server entry.
dataLogDir
The dataLogDir parameters indicates a different directory to use for the transaction logs.
myid
The entries of the form server.X list the servers that make up the ZooKeeper service. When the server starts up, it knows which server it is by looking for the file myid in the data directory. That file has the contains the server number, in ASCII.
在一台机器上部署复制模式的zookeeper(人们口中的伪集群)
If you want to test multiple servers on a single machine, specify the servername as localhost with unique quorum & leader election ports (i.e. 2888:3888, 2889:3889, 2890:3890 in the example above) for each server.X in that server's config file. Of course separate dataDirs and distinct clientPorts are also necessary (in the above replicated example, running on a single localhost, you would still have three config files).
Please be aware that setting up multiple servers on a single machine will not create any redundancy. If something were to happen which caused the machine to die, all of the zookeeper servers would be offline. Full redundancy requires that each server have its own machine. It must be a completely separate physical server. Multiple virtual machines on the same physical host are still vulnerable to the complete failure of that host.
Zookeeper--复制模式安装的更多相关文章
- 决战大数据之三-Apache ZooKeeper Standalone及复制模式安装及测试
决战大数据之三-Apache ZooKeeper Standalone及复制模式安装及测试 [TOC] Apache ZooKeeper 单机模式安装 创建hadoop用户&赋予sudo权限, ...
- zookeeper单机模式安装
zookeeper单机模式安装 更多文章:http://blogxinxiucan.sh1.newtouch.com/2017/07/26/zookeeper单机模式安装/ 下载zookeeper u ...
- Zookeeper本地模式安装
本地模式安装部署 1.安装前准备 (1)安装Jdk (2)拷贝Zookeeper安装包到Linux系统下 (3)解压到指定目录 tar -zxvf zookeeper-3.4.10.tar.gz -C ...
- Zookeeper安装,Zookeeper单机模式安装
http://zookeeper.apache.org/releases.html#download 下载解压到(我自己的)解压到 /usr/local 下 把名字改成 zookeeper 进入zoo ...
- zookeeper集群安装(转)
转载地址:http://www.blogjava.net/hello-yun/archive/2012/05/03/377250.html 本方法,本人亲自试验,可以成功. ZooKeeper是一个分 ...
- 8.3.ZooKeeper集群安装配置
1.Zookeeper的搭建方式 Zookeeper安装方式有三种,单机模式和集群模式以及伪集群模式. 单机模式:Zookeeper只运行在一台服务器上,适合测试环境: 伪集群模式:就是在一台物理机上 ...
- zookeeper三种模式安装详解(centos 7+zookeeper-3.4.9)
zookeeper有单机.伪集群.集群三种部署方式,可根据自己实际情况选择合适的部署方式.下边对这三种部署方式逐一进行讲解. 一 单机模式 1.下载 进入要下载的版本的目录,选择.tar.gz文件下载 ...
- window安装配置 zookeeper 单机模式
1.zookeeper简单介绍 zookeeper是一个分布式的,开放源码的分布式应用程序协调服务,我所了解到的主要的使用场景有两个 (1).微服务注册中心(Dubbo较常用Zookeeper做注册中 ...
- Zookeeper第一课 安装和配置
简介: Zookeeper,是Google的Chubby一个开源的实现,是Hadoop的分布式协调服务,它包含一个简单的原语集,来实现同步.配置维护.分集群.命名的服务. zookeeper是一个由多 ...
- HBase单机模式安装
第一部分 安装前准备 1.安装hadoop 今天刚刚学了hbase的一点基础,准备安装Hbase实际操练一下.因为安装hbase的前提条件是已经成功安装了hadoop,而且hadoop的版本要和hba ...
随机推荐
- 读《Adaptive Thresholding Using the Integral Image》自适应图像阈值
图像的二值化问题总是一个问题.虽然使用深度学习的方法取得了不小的进展,但是传统的方法还是值得借鉴. 刚好随机游走到这篇文章 挖个07年的坟 地址:http://people.scs.carleton ...
- 使用 esxcli storage vmfs unmap 命令在精简置备的 LUN 上回收 VMFS 删除的块
官方原文链接: https://kb.vmware.com/s/article/2057513?lang=zh_CN 本文介绍如何通过运行 esxcli storage vmfs unmap 命令回收 ...
- OBU设备非接触式读卡方案:SI522
传统收费站将成历史!全部转为ETC系统 当高速人工收费已经成为我们驾驶出行的习惯后,我们发现,高速人工收费带来低效率.长等待以及落后性等缺点逐渐给人们出行带来不便.伴随着我国汽车保有量的逐年递增,高速 ...
- springboot官网->pom.xml文件
springboot 2.1.6 pom.xml
- 剑指offer 把字符串转化为整数
题目描述 将一个字符串转换成一个整数,要求不能使用字符串转换整数的库函数. 数值为0或者字符串不是一个合法的数值则返回0 输入描述: 输入一个字符串,包括数字字母符号,可以为空 输出描述: 如果是合法 ...
- 微信access_token设计的原理解析
1.access_token是加密的字符串,其目的是为了接口安全考虑,不然随便就能调用微信服务器的接口会有很大风险. 2.用户在公众号中填写的Token就相当于本项目中的xiaoming,是签名验证中 ...
- POJ1723 SOLDIERS 兄弟连
SOLDIERS 有一个性质:在一个长为n的序列a中找一个数 \(a_k\) 使得 \(\sum\limits_{i=1}^n abs(a_i-a_k)\) 最小,则 \(a_k\) 是a的中位数. ...
- 操作数据库的SqlHelper类
public static class SqlHelper { public static readonly string connstr = ConfigurationManager.Connect ...
- mapper.xml实现oracle的分页语句
当我们用常规方法进行分页查询时,虽然在数据库可以分页查询出来数据, 如下语句 <!-- 分页查询所有 --> <select id="findAllPage" r ...
- PHP页面跳转以及伪登录实例
PHP页面跳转一.header()函数header()函数是PHP中进行页面跳转的一种十分简单的方法.header()函数的主要功能是将HTTP协议标头(header)输出到浏览器. header() ...