본문 바로가기
몽고DB

리눅스(Centos) 몽고디비 설정

by NaHyungMin 2019. 3. 7.

# for documentation of all options, see:

#   http://docs.mongodb.org/manual/reference/configuration-options/


# where to write logging data.

systemLog:

  destination: file

  logAppend: true

  logRotate: rename

  path: /log/mongodb/mongod.log

  timeStampFormat: iso8601-utc


# Where and how to store data.

storage:

  dbPath: /db/mongodb/

  engine: wiredTiger

  wiredTiger:

    engineConfig:

      cacheSizeGB: 3

      journalCompressor: zlib

    collectionConfig:

      blockCompressor: zlib

    indexConfig:

      prefixCompression: true

  journal:

    enabled: true

    commitIntervalMs: 100

#  mmapv1:


# how the process runs

processManagement:

  fork: true  # fork and run in background

  pidFilePath: /var/run/mongodb/mongod.pid  # location of pidfile


# network interfaces

net:

  port: port

  bindIp: 127.0.0.1  # Listen to local interface only, comment to listen on all interfaces.



security:

 keyFile: /db/mongodb-keyfile

 authorization: disabled #enabled


#operationProfiling:


replication:

   oplogSizeMB: 1024

   replSetName: fom-gl-group

   #secondaryIndexPrefetch: <string>

   #enableMajorityReadConcern: <boolean>


#sharding:


## Enterprise-Only Options


#auditLog:


#snmp:



포트만 딴거로 변경해서 쓰면 될듯. 엔진은 wiredTiger 사용. 압축은 용도에 맞게 사용하면 될듯.