您的位置:首页 > 数据库 > Mongodb

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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: