tldr/pages/common/mongod.md

21 lines
532 B
Markdown
Raw Normal View History

2017-10-06 22:58:04 +01:00
# mongod
2017-10-07 08:35:45 +01:00
> The MongoDB database server.
2019-06-04 10:25:15 +01:00
> More information: <https://docs.mongodb.com/manual/reference/program/mongod>.
2017-10-06 22:58:04 +01:00
- Specify the storage directory (default: `/data/db` on Linux and MacOS, `C:\data\db` on Windows):
`mongod --dbpath {{path/to/directory}}`
2017-10-07 08:34:24 +01:00
- Specify a config file:
2017-10-06 22:58:04 +01:00
`mongod --config {{path/to/file}}`
2017-10-06 22:58:04 +01:00
- Specify the port to listen on (default: 27017):
2017-10-06 22:58:04 +01:00
2017-10-07 08:34:24 +01:00
`mongod --port {{port}}`
2017-10-06 22:58:04 +01:00
- Specify the database profiling level. 0 is off, 1 is only slow operations, 2 is all (default: 0):
2017-10-06 22:58:04 +01:00
2017-10-07 08:34:24 +01:00
`mongod --profile {{0|1|2}}`