千家信息网

mongondb配置参数

发表于:2025-02-01 作者:千家信息网编辑
千家信息网最后更新 2025年02月01日,配置文件内容:cat /etc/mongodb.confstorage:dbPath: "/data/databases/mongodb"directoryPerDB: truejournal:ena
千家信息网最后更新 2025年02月01日mongondb配置参数


配置文件内容:

cat /etc/mongodb.conf

storage:
dbPath: "/data/databases/mongodb"
directoryPerDB: true
journal:
enabled: true
wiredTiger:
engineConfig:
cacheSizeGB: 100
systemLog:
destination: file
path: "/data/databases/mongodb/mongodb.log"
logRotate: rename
logAppend: true
timeStampFormat: iso8601-local
operationProfiling:
slowOpThresholdMs: 200
mode: slowOp
replication:
oplogSizeMB: 51200
replSetName: "rschunqiu"
processManagement:
fork: true
net:
bindIp: 0.0.0.0
port: 27017
security:
keyFile: "/data/databases/mongodb/mongodb-keyfile"
authorization: "enabled"


启动mongodb:

/usr/local/mongodb/bin/mongod --config /etc/mongodb.conf

0