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