【Mongo】mongo配置檔案
大於等於3.2按這種寫法
-
[ root@ ip - 172 - 31 - 33 - 43 conf ] # more shard1 . conf
-
# where to write logging data .
-
systemLog :
-
destination : file
-
logAppend : true
-
path : /data/shard1/log/shard1 . log
-
-
# Where and how to store data .
-
storage :
-
dbPath : /data/shard1/data
-
journal :
-
enabled : true
-
wiredTiger :
-
engineConfig :
-
cacheSizeGB : 5 ##限制記憶體使用大小
-
-
# how the process runs
-
processManagement :
-
fork : true
-
pidFilePath : /data/shard1/log/shard1 . pid
-
-
# network interfaces
-
net :
-
port : 27001
-
bindIp : 172 . 31 . 33 . 43
-
-
#security :
-
# authorization : enabled
-
-
#operationProfiling :
-
replication :
-
replSetName : shard1
-
sharding :
-
clusterRole : shardsvr
security: ###開啟許可權認證
keyFile: /usr/local/mongodb/keyfile
authorization: enabled
-
-
[ root@ ip - 172 - 31 - 33 - 43 conf ] # more config . conf
-
## content
-
systemLog :
-
destination : file
-
logAppend : true
-
path : /data/config/log/config . log
-
-
# Where and how to store data .
-
storage :
-
dbPath : /data/config/data
-
journal :
-
enabled : true
-
# how the process runs
-
processManagement :
-
fork : true
-
pidFilePath : /data/config/log/configsrv . pid
-
-
# network interfaces
-
net :
-
port : 21000
-
bindIp : 172 . 31 . 33 . 43
-
-
#operationProfiling :
-
replication :
-
replSetName : config
-
-
sharding :
-
clusterRole : configsvr
-
-
[ root@ ip - 172 - 31 - 33 - 43 conf ] # more mongos . conf
-
systemLog :
-
destination : file
-
logAppend : true
-
path : /data/mongos/log/mongos . log
-
processManagement :
-
fork : true
-
-
# network interfaces
-
-
net :
-
port : 20000
-
bindIp : 172 . 31 . 33 . 43
-
#監聽的配置伺服器 , 只能有1個或者3個 configs為配置伺服器的副本集名字
-
sharding :
-
configDB : config/172 . 31 . 33 . 43 : 21000 , 172 . 31 . 45 . 127 : 21000 , 172 . 31 . 36 . 162 : 21000
小於3.2一般按這種格式
-
port
=
27017
-
dbpath
=
/
data/mongodb/data
-
logpath
=
/
data/mongodb/logs/mongodb
.
log
-
pidfilepath
=
/
data/mongodb/logs/mongodb
.
pid
-
logappend
=
true
-
auth
=
true
-
fork
=
true
-
wiredTigerCacheSizeGB
=
20
port
=
27017
dbpath
=
/
data/mongodb/data
logpath
=
/
data/mongodb/logs/mongodb
.
log
pidfilepath
=
/
data/mongodb/logs/mongodb
.
pid
logappend
=
true
auth
=
true
fork
=
true
wiredTigerCacheSizeGB = 20
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29096438/viewspace-2154557/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【Mongo】mongo聚合操作Go
- 【mongo】mongo 欄位型別互轉Go型別
- mongo GridFSBucketGo
- 【Mongo】shell命令列模式執行mongo命令Go命令列模式
- 【Mongo】Mongo讀寫分離的實現Go
- mongo基本操作Go
- mongo 索引解析Go索引
- 管理索引mongo索引Go
- 安裝mongoGo
- docker操作mongo+docker的常用操作+mongo與.netDockerGo
- 【Mongo】Mongodump 與 mongorestore對mongo進行備份恢復GoREST
- 【Mongo】mongo分片加複製集的備份恢復Go
- 【Mongo】mongo更新欄位為另一欄位的值Go
- mongo的‘模糊匹配’Go
- mongo副本集搭建Go
- mongo-go-driverGo
- mac 啟動mongoMacGo
- Prometheus監控mongoPrometheusGo
- mongo 聚合查詢Go
- Mongo連線分析Go
- go操作mongo CRUDGo
- mongo聚合框架aggregate使用Go框架
- mongo 小知識點Go
- 【Python】pymongo連結mongoPythonGo
- mongo基本命令(一)Go
- Mongo主從同步原理Go主從同步
- PostgreSQL 工具及mysql、mongoMySqlGo
- Mongo的bulkWrite介紹Go
- mongo資料備份Go
- logstach 8.6.2輸出到mongo 6Go
- spring data mongo @Field 失效問題SpringGo
- mongo 儲存過程詳解Go儲存過程
- 【Mongo】MongoDB WiredTiger引擎調優技巧MongoDB
- 領導不讓用mongo了Go
- usering mongotemplate bases on spring-Data-mongoGoSpring
- 自己製作redis 和mongo 映象RedisGo
- mongo3.2.7部署文件Go
- Homestead安裝mongo擴充套件Go套件