下载安装包

wget http://www.apache.dataguru.cn/zookeeper/stable/zookeeper-3.4.6.tar.gz

解压

tar xzvf zookeeper-3.4.6.tar.gz

重命名

mv zookeeper-3.4.6 zookeeper

配置java环境

yum -y list java*
yum -y install java-1.7.0-openjdk*

复制配置文件

cd zookeeper/conf/

cp zoo_sample.cfg  zoo.cfg

修改配置文件

# 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=/var/zookeeper

# 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.1=192.168.204.137:2888:3888

server.2=192.168.204.138:2888:3888

server.3=192.168.204.139:2888:3888

复制配置文件到其他服务器

scp zoo.cfg 
root@192.168.204.138:/opt/zookeeper/conf

新建/var/zookeeper/myid

值为id    1/2/3

启动

/opt/zookeeper/bin/zkServer.sh start

伪集群

CentOs7&zookeeper的更多相关文章

  1. Centos7 ZooKeeper 安装过程

    www.apache.org/dist/上可以下载Hadoop整个生态环境的组件,我下的Zookeeper3.4.6版本 我一般都是在一个虚拟机上将一.二步都做完,然后克隆出来,再到克隆出来的虚拟机上 ...

  2. Centos7 Zookeeper

    本文版权归博客园和作者吴双本人共同所有 转载和爬虫请注明原文地址 www.cnblogs.com/tdws 一.写在前面 ZK是一个高效的分布式协调服务,高可用的分布式管理协调框架. 朋友推荐一本书& ...

  3. Centos7 zookeeper单机/集群安装详解和开机自启

    ZooKeeper是一个分布式的,开放源码的分布式应用程序协调服务,是Google的Chubby一个开源的实现,是Hadoop和Hbase的重要组件.它是一个为分布式应用提供一致性服务的软件,提供的功 ...

  4. Centos7 Zookeeper 集群安装

    1:安装java 环境 -openjdk* 2:zookeeper 安装 (官网 http://www.apache.org/dyn/closer.cgi/zookeeper/) 2.1 目录创建 自 ...

  5. Linux centos7 zookeeper集群搭建

    Zookeeper集群搭建 描述:本章节主要单服务器搭建集群,在一个服务器上启动多个不同端口的zookeeper服务,非真实环境. 真实环境下zookeeper集群会搭建在多个物理服务器上,并非单一的 ...

  6. CentOS7 Zookeeper 安装

    集群部署 192.168.38.6  zk01192.168.38.7  zk02192.168.38.8  zk03 安装zookeeper,必须安装jdk. 1.下载 $ cd /usr/loca ...

  7. centos7 zookeeper集群的搭建

    说明:该集群的搭建是为了服务于solr集群,请参考我的关于solr集群搭建的博客. 1.创建solr-cloud目录 mkdir /usr/local/solr-cloud 2.将解压的apache- ...

  8. Centos7:zookeeper安装,配置与使用

    配置jdk环境 解压缩zookeeper的压缩包 配置 创建data目录 复制zoo_sample.cfg为zoo.cfg 修改confg/zoo.cfg中dataDir=**/data 常用命令 . ...

  9. Linux系统:centos7下搭建ZooKeeper3.4中间件,常用命令总结

    本文源码:GitHub·点这里 || GitEE·点这里 一.下载解压 1.Zookeeper简介 Zookeeper 作为一个分布式的服务框架,主要用来解决分布式集群中应用系统的一致性问题,它能提供 ...

随机推荐

  1. ptrace x64 转

    #include <sys/ptrace.h> #include <sys/types.h> #include <sys/wait.h> #include < ...

  2. Ruby on Rails Tutorial 第一章 之 搭建开发环境

    云端开发环境,Cloud9(https://ide.c9.io/).这个开发环境预先安装好了Rails开发所需要的大多数软件,包括Ruby.RubyGems和Git,需要自己安装Rails. 1.安装 ...

  3. Helpers\Hooks

    Helpers\Hooks Add modules with hooks The hooks helper allows modules to be created within the module ...

  4. 阅读uboot

    下面是一个执行make XXX_config后的打印信息: pengdl@debian:~/work/costdown/new/Hi3520D_SDK_V1.0.2.2c/source/arm11/u ...

  5. 使用JS制作一个鼠标可拖的DIV(一)——鼠标拖动

    使用 JS 来实现一个可拖动的DIV,主要是使用到以下几个事件: 1.鼠标按下:DIV元素的onmousedown. 2.鼠标按住拖动:document 的 onmousemove 元素. 3.鼠标放 ...

  6. SQL Server select into/bulkcopy用法

    select into/bulkcopy用法 一.背景 如何提升批量插入效率,各位看官,瞧好了! exec sys.sp_dboption '数据库名','select into/bulkcopy', ...

  7. Spring 循环引用(singleton与prototype初始化的区别)

    原文链接请参见:http://blog.csdn.net/u010723709/article/details/47185959

  8. 关于类型“LinkButton”的控件“xxx”必须放在具有 runat=server 的窗体标记内问题的解决方案

    1.首先确认LinkButton控件包含在Form中,检查该Form有无runat标记,如果有,排除Form原因,请继续看. 2.如果看到这里,估计你是在做Excel导出功能.在后台代码中重写Veri ...

  9. 在Ubuntu下配置Apache多域名服务器

    1. 目标: 在本机 实现访问不同域名 可以访问不同的目录. 即:访问a.com 进入 /var/www/a 目录下的程序,访问b.com 进入/var/www/b目录下的程序. 2.遇到的问题: / ...

  10. linux/centos下安装nginx(rpm安装和源码安装)详细步骤

    Centos下安装nginx rpm包                                                                                 ...