
Deploy ReplicaSet With Keyfile Authentication
Deploy ReplicaSet With Keyfile Authentication ① Create a keyfile openssl rand -base64 756 > mongodb.key # chmod 400 <path-to-keyfile> ② Copy the keyfile to each replica set member sudo mv mongodb.key /var/lib/mongodb sudo chown mongodb:mongodb /var/lib/mongodb/mongodb.key sudo chmod 400 /var/lib/mongodb/mongodb.key ③ Start each member of the replica set with access control enabled net: port: 27017... » read more