当前位置:Gxlcms > 数据库问题 > MongoDB配置文件

MongoDB配置文件

时间:2021-07-01 10:21:17 帮助过:43人阅读

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   

人气教程排行