MongoDB 3 分片集群安装配置(2)

[root@test1 ~]# mkdir /var/lib/mongo2
[root@test1 ~]# mongod --shardsvr --replSet shard-b --dbpath /var/lib/mongo2/ --port 37017 --logpath /var/log/mongodb/mongod2.log --fork --journal
about to fork child process, waiting until server is ready for connections.
forked process: 14323
child process started successfully, parent exiting
 
[root@test2 ~]# mkdir /var/lib/mongo2
[root@test2 ~]# mongod --shardsvr --replSet shard-b --dbpath /var/lib/mongo2/ --port 37017 --logpath /var/log/mongodb/mongod2.log --fork --journal
about to fork child process, waiting until server is ready for connections.
forked process: 5623
child process started successfully, parent exiting
 
[root@test3 ~]# mkdir /var/lib/mongo2
[root@test3 ~]# mongod --shardsvr --replSet shard-b --dbpath /var/lib/mongo2/ --port 37017 --logpath /var/log/mongodb/mongod2.log --fork --journal
about to fork child process, waiting until server is ready for connections.
forked process: 4303
child process started successfully, parent exiting

配置 shard-b 副本集

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/71b571e8c254da9b38cabcfd32413cb5.html