mongodb 配置

 

mongodb 配置

 

# mongod.conf

# for documentation of all options, see:
#   http://docs.mongodb.org/manual/reference/configuration-options/

# where to write logging data.
systemLog:
  destination: file
  logAppend: true
  path: /data/mongodb/logs/mongod.log

# Where and how to store data.
storage:
  dbPath: /data/mongodb/data
  journal:
    enabled: true
#  engine:
#  mmapv1:
  wiredTiger:
    engineConfig:
      cacheSizeGB: 0.8

# how the process runs
processManagement:
  fork: true  # fork and run in background
  pidFilePath: /var/run/mongodb/mongod.pid  # location of pidfile
  timeZoneInfo: /usr/share/zoneinfo

# network interfaces
net:
  port: 27017
  bindIp: 0.0.0.0  # Enter 0.0.0.0,:: to bind to all IPv4 and IPv6 addresses or, alternatively, use the net.bindIpAll setting.

#security:
security:
  keyFile: /etc/mongod.keyfile
  clusterAuthMode: keyFile
  authorization: enabled

#operationProfiling:
#replication:
replication:
  replSetName: wywl

#sharding:

## Enterprise-Only Options

#auditLog:
#snmp:
setParameter:  
  enableLocalhostAuthBypass: true

 

posted @ 2020-09-25 13:50  花红沁人心  阅读(44)  评论(0)    收藏  举报