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
相关推荐
网络工程小王7 小时前
【HCIE-AI】12.deepspeed分布式并行训练进阶版
人工智能·pytorch·分布式·学习·昇腾·deepspeed
ACP广源盛139246256739 小时前
国产算力互联IX8024@ACP#Kimi K3 开源后的端侧部署硬件架构分析
大数据·人工智能·分布式·单片机·嵌入式硬件
花生了什么事o10 小时前
分布式 ID 生成方案:从数据库自增到雪花算法
数据库·分布式·算法
爱吃提升1 天前
python 分布式爬虫、爬虫合规与综合实战项目
分布式·爬虫·python
顧棟1 天前
Zookeeper热缩容解析
linux·服务器·zookeeper
ZENERGY-众壹1 天前
跨品牌逆变器升级:华为锦浪德业 API 对接的 7 个坑
分布式·华为·数据归一化·光伏运维·逆变器api
薛定谔的猫19821 天前
LLaMA-Factory +DeepSpeed 分布式多卡训练实战全解
分布式·deepspeed·zero·多卡训练·多卡分布式训练
稚南城才子,乌衣巷风流1 天前
RabbitMQ 消息队列:从入门到实战
分布式·rabbitmq
Database_Cool_2 天前
单机 MySQL 迁移到分布式数据库方便吗?阿里云 PolarDB-X 100% MySQL 协议兼容零改造平滑迁移
数据库·分布式·mysql
肥胖小羊2 天前
解决企业微信 AccessToken 刷新并发冲突的分布式锁机制实践
分布式·企业微信