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 选项 用 ...
随机推荐
- android:Button控件
Button 是程序用于和用户进行交互的一个重要控件,相信你对这个控件已经是非常熟悉 了,因为我们在上一章用了太多次 Button.它可配置的属性和 TextView 是差不多的,我们 可以在 act ...
- scrollView 刷新显示在中间的问题
scrollView问题 打开activity之后 屏幕初始位置不是顶部 而是在中间 也就是scroll滚动条不在上面 而是在中间 楼主你好,我大概是和你遇见了同样的问题,你可以灵活处理一下,不要去管 ...
- 解剖SQLSERVER 第一篇 数据库恢复软件商的黑幕(有删减版)
解剖SQLSERVER 第一篇 数据库恢复软件商的黑幕(有删减版) 这一系列,我们一起来解剖SQLSERVER 在系列的第一篇文章里本人可能会得罪某些人,但是作为一位SQLSERVER MVP,在我 ...
- angularjs使用ui-router切换视图, 自动滚动到顶部
ui-view Examples for autoscroll: <ui-view autoscroll/> <!-- If autoscroll present with no e ...
- PL/SQL学习笔记之触发器
一:触发器响应的事件 数据库操作(DML)语句(DELETE,INSERT,UPDATE) 数据库定义(DDL)语句(CREATE,ALTER或DROP) 数据库操作(SERVERERROR,登录,注 ...
- RMAN-05541: no archived logs found in target database
执行 duplicate target databaseto orcl from active database nofilenamecheck报错如下: RMAN> duplicate tar ...
- 阿里云logtail采集IDC机房机器需添加AliUids操作
Configure AliUids for ECS servers under other Alibaba Cloud accounts or on-premises IDCs If Logtail ...
- Linux内核编译与安装
2013-04-16 Linux内核介绍 Linux内核是一个用C语言写成的,符合POSIX标准的类Unix操作系统.内核是操作系统中最基本的一部分,提供了众多应用程序访问计算机硬件的机制.L ...
- EasyUI tab问题记录
1. 关闭当前tab 此代码放在 布局页中,然后所有的页面都可以随时关闭tab了,适当的根据你的项目,更改下js <script> function closetab(subtitle ...
- java多线程状态
造成线程进入阻塞状态的情况大致可分为: 1.调用sleep()方法 2.调用阻塞式IO方法 3. 4.等待通知 5.调用suspend(),程序挂起.