Mongodb3.0配置文件
2015-10-27 15:07
471 查看
基本配置如下:
systemLog:
destination: file
path: "/home/admin/mongodb3/logs/shard1.log"
logAppend: true
quite:true
processManagement:
fork: true
pidFilePath:"/home/admin/mongodb3/data/shard1.pid"
net:
port:27017
maxIncomingConnections:65535
wireObjectCheck:true
http:
enabled: false
JSONPEnabled: false
RESTInterfaceEnabled: false
storage:
dbPath:"/home/admin/mongodb3/data/shard1/"
journal:
enabled:true
directoryPerDB:true
engine:wiredTiger
wiredTiger:
engineConfig:
cacheSizeGB: 2
journalCompressor: snappy
directoryForIndexes:true
collectionConfig:
blockCompressor: snappy
indexConfig:
prefixCompression:true
operationProfiling:
slowOpThresholdMs:100
mode:off
复制集增加如下配置:(在基本配置的基础上)
#replication Options
replication:
oplogSizeMB:32
replSetName:shard1
分片增加如下配置:(在基本配置的基础上)
#sharding Options
sharding:
clusterRole: shardsvr
archiveMovedChunks: true
Mongos的配置:
# #mongos-only Options
replication:
localPingThresholdMs: 15
sharding:
autoSplit: true
configDB: <string>
chunkSize: 64
systemLog:
destination: file
path: "/home/admin/mongodb3/logs/shard1.log"
logAppend: true
quite:true
net:
port:27017
maxIncomingConnections:65535
systemLog:
destination: file
path: "/home/admin/mongodb3/logs/shard1.log"
logAppend: true
quite:true
processManagement:
fork: true
pidFilePath:"/home/admin/mongodb3/data/shard1.pid"
net:
port:27017
maxIncomingConnections:65535
wireObjectCheck:true
http:
enabled: false
JSONPEnabled: false
RESTInterfaceEnabled: false
storage:
dbPath:"/home/admin/mongodb3/data/shard1/"
journal:
enabled:true
directoryPerDB:true
engine:wiredTiger
wiredTiger:
engineConfig:
cacheSizeGB: 2
journalCompressor: snappy
directoryForIndexes:true
collectionConfig:
blockCompressor: snappy
indexConfig:
prefixCompression:true
operationProfiling:
slowOpThresholdMs:100
mode:off
复制集增加如下配置:(在基本配置的基础上)
#replication Options
replication:
oplogSizeMB:32
replSetName:shard1
分片增加如下配置:(在基本配置的基础上)
#sharding Options
sharding:
clusterRole: shardsvr
archiveMovedChunks: true
Mongos的配置:
# #mongos-only Options
replication:
localPingThresholdMs: 15
sharding:
autoSplit: true
configDB: <string>
chunkSize: 64
systemLog:
destination: file
path: "/home/admin/mongodb3/logs/shard1.log"
logAppend: true
quite:true
net:
port:27017
maxIncomingConnections:65535
相关文章推荐
- MongoDB介绍
- mongodb分配集群 shard key
- MongoDB小技巧-用ObjectID查询某一时间范围内的数据
- MongoDB(四)之副本集
- mongodb 3.0.2与wiredTiger存储引擎安装测试
- mongodb 3.0.2与wiredTiger存储引擎安装测试
- Mongodb获取附近的人
- MongoDB正则表达式及应用
- MongoDB数据预热
- MongoDB数据库管理命令touch
- MongoDB数据库管理命令touch
- MongoDB正则表达式及应用
- mongoDB的安装
- MongoDB 从0开始
- JS脚本强制kill掉MongoDB慢查询
- mongodb初级
- Simple example - Node.js, Restify, MongoDb and Mongoose
- MongoDB的db.currentOp()输出结果分析
- MongoDB的db.currentOp()输出结果分析
- 关于mongodb慢查询