From the course: MongoDB Essential Training

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Set up a replica set with config files

Set up a replica set with config files - MongoDB Tutorial

From the course: MongoDB Essential Training

Set up a replica set with config files

- [Instructor] In this video, we are going to create a three-member replica set using configuration files. Config files should be used for any production deployment, because they are easier to use and manage, and you can check them into version control. Let's go to the terminal. To begin, I'm going to create a folder for this replica set, and I'm going to call the folder replicaset and then cd into it. The next thing I'm going to do is I'm going to create a key file for our deployment. You can run MongoDB without enabling authentication. But it is fairly easy to enable key file authentication which then provides a minimum of security between members of the replica set. For production environments, it is recommended that you use X.509 certificates instead. But since we are using this only for this tutorial, we'll use only our key file. The one additional thing I'm going to do on this key file is I'm going to change the…

Contents