2025-03-19 15:04:57 +08:00

38 lines
688 B
Plaintext

# mongod.conf
# for documentation of all options, see:
# http://docs.mongodb.org/manual/reference/configuration-options/
# Where and how to store data.
storage:
dbPath: /data/db
journal:
enabled: true
# engine:
# wiredTiger:
# where to write logging data.
systemLog:
logAppend: true
destination: file
logRotate: reopen
path: "/var/log/mongodb/mongod.log"
# network interfaces
net:
port: 27017
# 0.0.0.0代表可以远程访问
bindIp: 0.0.0.0
# how the process runs
processManagement:
timeZoneInfo: /usr/share/zoneinfo
security:
# 打开验证登录
authorization: enabled
#慢查询日志
operationProfiling:
mode: slowOp
slowOpThresholdMs: 100