1.搭建环境
OS:centos7
mem:8G
2.软件版本
mongodb-linux-x86_64-3.2.22
端口规划
ip | port | ||
mongos | 127.0.0.1 | 28017 | |
config | 镜像 | 127.0.0.1 | 28018 |
镜像 | 127.0.0.1 | 28019 | |
镜像 | 127.0.0.1 | 28020 | |
shard1 | p | 127.0.0.1 | 28021 |
s | 127.0.0.1 | 28022 | |
s | 127.0.0.1 | 28023 | |
shard2 | p | 127.0.0.1 | 28024 |
s | 127.0.0.1 | 28025 | |
s | 127.0.0.1 | 28026 |
3.搭建步骤
3.1 shard1集群
[root@