码迷,mamicode.com
首页 > 数据库 > 详细

MongoDB配置文件

时间:2018-01-16 18:00:11      阅读:173      评论:0      收藏:0      [点我收藏+]

标签:usr   mongo   com   gps   for   direct   nec   logs   timestamp   

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配置文件

标签:usr   mongo   com   gps   for   direct   nec   logs   timestamp   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!