本地搭建存储服务

docker搭建mysql主从复制

https://blog.csdn.net/xizhen2791/article/details/123660049

docker搭建rabbitmq

https://www.guppies.cn/detail/195.html

docker run -d --hostname rabbit-svr --name rabbit -p 5672:5672 -p 15672:15672 -p 25672:25672 -v /Users/guanjian/data/rabbitmq:/var/lib/rabbitmq rabbitmq:management

docker安装consul

docker run --name consul1 -d -p 8500:8500 -p 8300:8300 -p 8301:8301 -p 8302:8302 -p 8600:8600 consul agent -server -bootstrap-expect 2 -ui -bind=0.0.0.0 -client=0.0.0.0

docker inspect --format '{{ .NetworkSettings.IPAddress }}' consul1

docker run --name consul2 -d -p 8501:8500 consul agent -server -ui -bind=0.0.0.0 -client=0.0.0.0 -join 172.17.0.5

docker run --name consul3 -d -p 8502:8500 consul agent -server -ui -bind=0.0.0.0 -client=0.0.0.0 -join 172.17.0.5

docker exec -it consul1 consul members

你可能感兴趣的:(本地搭建存储服务)