下载安装包

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. 谷歌chrome浏览器桌面提醒 webkitNotifications

    原创: //点击时开启提醒 $(".message_alert").toggle(function(){ $(".message_alert_tip").htm ...

  2. MySQL中的WITH ROLLUP

    MySQL中的WITH ROLLUP MySQL的扩展SQL中有一个非常有意思的应用WITH ROLLUP,在分组的统计数据的基础上再进行相同的统计(SUM,AVG,COUNT…),非常类似于Orac ...

  3. jq层次选择器

    二. 层次选择器 1. parent > child(直系子元素) $(document).ready(function () { // 选取div下的第一代span元素,将字体颜色设为红色 $ ...

  4. WdatePicker时间控件联动选择

    $("#txtStartTime").bind("click focus", function () { var endtimeTf = $dp.$('txtE ...

  5. cvSaveImage的第三个参数

    http://stackoverflow.com/questions/801054/opencv-cvsaveimage-jpeg-compression-factor   #define CV_IM ...

  6. hdu 1170 Balloon Comes!

    Balloon Comes! Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)To ...

  7. Android drawable xml 各种小知识

    摘抄自网络. 圆角或者各种变种背景, <?xml version="1.0" encoding="utf-8"?> <shape xmlns: ...

  8. 如何用代码开启“个人热点”功能?如何用代码把iOS设备设置成一个无线路由?

    不好意思,你办不到.苹果不允许.因为你没有权限.

  9. DOS批处理命令-引数取得

    参数传递对程序来说,是一个很重要的事情,所以,获得传递的参数是很重要的,接下来,我们来探讨下获得传递的参数的N种方式. 1.%N  获得传递的第N个参数(N最大为9) 就是传递过去的参数原样值(并且忽 ...

  10. AngularJS 学习随笔(一)

    AngularJS 初始化加载流程: 1:浏览器载入HTML,然后把它解析成DOM 2:浏览器载入Angular.JS 脚本 3:AngularJS 等到DOMContentLoaded时间触发 4: ...