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
相关推荐
小钻风336619 小时前
Kafka 零基础实操命令大全
分布式·kafka
霸道流氓气质21 小时前
Redisson 看门狗机制详解:分布式锁如何自动续期防止提前过期
分布式·redisson·看门狗
fiveym1 天前
PXE安装Debian报错:GRUB安装失败排查指南
运维·debian
霸道流氓气质1 天前
Redisson 分布式集合详解:像用本地集合一样操作跨服务共享数据
分布式
phltxy1 天前
RabbitMQ高级特性-消息确认与持久性博客
分布式·rabbitmq·ruby
2603_954708311 天前
协调控制柜在微电网中的核心地位:数据枢纽、控制核心、安全屏障
分布式·安全·架构·能源·需求分析
淡漠的蓝精灵1 天前
Pulsar 入门:云原生分布式消息流平台
分布式·其他·云原生
ai生成式引擎优化技术1 天前
DLOS Kernel v1.0:面向分布式AI任务执行与Agent调度的统一运行时内核
人工智能·分布式
NashSKY1 天前
RK3588 Debian 系统安装与WiFi/SSH配置笔记
debian·ssh·rk3588
ai生成式引擎优化技术1 天前
DLOS v0.7:面向分布式多智能体AI操作系统的自进化内核
人工智能·分布式