centos7安装单机zookeeper

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

cmd 复制代码
#解压
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配置:

cmd 复制代码
#进入配置目录
cd /usr/local/kafka/zookeeper-3.4.14/conf/
#复制配置文件
cp zoo_sample.cfg zoo.cfg
#编辑配置文件,如下

单机版配置:

yml 复制代码
# 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:

cmd 复制代码
#进入bin目录
cd /usr/local/kafka/zookeeper-3.4.14/bin
#启动
./zkServer.sh start
xml 复制代码
ZooKeeper JMX enabled by default
Using config: /usr/local/kafka/zookeeper-3.4.14/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
cmd 复制代码
#查看启动状态
./zkServer.sh status
xml 复制代码
ZooKeeper JMX enabled by default
Using config: /usr/local/kafka/zookeeper-3.4.14/bin/../conf/zoo.cfg
Mode: standalone
相关推荐
程序猿阿伟19 小时前
《分布式追踪Span-业务标识融合:端到端业务可观测手册》
分布式
yumgpkpm20 小时前
预测:2026年大数据软件+AI大模型的发展趋势
大数据·人工智能·算法·zookeeper·kafka·开源·cloudera
消失的旧时光-194321 小时前
第十六课实战:分布式锁与限流设计 —— 从原理到可跑 Demo
redis·分布式·缓存
若水不如远方21 小时前
分布式一致性(三):共识的黎明——Quorum 机制与 Basic Paxos
分布式·后端·算法
岁岁种桃花儿1 天前
注册中心宕机后,RPC调用还能成功吗?主流框架实测级分析
zookeeper·eureka·rpc
会算数的⑨1 天前
Kafka知识点问题驱动式的回顾与复习——(一)
分布式·后端·中间件·kafka
张小凡vip1 天前
Kafka--使用 Kafka Connect 导入/导出数据
分布式·kafka
回忆是昨天里的海1 天前
kafka概述
分布式·kafka
知识即是力量ol1 天前
初识 Kafka(一):分布式流平台的定义、核心优势与架构全景
java·分布式·kafka·消息队列
nbsaas-boot1 天前
Pipeline + Saga 分布式扩展规范
分布式