Shail Patel
Shail Patel

Reputation: 1814

Standalone replica sets mongodb

I need to create a standalone replica set in mongo. I followed the steps here: http://docs.mongodb.org/manual/tutorial/convert-standalone-to-replica-set/

Everything worked as expected, but I was wondering how I could configure this in the mongodb.conf file so I didn't have to manually do these steps every time. Is something like this possible via the conf file? I know there is a replSet param that you can have in the conf file, but I wasn't sure how to specify which ports to use for the different replica sets. Thanks!

Upvotes: 0

Views: 2076

Answers (1)

idbentley
idbentley

Reputation: 4218

Most of the command line parameters you specify are settable in the configuration file - you can see how here: http://docs.mongodb.org/manual/reference/configuration-options/

Specifically, notice that you can set, port, replSet, and dbPath from the configuration file.

There is also a good article on Replica set configuration here: http://docs.mongodb.org/manual/reference/replica-configuration/

Upvotes: 1

Related Questions