1. 程式人生 > 實用技巧 >mongodb.conf配置檔案

mongodb.conf配置檔案

mongodb目錄結構:

data目錄:存在資料

etc目錄存放配置檔案:核心配置檔案
mongodb.conf,keyfile檔案,叢集資訊檔案cluster.conf
log目錄:存放日誌

tmp目錄:存放臨時檔案,程序id

########################################
├── data
/ ├── etc/ │ ├── cluster.conf │ ├── keyfile │ └── mongodb.conf ├── log/ │ └── mongodb.log └── tmp/ └── mongo_28000.pid

[work@xxx etc
]$ cat mongodb.conf systemLog: destination: file path: /home/work/mongodb/mongo_28042/log/mongodb.log logAppend: true #net Options net: maxIncomingConnections: 10240 port: 28042 bindIp: 10.136.42.3,localhost serviceExecutor : adaptive #security Options security: authorization: 'enabled' keyFile:
/home/work/mongodb/mongo_28042/etc/glc-test clusterAuthMode: "keyFile" #storage Options storage: engine: "wiredTiger" directoryPerDB: true dbPath: /home/work/mongodb/mongo_28042/data #indexBuildRetry: true journal: enabled: true commitIntervalMs: 100 wiredTiger: engineConfig: directoryForIndexes: true cacheSizeGB:
10 journalCompressor: "snappy" collectionConfig: blockCompressor: "snappy" indexConfig: prefixCompression: true #wiredTigerCollectionConfigString: lsm #wiredTigerIndexConfigString: lsm #replication Options replication: oplogSizeMB: 65536 #64GB replSetName: glc-test #operationProfiling Options operationProfiling: slowOpThresholdMs: 100 mode: "slowOp" processManagement: fork: true pidFilePath: /home/work/mongodb/mongo_28042/tmp/mongo_28042.pid