Skip to content

Instantly share code, notes, and snippets.

@guileen
Last active March 8, 2022 17:27
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save guileen/e2ebc1f7de2d2039fed2 to your computer and use it in GitHub Desktop.
Save guileen/e2ebc1f7de2d2039fed2 to your computer and use it in GitHub Desktop.
storage:
dbPath: "/data/db"
journal:
enabled: true
systemLog:
destination: file
path: "/var/log/mongodb.log"
logAppend: true
timeStampFormat: iso8601-utc
processManagement:
fork: true
net:
bindIp: 192.0.2.3
port: 27019
security:
keyFile: "/data/key/config.key"
authorization: "enabled"
sharding:
clusterRole: "configsvr"
# http://dba.stackexchange.com/questions/82591/sample-yaml-configuration-files-for-mongodb
storage:
engine: wiredTiger
dbPath: "/var/lib/mongodb"
directoryPerDB: true
journal:
enabled: true
systemLog:
destination: file
path: "/var/log/mongodb/mongod.log"
logAppend: true
timeStampFormat: iso8601-utc
processManagement:
fork: true
net:
bindIp: 127.0.0.1
port: 27017
wireObjectCheck : false
unixDomainSocket:
enabled : true
storage:
dbPath: "/data/db"
engine: "wiredTiger"
wiredTiger:
engineConfig:
cacheSizeGB: 8
collectionConfig:
blockCompressor: snappy
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"
storage:
dbPath: "/data/db"
directoryPerDB: true
journal:
enabled: true
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
port: 27018
security:
keyFile: "/data/key/rs1.key"
authorization: "enabled"
sharding:
clusterRole: "shardsvr"
sharding:
configDB: "config1.example.net:27019,config2.example.net:27019,config3.example.net:27019"
autoSplit: true
systemLog:
destination: file
path: "/var/log/mongos.log"
processManagement:
fork: true
net:
port: 27017
bindIp: 192.0.2.2
maxIncomingConnections: 5000
security:
keyFile: "/data/key/mongos.key"
authorization: "enabled"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment