下载安装包

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. IDispatch接口 - GetIDsOfNames和Invoke(转)

    IDispatch接口是COM自动化的核心.其实,IDispatch这个接口本身也很简单,只有4个方法: IDispatch : public IUnknown { public: virtual H ...

  2. HOW MYSQL USES INTERNAL TEMPORARY TABLES

    HOW MYSQL USES INTERNAL TEMPORARY TABLES Table of Contents [hide] 1)UNION queries 2)Some views 3)SQL ...

  3. Playing with ptrace, Part I

    X86_64 的 Redhat / Centos / Scientific 下面,若要编译.运行32位程序,需要安装以下包: yum install libgcc.i686 yum install g ...

  4. Redis 客户端连接

      Redis 通过监听一个 TCP 端口或者 Unix socket 的方式来接收来自客户端的连接,当一个连接建立后,Redis 内部会进行以下一些操作: 首先,客户端 socket 会被设置为非阻 ...

  5. A - Robot Bicorn Attack

    Description Vasya plays Robot Bicorn Attack. The game consists of three rounds. For each one a non-n ...

  6. Java中 return 和finally

    1. 最简单的情形 public void main(){ String s = test(); System.out.println("s=[" + s + "]&qu ...

  7. hibernate 查询

                String hql = "select * from Commodity where commodityName like :commodityname" ...

  8. python(3)-函数动态参数

    先来看一段代码 def show(*arg): print(arg, type(arg)) if __name__ == "__main__": show(1) show(1,2, ...

  9. Eclipse 中引用其他项目及项目打包

    1.建立工程project1; 2.建立class文件ClassA: package com.test; public class ClassA{ public static String getCl ...

  10. JavaScript基础笔记一

    一.真假判断 真的:true.非零数字.非空字符串.非空对象 假的:false.数字零.空字符串.空对象.undefined 例: if(0){ alert(1) }else{ alert(2) } ...