mongodb配置文件解析
linux环境默认在/etc/mongod.conf
# mongod.conf
systemLog:
destination: file
logAppend: true
path: /var/log/mongodb/mongod.log
storage:
wiredTiger:
engineConfig:
cacheSizeGB: 1
collectionConfig:
blockCompressor: zlib
dbPath: /var/lib/mongo
processManagement:
timeZoneInfo: /usr/share/zoneinfo
net:
port: 27017
bindIp: 0.0.0.0 # Enter 0.0.0.0,:: to bind to all IPv4 and IPv6 addresses or, alternatively, use the net.bindIpAll setting.
security:
authorization: enabled
keyFile: /opt/mongo_keyfile/mongodb.key
#operationProfiling:
replication:
replSetName: rsmg
#sharding:
## Enterprise-Only Options
#auditLog: