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 ...
随机推荐
- iOS中html打开APP传参
1.在项目info.plist中添加URL Types以供html调用 2.html代码 <html> <head lang="en"> <meta ...
- 多个Activity跳转的小结
第一个例子:demo1 Main—>SecondActivity—>Main 从流程上看就是从Main跳转到SecondActivity,再从SecondActivity返回到Main.也 ...
- 云服务器:西部数码VS阿里云
公司因为业务的需要,申请了两个云服务器.一个是西部数码的,一个是阿里云香港的.其中西部数码的配置高一些,一年4500元左右:香港的则便宜些,一年2200左右.因为备案问题,主业务放在成都的西部数码服务 ...
- DCGAN增强图片数据集
DCGAN增强图片数据集 1.Dependencies Python 3.6+ PyTorch 0.4.0 numpy 1.14.1, matplotlib 2.2.2, scipy 1.1.0 im ...
- POJ 2823 滑动窗口 单调队列模板
我们从最简单的问题开始: 给定一个长度为N的整数数列a(i),i=0,1,...,N-1和窗长度k. 要求: f(i) = max{a(i-k+1),a(i-k+2),..., a(i)},i = 0 ...
- python中excel表格的读写
#!usr/bin/env python #-*- coding:utf-8 -*- import xlrd import xlwt from xlutils.copy import copy imp ...
- GNS3 模拟icmp分片不可达
R1 : conf t int f0/0 no shutdown ip add 192.168.1.1 255.255.255.0 no ip routing end R2 f0/0: conf t ...
- Ubuntu上安装tftp服务
1. 安装 sudo apt install tftpd-hpa 2.设置工作目录 mkdir ~/tftpdroot tftpdroot 3.修改配置文件 sudo vi /etc/default/ ...
- 工具类css框架
@charset "UTF-8"; * { -webkit-box-sizing: border-box; box-sizing: border-box; ...
- eclipse启动tomcat访问localhost:8080报404
直接双击tomcat\bin目录下面的startup.bat启动 是没问题 的 但是eclipse启动tomcat访问localhost:8080报404 解决方案如下: 双击红色圈里面的tomcat ...