Files
tldr/pages.zh/common/mongod.md

20 lines
527 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# mongod
> MongoDB 数据库服务器。
> 更多信息请访问:<https://docs.mongodb.com/manual/reference/program/mongod>。
- 指定存储目录默认Linux 和 macOS 上为 `/data/db`Windows 上为 `C:\data\db`
`mongod --dbpath {{path/to/directory}}`
- 指定配置文件:
`mongod --config {{path/to/file}}`
- 指定监听的端口默认27017
`mongod --port {{port}}`
- 指定数据库分析级别。0 关闭1 仅慢操作2 所有默认0
`mongod --profile {{0|1|2}}`