centos7 安装zookeeper3.4.8集群
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集群的更多相关文章
- centos7安装zookeeper3.4.12集群
zookeeper的三要素: 1.一致,能够保证数据的一致性 2.有头,始终有一个leader,node/2+1个节点有效,就能正常工作 3.数据树,树状结构且每个树必须有数据 1. 环境准备 操作系 ...
- centos7安装zookeeper3.4.9集群
本篇文章目的:以最小成本学习zookeeper的集群安装. zookeeper的三要素: 1.一致,能够保证数据的一致性 2.有头,始终有一个leader,node/2+1个节点有效,就能正常工作 3 ...
- centos7安装redis-4.0.1集群
试验机操作系统:CentOS Linux release 7.2.1511 (Core) 本文的目的是教会大家快速搭建redis集群,完了再深入学习. 试问如果不上手试验,看的资料再多有个毛用? 下载 ...
- centos7安装elasticsearch6.3.x集群并破解安装x-pack
一.环境信息及安装前准备 主机角色(内存不要小于1G): 软件及版本(百度网盘链接地址和密码:链接: https://pan.baidu.com/s/17bYc8MRw54GWCQCXR6pKjg 提 ...
- 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 ...
- centos7安装redis3.2.5集群
安装参照 https://blog.csdn.net/mingliangniwo/article/details/54600640 https://blog.csdn.net/u013820 ...
- Centos7安装升级Ruby和集群搭建参考
安装升级Ruby参考:https://blog.csdn.net/qq_26440803/article/details/82717244 集群搭建参考:https://www.cnblogs.com ...
- Centos7 安装部署Kubernetes(k8s)集群
目录 一.系统环境 二.前言 三.Kubernetes 3.1 概述 3.2 Kubernetes 组件 3.2.1 控制平面组件 3.2.2 Node组件 四.安装部署Kubernetes集群 4. ...
- centos7安装hadoop完全分布式集群
groupadd test //新建test工作组 useradd -g test phpq //新建phpq用户并增加到test工作组 userdel 选项 用 ...
随机推荐
- 内置系统账户:Local system/Network service/Local Service 区别
参考文献: http://www.cnblogs.com/xianspace/archive/2009/04/05/1429835.html 前言 今天在安装sqlserver2008 r2的时候,在 ...
- C#编程(八十)---------- 异常类
异常类 在C#里,异常处理就是C#为处理错误情况提供的一种机制.它为每种错误情况提供了定制的处理方式,并且把标志错误的代码预处理错误的代码分离开来. 对.net类来说,一般的异常类System.Exc ...
- SpringBoot中配置起动时的数据库初始化角本
一.简介 我们使用SpringBoot + JPA时,需要程序在启动时执行数据表的初始化或者数据库记录的初始化.一般数据表的初始化可以通过在Spring Boot的application.proper ...
- 树莓派中编译OpenCV3.4.1和OpenCvSharp
一.简介 本文重点描述在树莓派中编译OpenCV3.4.1和OpenCvSharp,大家都知道OpenCVSharp是使用C#调用OpenCV最简洁的一个库.但是在Linux上或者树莓派上运行时,需要 ...
- C++11 lambda表达式是如何实现的?
lambda表达式是如何实现的呢? 其实是编译器为我们了创建了一个类,这个类重载了(),让我们可以像调用函数一样使用.所以,你写的lambda表达式和真正的实现,是这个样子的: 而对于捕获变量的lam ...
- pycharm修改快捷键
1.keymap 2.找到需要修改的功能 3.鼠标右键选择——选择“add keyboard shortcut” 4.直接按需要设置的快捷键位,如F6 5.确定
- 转 sshfs把远程主机的文件系统映射到本地的目录中
windows之外的世界比想像中要大得多呢,几乎天天都在用ssh,却到今天才知道有sshfs这个好东西,前几天还在为ZendStudio可以远程编辑文件欣喜,惭愧啊,终于有比vi scp://host ...
- 安装二维码、条形码识别工具zbar
参考:http://blog.csdn.net/gaofuqi/article/details/26698547 http://www.imagemagick.org/download/ImageMa ...
- Swift 同构与异构
1.数据源中的同构与异构 对于 Swift 的集合数据来说,有同构和异构之分. 如果你需要讨论一群鸟类或者一批飞机,那么这样的数据是同构的,比如包含鸟类的数组 [Bird] 和包含飞机的数组 [Air ...
- git checkout -b mybranch和git checkout mybranch
创建分支: $ git branch mybranch切换分支: $ git checkout mybranch创建并切换分支: $ git checkout -b mybranch更新maste ...