Mongodb Study Notes 06, mongodb Study Notes
In note 01, when mongod is started, the parameter is directly specified through the command line.
Mongod -- dbpath/path/to/database -- logpath/path/to/logfile -- fork -- port 27017
You can specify the configuration file to start, and-f specifies the configuration file directory.
Mongod-f configfile
Configuration File Format:
Mongodb configuration file format changed from 2.6 to YAML format
Configuration example:
SystemLog: destination: file path: "/path/to/logfile" logAppend: truestorage: dbPath: "/path/to/database/" directoryPerDB: true journal: enabled: trueprocessManagement: fork: truesecurity: authorization: "enable"
Detailed introduction to the configuration file format
Official documentation
Http://docs.mongodb.org/manual/reference/configuration-options/
Good article
Http://my.oschina.net/u/1449160/blog/273283
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.