Why does MongoDB deploy stand-alone replica sets?
The ultimate goal of deploying a stand-alone replica set: it is also easy to expand later. Add nodes without downtime.
Add a user group
Groupadd-g 355 mongodb
Add user mgousr02
Useradd-u 369-g mongodb-G mongodb,users-d / data/users/mgousr02-m mgousr02
Modify mgousr01 user password
Passwd mgousr02-stdin rs.initiate (config)
{"ok": 1}
Test data:
Rs0:PRIMARY > use paris
Switched to db paris
Rs0:PRIMARY > for (var itemositani