当前位置: 首页 > news >正文

centos7安装单机zookeeper

下载安装包并解压:apache-zookeeper-3.4.14-bin.tar.gz

#解压
tar -zxvf /usr/local/kafka/apache-zookeeper-3.4.14-bin.tar.gz
#重命名
mv apache-zookeeper-3.4.14-bin zookeeper-3.4.14  

修改zookeeper配置:

#进入配置目录
cd /usr/local/kafka/zookeeper-3.4.14/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=/tmp/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

启动zookeeper:

#进入bin目录
cd /usr/local/kafka/zookeeper-3.4.14/bin
#启动
./zkServer.sh start
ZooKeeper JMX enabled by default
Using config: /usr/local/kafka/zookeeper-3.4.14/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
#查看启动状态
./zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /usr/local/kafka/zookeeper-3.4.14/bin/../conf/zoo.cfg
Mode: standalone

相关文章:

  • arm linux下的读写信号量rw_semphore的实现
  • macOS 使用 enca 识别 文件编码类型(比 file 命令准确)
  • C++ 项目实战书店销售记录统计程序(十)
  • 论文阅读:2023 arxiv Provable Robust Watermarking for AI-Generated Text
  • tryhackme——The Lay of the Land
  • Wi-Fi NAN 架构(Wi-Fi Aware Specification v4.0,第2章:2.3~2.6)
  • 大数据学习栈记——HBase操作(shell java)
  • 信奥赛CSP-J复赛集训(模拟算法专题)(25):P3955 [NOIP 2017 普及组] 图书管理员
  • 计算机网络基础之三种交换技术及其性能分析
  • 六十天前端强化训练之第二十四天之Vue 模板语法与 v-for 指令大师级详解
  • 【Linux之Shell脚本实战】Linux服务器输出美观漂亮的html巡检报告
  • 使用Docker部署RabbitMQ
  • 电子学会—2023年12月青少年软件编程(图形化)三级等级考试真题——打砖块游戏
  • 【SpringCloud】OpenFeign
  • 腾讯云宝塔安装ffmpeg
  • vue 对接 paypal 订阅和支付
  • Android10 系统截屏功能异常的处理
  • DeepSeek算力服务器的选型--青岛佰优联创新科技有限公司
  • OpenGL ES ->乒乓缓冲,计算只用两个帧缓冲对象(Frame Buffer Object)+叠加多个滤镜作用后的Bitmap
  • SpringBoot3实战(SpringBoot3+Vue3基本增删改查、前后端通信交互、配置后端跨域请求、数据批量删除(超详细))(3)
  • 湖北宜昌:在青山绿水间解锁乡村振兴“密码”
  • 七方面118项任务,2025年知识产权强国建设推进计划印发
  • 早期投资人蜂巧资本清仓泡泡玛特套现超22亿港元,称基金即将到期
  • 75岁亚当·费舍尔坐镇,再现80分钟马勒《第九交响曲》
  • 司法部谈民营经济促进法:对违规异地执法问题作出禁止性规定
  • 视频|漫画家寂地:古老丝路上的文化与交流留下的独特印记