首页 > 数据库技术 > 详细

MongoDB配置文件

时间:2018-01-16 17:52:16      阅读:253      评论:0      收藏:0      [点我收藏+]
PRIMARY节点:
[mongo@centos701 etc]$ cat mongod.conf
systemLog:
path: /usr/local/mongodb/log/mongod.log
logAppend: false
logRotate: rename
destination: file
timeStampFormat: iso8601-local

processManagement:
fork: true

net:
port: 27017
bindIp: 127.0.0.1,192.168.10.21
maxIncomingConnections: 20000
wireObjectCheck: true
ipv6: false
unixDomainSocket:
enabled: false
pathPrefix: /tmp
filePermissions: 0700

security:
authorization: enabled
javascriptEnabled: true
keyFile: /usr/local/mongodb/keyfile/key

storage:
dbPath: /usr/local/mongodb/data/db
indexBuildRetry: true
journal:
enabled: true
directoryPerDB: true
engine: wiredTiger

operationProfiling:
slowOpThresholdMs: 100
mode: off

replication:
oplogSizeMB: 2048
replSetName: bsbgpsrs

SECONDARY节点:
[mongo@centos702 etc]$ cat mongod.conf
systemLog:
path: /usr/local/mongodb/log/mongod.log
logAppend: false
logRotate: rename
destination: file
timeStampFormat: iso8601-local

processManagement:
fork: true

net:
port: 27017
bindIp: 127.0.0.1,192.168.10.22
maxIncomingConnections: 20000
wireObjectCheck: true
ipv6: false
unixDomainSocket:
enabled: false
pathPrefix: /tmp
filePermissions: 0700

security:
authorization: enabled
javascriptEnabled: true
keyFile: /usr/local/mongodb/keyfile/key

storage:
dbPath: /usr/local/mongodb/data/db
indexBuildRetry: true
journal:
enabled: true
directoryPerDB: true
engine: wiredTiger

operationProfiling:
slowOpThresholdMs: 100
mode: off

replication:
oplogSizeMB: 2048
replSetName: bsbgpsrs

ARBITER节点:
[mongo@centos703 etc]$ cat mongod.conf
systemLog:
path: /usr/local/mongodb/log/mongod.log
logAppend: false
logRotate: rename
destination: file
timeStampFormat: iso8601-local

processManagement:
fork: true

net:
port: 27017
bindIp: 127.0.0.1,192.168.10.23
maxIncomingConnections: 20000
wireObjectCheck: true
ipv6: false
unixDomainSocket:
enabled: false
pathPrefix: /tmp
filePermissions: 0700

security:
authorization: enabled
javascriptEnabled: true
keyFile: /usr/local/mongodb/keyfile/key

storage:
dbPath: /usr/local/mongodb/data/db
indexBuildRetry: true
journal:
enabled: true
directoryPerDB: true
engine: wiredTiger

operationProfiling:
slowOpThresholdMs: 100
mode: off

replication:
oplogSizeMB: 2048
replSetName: bsbgpsrs

参考博文:https://www.jianshu.com/p/f179ce608391

MongoDB配置文件

原文:http://blog.51cto.com/linux10000/2061639

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!