Friday, April 19, 2019

Config Files - MongoDB - Samples

mongos:
--------

net:
  port: 27017
processManagement:
  pidFilePath: /var/run/mongodb/mongod.pid
  fork: true
security:
  keyFile: /data/usr/keyfile
sharding:
  configDB: CSRS/server1:27019,server2:27019,server3:27019
systemLog:
  destination: file
  logAppend: true
  logRotate: rename
  path: /data/usr/logs/mongos.log


Config Servers:
----------------

net:
  port: 27019
processManagement:
  pidFilePath: /var/run/mongodb/mongod.pid
  fork: true
security:
  keyFile: /data/usr/keyfile
sharding:
  clusterRole: configsvr
replication:
   replSetName: CSRS
storage:
  dbPath: /data/usr/mongod_config_data
systemLog:
  destination: file
  logAppend: true
  logRotate: rename
  path: /data/usr/logs/mongod_config.log


mongod servers:
----------------

net:
  port: 27017
processManagement:
  pidFilePath: /var/run/mongodb/mongod.pid
  fork: true
security:
  keyFile: /data/usr/keyfile
sharding:
  clusterRole: shardsvr
replication:
  replSetName: rs0
storage:
  dbPath: /data/usr/mongod_data
systemLog:
  destination: file
  logAppend: true
  logRotate: rename
  path: /data/usr/logs/mongod.log


From 3.6 Versions:
-------------------

net:
  port: 27017
  bindIpAll: true
processManagement:
  pidFilePath: /var/run/mongodb/mongod.pid
  fork: true
#security:
#  keyFile: /data/usr/keyfile
replication:
  replSetName: rs0
storage:
  dbPath: /data/usr/mongod_data
systemLog:
  destination: file
  logAppend: true
  logRotate: rename
  path: /data/usr/logs/mongod.log

No comments:

Post a Comment