欢迎您访问365答案网,请分享给你的朋友!
生活常识 学习资料

6、Docker-常用安装:Zookeeper、Kafka

时间:2023-06-14
一、Docker安装Zookeeper

##查询zookeeper镜像docker search zookeeper##拉去zookeeper镜像docker pull zookeeper:latest##本地创建zookeeper的挂载目录mkdir -p /opt/software/myfile/zookeeper/confmkdir -p /opt/software/myfile/zookeeper/datamkdir -p /opt/software/myfile/zookeeper/datalogcd /opt/software/myfile/zookeeper##运行一个zookeeper 复制它的配置文件到本地docker run --name zookeeper -p 2181:2181 -d zookeeperdocker container cp zookeeper:/conf .##关闭并删除dockerdocker stop zookeeperdocker rm zookeeper##启动一个新的zookeeper容器,并挂载本地配置和数据目录docker run --name zookeeper -p 2181:2181 -v /opt/software/myfile/zookeeper/conf:/conf -v /opt/software/myfile/zookeeper/data:/data -v /opt/software/myfile/zookeeper/datalog:/datalog --restart=always -d zookeeper

Copyright © 2016-2020 www.365daan.com All Rights Reserved. 365答案网 版权所有 备案号:

部分内容来自互联网,版权归原作者所有,如有冒犯请联系我们,我们将在三个工作时内妥善处理。