본 포스팅은 MongoDB "Configuration File Options" 문서에 기반하여 작성되었습니다.
https://www.mongodb.com/docs/manual/reference/configuration-options/
Configuration File
- mongod, mongos 인스턴스를 시작할 때 configuration file을 사용하여 설정할 수 있음
Platform | Method | Configuration File |
Linux | apt, yum, or zypper | /etc/mongod.conf |
macOS | brew | /usr/local/etc/mongod.conf (on Intel processors) /opt/homebrew/etc/mongod.conf (M1) |
Windows | MSI Installer | <install directory>\bin\mongod.cfg |
- /etc/mongod.conf || bin/mongod.cfg
File format
- YAML format
systemLog:
destination: file
path: "/var/log/mongodb/mongod.log"
logAppend: true
processManagement:
fork: true
net:
bindIp: 127.0.0.1
port: 27017
setParameter:
enableLocalhostAuthBypass: false
...
Use the Configuration File
// --config option to configure
mongod --config /etc/mongod.conf
mongos --config /etc/mongos.conf
// can user -f alias for --config option
mongod -f /etc/mongod.conf
mongos -f /etc/mongos.conf
Configuration File에서 설정가능한 상세한 옵션은 최상단 링크에서 확인!
'DEVELOPMENT > DB' 카테고리의 다른 글
[MongoDB] Building with Patterns (2) | 2023.11.01 |
---|---|
[MongoDB] Sharding (0) | 2023.10.28 |
[MongoDB] MongoDB Node.js Developer Path (0) | 2023.09.28 |
[MongoDB] Introduction to MongoDB (0) | 2023.09.13 |