MongoDB config file


Now that we have MongoDB up and running, it’s time to configure the file, paying attention into the config file for the mongoDB server.

MongoDB reads a configuration file (it’s a text file) when you starts a server. This feature is exactly the same as MySQL does, and modifying the configuration file you can modify the server to your needs or to your limitations. To starts a MongoDB server, just type on a MS-DOS console:

mongodbd --config rutaconfig

If you don’t have a configuration file, you can create a new one on a text editor (I like Notepad++, and I already talked here). The minimal content is this:

dbpath = o:\mongodb\datos\
logpath = o:\mongodb\mongo.log
logappend = true

Thanks to this configuration file, start and stop a server is very easy, avoiding very large instructions!

You can read the official documentation where you can oficial tenemos una explicación completa y pormenorizada de todas las opciones disponibles para configurar el servidor:

That’s our second step dealing with MongoDB.