当前位置: 首页 > 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
http://www.dtcms.com/a/84960.html

相关文章:

  • 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)
  • Linux系统中关闭Docker服务并禁止其开机自启 、docker 安装目录结构分析 | 【du -sh *】
  • 2025年- G24-Lc98-217.包含重复(使用hashSet解决)-java版
  • 数据库相关(AI回答)
  • 自动驾驶背后的数学:ReLU,Sigmoid, Leaky ReLU, PReLU,Swish等激活函数解析
  • 在ASP.NET Core中使用NLog:配置与性能优化指南
  • Matplotlib完全指南:数据可视化从入门到实战
  • Python在图像处理领域的核心能力及典型应用场景(二)
  • 2014年计算机真题
  • LeetCode 2680.最大或值:位运算
  • 人工智能之数学基础:矩阵条件数在线性方程组求解中的应用