mongodb config file in yml format
storage:
dbPath: "/data/db"
engine: "wiredTiger"
systemLog:
destination: file
path: "/var/log/mongodb.log"
logAppend: true
timeStampFormat: iso8601-utc
replication:
oplogSizeMB: 10240
replSetName: "rs1"
processManagement:
fork: true
net:
bindIp: "192.0.2.1,127.0.0.1"
port: 27018
security:
keyFile: "/data/key/rs1.key"
authorization: "enabled"
sharding:
clusterRole: "shardsvr"
setParameter:
enableLocalhostAuthBypass: false