-
Notifications
You must be signed in to change notification settings - Fork 0
Mongo Shared Cluster
WinChua edited this page Jun 21, 2020
·
3 revisions
- 配置configsrv:
1 sharding:
2 clusterRole: configsvr
3 replication:
4 replSetName: cfg0
5 net:
6 bindIp: localhost
启动: mongod --dbpath `pwd`/dbpath0 --config confsrv.cnf
默认端口: 27019
连接configsvr: mongo --host localhost --port 27019
- 配置分片:
rs.status()
rs.initiate()