下载

http://mirror.bit.edu.cn/apache/zookeeper/

校验

解压后得到zookeeper-3.4.10.jar,使用md5sum zookeeper-3.4.10.jar 得到

450dbad05d829607bc45b9ccad789890  zookeeper-3.4.10.jar

与zookeeper-3.4.10.jar.md5中的内容比较

集群部署,我搞了三台虚拟机,每台2G内存,IP分别为192.168.56.101/104/103 以server0为例

zookeeper@wangx-VirtualBox:~/server0/zookeeper/conf$ cp zoo_sample.cfg zoo.cfg

新建data文件夹

zookeeper@wangx-VirtualBox:~/server0/zookeeper$ mkdir data

zookeeper@wangx-VirtualBox:~/server0/zookeeper$ mkdir logs

新建myid文件,里面写入该server的序号

zookeeper@wangx-VirtualBox:~/server0/zookeeper/data$ echo "" >myid

server0 该文件内容为

# 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=/home/zookeeper/zookeeper-3.4.10/dataDir
# the port at which the clients will connect
clientPort=2181
# 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
server.0=192.168.56.101:2888:3888
server.1=192.168.56.104:2888:3888
server.2=192.168.56.103:2888:3888

进入server0/zookeeper/bin ,开始启动

zkServer.sh start

查看运行状态,通常都是失败

然后命令行开启两个client

./zkCli.sh -server 192.168.56.104:2181

./zkCli.sh -server 192.168.56.101:2181

然后在第一个客户端里创建一个节点, 然后在第二个客户端里就能看到这个节点了,说明集群搭建成功

zookeeper 学习 zookeeper下载部署的更多相关文章

  1. 【转】Zookeeper学习---zookeeper 选举机制介绍

    [原文]https://www.toutiao.com/i6593162565872779784/ zookeeper集群 配置多个实例共同构成一个集群对外提供服务以达到水平扩展的目的,每个服务器上的 ...

  2. 2019-4-8 zookeeper学习笔记

    zookeeper学习 ZooKeeper集合中的节点 让我们分析在ZooKeeper集合中拥有不同数量的节点的效果. 如果我们有单个节点,则当该节点故障时,ZooKeeper集合将故障.它有助于“单 ...

  3. (转)ZooKeeper 笔记(1) 安装部署及hello world

    ZooKeeper 笔记(1) 安装部署及hello world   先给一堆学习文档,方便以后查看 官网文档地址大全: OverView(概述) http://zookeeper.apache.or ...

  4. 161209、简要分析ZooKeeper基本原理及安装部署

    一.ZooKeeper 基本概念 1.ZooKeeper 是什么? Zookeeper官网地址: http://zookeeper.apache.org/ Zookeeper官网文档地址:http:/ ...

  5. zookeeper学习(上)

    zookeeper学习(上) 在前面的文章里我多次提到zookeeper对于分布式系统开发的重要性,因此对zookeeper的学习是非常必要的.本篇博文主要是讲解zookeeper的安装和zookee ...

  6. ZooKeeper 学习笔记

    ZooKeeper学习笔记 1.   zookeeper基本概念 zookeeper是一个分布式的,开放源码的分布式应用程序协调服务,是hadoop和Habase的重要组件,是为分布式应用提供一致性服 ...

  7. zookeeper的安装与部署-伪集群

    1.Zookeeper的下载与解压     通过后面的链接下载Zookeeper:    Zookeeper下载在此我们下载zookeeper-3.4.5下载后解压至安装目录下,本文我们解压到目录:/ ...

  8. zookeeper的安装与部署-集群

    1.Zookeeper的下载与解压     通过后面的链接下载Zookeeper:    Zookeeper下载在此我们下载zookeeper-3.4.5下载后解压至安装目录下,本文我们解压到目录:/ ...

  9. 【分布式】ZooKeeper学习之一:安装及命令行使用

    ZooKeeper学习之一:安装及命令行使用 一直都想着好好学一学分布式系统,但是这拖延症晚期也是没得治了,所以干脆强迫自己来写一个系列博客,从zk的安装使用.客户端调用.涉及到的分布式原理.选举过程 ...

随机推荐

  1. Linux 文件系统IO性能优化【转】

    转自:https://blog.csdn.net/doitsjz/article/details/50837569 对于LINUX SA来说,服务器性能是需要我们特别关注的,包括CPU.IO.内存等等 ...

  2. Webpack2 中的 NamedModulesPlugin 与 HashedModuleIdsPlugin

    要讨论Webpack 2中新增的这两个plugin的功能,还要先从使用Webpack打包的项目的前端资源缓存方案说起. 通常在使用了Webpack的项目中我们会使用CommonsChunkPlugin ...

  3. linux系统弱密码检测

    需要自备弱密码明文字典 from _utils.patrol2 import data_format,report_format,run_cmd import platform import cryp ...

  4. centos6.8配置php-fpm(php已在apache中以模块形式运行,nginx中同时以fastcgi运行)

    location ~ \.php(.*)$ { root /mnt/www/wenyin; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; ...

  5. Openssl与私有CA搭建

    转自:http://www.tuicool.com/articles/aURnim 随着网络技术的发展.internet的全球化,信息共享程度被进一步提高,各种基于互联网的应用如电子政务.电子商务日益 ...

  6. 利用表格分页显示数据的js组件bootstrap datatable的使用

    前面展示了datatable的简单使用,还可以通过bootstrap结合datatable来使用,这样可以进一步美化datatable插件 <!DOCTYPE html> <html ...

  7. Light OJ 1116

    基础数学:.. #include<bits/stdc++.h> using namespace std; typedef unsigned long long ULL; int main( ...

  8. js浏览器判断函数

    function userBrowser(){ var browserName=navigator.userAgent.toLowerCase(); if(/msie/i.test(browserNa ...

  9. python-时间模块,random、os、sys、shutil、json和pickle模块

    一.time与datetime模块 time模块: 时间戳:表示的是从1970年1月1日00:00:00开始按秒计算的偏移量,返回类型为float类型 格式化时间字符串(Format String) ...

  10. python字符串,列表常用操作

    24天养成一个好习惯,第五天! 一.字符串需要掌握的操作 1.取值(索引取值)需要注意的是只能取,不能改 msg = 'hello world' print(msg[4]) 2.切片(顾头不顾尾) m ...