欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Docker?ZooKeeper3.4.10集群安裝配置過程

 更新時間:2022年07月25日 15:20:53   作者:MR船長  
這篇文章主要介紹了ZooKeeper3.4.10集群安裝配置-Docker,集群部署配置步驟,本文給大家介紹的非常詳細,對大家的學習或工作具有一定的參考借鑒價值,需要的朋友可以參考下

一. 服務器規(guī)劃

主機

IP

端口

備注

b-mid-24

172.16.0.24

2181, 2888, 3888

2181:對cline端提供服務

3888:選舉leader使用

2888:集群內(nèi)機器通訊使用(Leader監(jiān)聽此端口)

b-mid-25

172.16.0.25

2181, 2888, 3888

b-mid-26

172.16.0.26

2181, 2888, 3888

二. 集群部署

注:以下步驟需要分別在三臺主機操作

1. 配置

1.1 創(chuàng)建宿主機映射目錄

mkdir /data/docker/zookeeper-home/{conf,data,logs,datalog} -p

1.2. 創(chuàng)建配置文件(3臺zk節(jié)點配置文件一樣)

vi /data/docker/zookeeper-home/conf/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=/data
dataLogDir=/datalog

# 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

server.24=172.16.0.24:2888:3888
server.25=172.16.0.25:2888:3888
server.26=172.16.0.26:2888:3888

1.3. 配置zookeeper主機id,每個機器id不能相同,需要對應配置文件server后面的值:

echo "24" > /data/docker/zookeeper-home/data/myid
echo "25" > /data/docker/zookeeper-home/data/myid
echo "26" > /data/docker/zookeeper-home/data/myid

1.4 修改 zookeeper-home 目錄及子目錄所屬用戶為 yunwei :

chown -R yunwei:yunwei /data/docker/zookeeper-home

2. 啟動

2.1 開啟端口

firewall-cmd --permanent --add-port=2181/tcp
firewall-cmd --permanent --add-port=2888/tcp
firewall-cmd --permanent --add-port=3888/tcp
firewall-cmd --reload
firewall-cmd --list-all

2.2 啟動服務(用 yunwei 賬號執(zhí)行)

拉取鏡像:

docker pull zookeeper:3.4.10

啟動服務:

docker run -d \
--name zookeeper \
--network host \
--restart=unless-stopped \
-v /data/docker/zookeeper-home/data:/data \
-v /data/docker/zookeeper-home/conf:/conf \
-v /data/docker/zookeeper-home/datalog:/datalog \
-v /data/docker/zookeeper-home/logs:/logs \
-v /etc/localtime:/etc/localtime \
zookeeper:3.4.10

2.3 查看服務器狀態(tài)

docker exec -it zookeeper bash
zkServer.sh status
echo mntr | nc 127.0.0.1 2181
zkCli.sh -server 127.0.0.1:2181
ls /

到此這篇關(guān)于Docker ZooKeeper3.4.10集群安裝配置過程的文章就介紹到這了,更多相關(guān)Docker ZooKeeper集群內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

  • docker-compose中變量的使用方式

    docker-compose中變量的使用方式

    這篇文章主要介紹了docker-compose中變量的使用方式,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教
    2024-01-01
  • docker?compose運行微服務項目的方法

    docker?compose運行微服務項目的方法

    這篇文章主要介紹了docker?compose運行微服務項目?,本文給大家介紹的非常詳細,對大家的學習或工作具有一定的參考借鑒價值,需要的朋友可以參考下
    2022-08-08
  • Docker Desktop啟動失敗的解決(Docker failed to initialize Docker Desktop is shutting down)

    Docker Desktop啟動失敗的解決(Docker failed to i

    本文主要介紹了Docker Desktop啟動失敗的解決(Docker failed to initialize Docker Desktop is shutting down),文中通過示例代碼介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2022-03-03
  • Linux中docker的使用方法講解

    Linux中docker的使用方法講解

    本文給大家詳細介紹了linux中docker的使用,非常不錯,具有參考借鑒價值,需要的朋友參考下吧
    2017-12-12
  • .NET?6?從0到1使用Docker部署至Linux環(huán)境超詳細教程

    .NET?6?從0到1使用Docker部署至Linux環(huán)境超詳細教程

    這篇文章主要介紹了.NET?6?從0到1使用Docker部署至Linux環(huán)境,本文通過圖文并茂的形式給大家介紹的非常詳細,對大家的學習或工作具有一定的參考借鑒價值,需要的朋友可以參考下
    2022-05-05
  • Prometheus 整合 AlertManager的教程詳解

    Prometheus 整合 AlertManager的教程詳解

    Alertmanager 主要用于接收 Prometheus 發(fā)送的告警信息,它很容易做到告警信息的去重,降噪,分組,策略路由,是一款前衛(wèi)的告警通知系統(tǒng)。這篇文章主要介紹了Prometheus 整合 AlertManager的教程 ,需要的朋友可以參考下
    2019-07-07
  • 如何完全清理你的Docker數(shù)據(jù)

    如何完全清理你的Docker數(shù)據(jù)

    Docker 不會對你的系統(tǒng)進行任何配置更改……但是它會占用大量的磁盤空間,那么如何完全清理你的數(shù)據(jù),本文就詳細的來介紹一下,感興趣的可以了解一下
    2021-07-07
  • docker使用storage出現(xiàn)Exit導致文件無法上傳服務器的問題及解決方案

    docker使用storage出現(xiàn)Exit導致文件無法上傳服務器的問題及解決方案

    這篇文章主要介紹了docker使用storage出現(xiàn)Exit導致文件無法上傳服務器解決方案,本文給大家介紹的非常詳細,對大家的學習或工作具有一定的參考借鑒價值,需要的朋友可以參考下
    2020-06-06
  • 如何利用Docker部署一個簡單的springboot項目

    如何利用Docker部署一個簡單的springboot項目

    這篇文章主要介紹了如何利用Docker部署一個簡單的springboot項目,本文通過實例圖文實例代碼相結(jié)合給大家介紹的非常詳細,需要的朋友可以參考下
    2024-02-02
  • docker network create命令的具體使用

    docker network create命令的具體使用

    docker network create命令用于創(chuàng)建一個新的網(wǎng)絡連接,本文就來詳細的介紹一下docker network create命令的具體使用,具有一定的參考價值,感興趣的可以了解一下
    2023-10-10

最新評論