1.下载上传文件到centos中

2.解压文件夹

3.cd conf 文件下,cp  zoo_sample.cfg  zoo.cfg

4.vim 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=/opt/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.121.131:2888:3888
server.2=192.168.121.129:2888:3888

设置文件如上所示:

ip地址也可以用主机名代替

5.创建myid文件,在/opt/zookeeper 文件夹下 创建myid  运行命令  touch myid   ,   然后写入数字   echo 1 >myid

6.在192.168.121.129 中也如192.168.121.131相关的操作

7.关掉防火墙,或者打开相应的端口

8.cd 到  bin 目录下

9.启动server.1 然后启动 server.2 ,./zkServer.sh start

10.过一段时间运行./zkServer.sh status  查看状态如果显示下面的信息则表示成功

[root@fymold bin]# ./zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /home/fuyuanming/zookeeper-3.4.8/bin/../conf/zoo.cfg
Mode: leader

或者:

[root@fymnew bin]# ./zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /home/fuyuanming/zookeeper-3.4.8/bin/../conf/zoo.cfg
Mode: follower

表示成功

centos7 安装zookeeper3.4.8集群的更多相关文章

  1. centos7安装zookeeper3.4.12集群

    zookeeper的三要素: 1.一致,能够保证数据的一致性 2.有头,始终有一个leader,node/2+1个节点有效,就能正常工作 3.数据树,树状结构且每个树必须有数据 1. 环境准备 操作系 ...

  2. centos7安装zookeeper3.4.9集群

    本篇文章目的:以最小成本学习zookeeper的集群安装. zookeeper的三要素: 1.一致,能够保证数据的一致性 2.有头,始终有一个leader,node/2+1个节点有效,就能正常工作 3 ...

  3. centos7安装redis-4.0.1集群

    试验机操作系统:CentOS Linux release 7.2.1511 (Core) 本文的目的是教会大家快速搭建redis集群,完了再深入学习. 试问如果不上手试验,看的资料再多有个毛用? 下载 ...

  4. centos7安装elasticsearch6.3.x集群并破解安装x-pack

    一.环境信息及安装前准备 主机角色(内存不要小于1G): 软件及版本(百度网盘链接地址和密码:链接: https://pan.baidu.com/s/17bYc8MRw54GWCQCXR6pKjg 提 ...

  5. CentOS7 安装kylin2.6.0集群

    1. 环境准备 zookeeper3.4.12 mysql5.7 hive2.3.4 hadoop2.7.3 JDK1.8 hbase1.3.3 2. 集群规划 ip地址 机器名 角色 192.168 ...

  6. centos7安装redis3.2.5集群

    安装参照     https://blog.csdn.net/mingliangniwo/article/details/54600640  https://blog.csdn.net/u013820 ...

  7. Centos7安装升级Ruby和集群搭建参考

    安装升级Ruby参考:https://blog.csdn.net/qq_26440803/article/details/82717244 集群搭建参考:https://www.cnblogs.com ...

  8. Centos7 安装部署Kubernetes(k8s)集群

    目录 一.系统环境 二.前言 三.Kubernetes 3.1 概述 3.2 Kubernetes 组件 3.2.1 控制平面组件 3.2.2 Node组件 四.安装部署Kubernetes集群 4. ...

  9. centos7安装hadoop完全分布式集群

    groupadd test             //新建test工作组 useradd -g test phpq        //新建phpq用户并增加到test工作组 userdel 选项 用 ...

随机推荐

  1. Asp.net Core中使用Redis 来保存Session, 读取配置文件

    今天 无意看到Asp.net Core中使用Session ,首先要使用Session就必须添加Microsoft.AspNetCore.Session包,默认Session是只能存去字节,所以如果你 ...

  2. VC++网络安全编程范例(11)-SSL高级加密网络通信(转)

    SSL(Secure Sockets Layer 安全套接层),及其继任者传输层安全(Transport Layer Security,TLS)是为网络通信提供安全及数据完整性的一种安全协议.TLS与 ...

  3. eclipse-修改启动JDK版本

    打开eclipse安装目录下的eclipse.ini文件,将红色内容加入 -vm ../Java/jdk1.6.0_26/bin (或者指向具体目录:D:/software/jdk_1.8u91/bi ...

  4. 小程序canvas的一个坑

    很奇怪,原来好好的,结果现在显示乱了,模拟器和手机都不一样.模拟器上,整个canvas都往右偏移了,手机上,右侧有一大片空白. 反复试验,发现问题是:page的对齐方式是center引起的,改为lef ...

  5. Eclipse 4.5.0 离线安装 Veloeclipse 插件

    下载 Veloeclipse 在 Eclipse eclipse-jee-mars-R-win32-x86_64 版本 4.5.0,Build id 为 20150621-1200,离线安装 Velo ...

  6. JVM内存区域的划分(内存结构或者内存模型)

    JVM内存区域的划分(内存结构或者内存模型)   运行时数据区域: 根据 JVM 规范,JVM 内存共分为虚拟机栈.堆.方法区.程序计数器.本地方法栈五个部分. 程序计数器(线程私有): 是当前线程所 ...

  7. React 中 keys 的作用是什么?

    Keys 是 React 用于追踪哪些列表中元素被修改.被添加或者被移除的辅助标识. render () { return ( <ul> {this.state.todoItems.map ...

  8. Ubuntu18.04命令行连接WiFi

    查看是否已经正确安装无线网卡 iwconfig .启动无线网卡, 如果网卡是wlan0 # 方式1 ifconfig wlan0 up # 或者方式2 ip link set wlan0 up .扫描 ...

  9. A Tale of Three Apache Spark APIs: RDDs, DataFrames, and Datasets(中英双语)

    文章标题 A Tale of Three Apache Spark APIs: RDDs, DataFrames, and Datasets 且谈Apache Spark的API三剑客:RDD.Dat ...

  10. ASP.NET CORE中判断是否移动端打开网页

    using Microsoft.AspNetCore.Http;using System;using System.Collections.Generic;using System.Text;usin ...