MongoDB YAML格式的配置文件
根据官网的提示内容,默认的配置文件内容为
systemLog:
verbosity: 0
quiet: false
# traceAllExceptions: <boolean>
syslogFacility: user
path: "/data/mongodb/log"
logAppend: false
logRotate: rename
destination: file
timeStampFormat: iso8601-local
component:
accessControl:
verbosity: 0
command:
verbosity: 0
# COMMENT some component verbosity settings omitted for brevity
storage:
verbosity: 0
journal:
verbosity: 0
write:
verbosity: 0
processManagement:
fork: false
pidFilePath: "/var/run/mongodb/mongod.pid"
net:
port: 27017
bindIp: "127.0.0.1"
maxIncomingConnections: 65536
wireObjectCheck: true
ipv6: false
unixDomainSocket:
enabled: true
pathPrefix: "/tmp"
filePermissions: 0700
http:
enabled: true
JSONPEnabled: false
RESTInterfaceEnabled: false
# ssl:
# sslOnNormalPorts: <boolean> # deprecated since 2.6
# mode: disabled
# PEMKeyFile: <string>
# PEMKeyPassword: <string>
# clusterFile: <string>
# clusterPassword: <string>
# CAFile: <string>
# CRLFile: <string>
# allowConnectionsWithoutCertificates: <boolean>
# allowInvalidCertificates: <boolean>
# allowInvalidHostnames: <boolean>
# FIPSMode: <boolean>
#security:
# keyFile: "/var/lib/mongo/mongodb-keyfile"
# clusterAuthMode: keyFile
# authorization: disabled
# javascriptEnabled: true
# sasl:
# hostName: <string>
# serviceName: <string>
# saslauthdSocketPath: <string>
#setParameter:
# <parameter1>: <value1>
# <parameter2>: <value2>
storage:
dbPath: "/data/db"
indexBuildRetry: true
repairPath: "/data/db/tmp"
journal:
enabled: true
directoryPerDB: false
syncPeriodSecs: 60
engine: mmapv1
mmapv1:
preallocDataFiles: true
nsSize: 16
quota:
enforced: false
maxFilesPerDB: 8
smallFiles: false
journal:
debugFlags: 1
commitIntervalMs: 100
# wiredTiger:
# engineConfig:
# cacheSizeGB: 1
# statisticsLogDelaySecs: 0
# journalCompressor: snappy
# directoryForIndexes: false
# collectionConfig:
# blockCompressor: snappy
# indexConfig:
# prefixCompression: true
operationProfiling:
slowOpThresholdMs: 100
mode: off
#replication:
# oplogSizeMB: 50
# replSetName: repl_test
# secondaryIndexPrefetch: all
#sharding:
# clusterRole: <string>
# archiveMovedChunks: <boolean>
#auditLog:
# destination: file
# format: JSON
# path: "/data/mongodb/log"
# filter: <string>
#snmp:
# subagent: <boolean>
# master: <boolean> #mongos only
#replication:
# localPingThresholdMs: <boolean>
#sharding:
# autoSplit: <boolean>
# configDB: <string>
# chunkSize: <int>
注意:boolean值为true或者false,首字母不能大写
systemLog.path为一个文件名,不能为一个文件夹,如果该文件已存在,会创建一个新的带日期的文件
有了这个基础,启动时就可以看启动日志文件来查看到底是哪里的配置有问题不能启动
processManagement.pidFilePath为一个文件地址,不存在也没问题
net.ssl最好全部注释掉,暂时不用ssl
security下最好也注释掉,否则需要配置全部安全内容,以及keyFile一定要存在。
storage.repairPath一定要是storage.dbPath的子目录,且目录需要存在。
replication是复制,副本启动,注释掉
记得注释掉一个引擎
这样就可以启动了
MongoDB YAML格式的配置文件的更多相关文章
- Go 处理yaml类型的配置文件
先说一下,这里用到了很多关于反射类型的功能,可能刚开始看代码,如果对反射不熟悉的可能会不是非常清晰,但是同时也是为了更好的理解golang中的反射,同时如果后面想在代码中可以直接从我的git地址get ...
- mongodb3.2配置文件yaml格式 详解
mongodb3.x版本后就是要yaml语法格式的配置文件,下面是yaml配置文件格式如下:官方yaml配置文件选项参考:https://docs.mongodb.org/manual/ ... #c ...
- yaml格式配置文件
YAML 是一种可读性非常高,与程序语言数据结构非常接近.同时具备丰富的表达能力和可扩展性,并且易于使用的数据标记语言. python中处理 Yaml 格式的数据需要先下载pyyaml: pip in ...
- golang使用yaml格式解析构建配置文件
现在主流的配置文件格式有这么几种,xml.yaml.config… xml就算了,太挫了,太土, 太繁琐… config 就是mysql,apache my.cnf的那种格式,这个格式适合功能分层, ...
- kubernetes yaml格式的Pod配置文件
kubernetes yaml文件解析 # yaml格式的pod定义文件完整内容: apiVersion: v1 #必选,版本号,例如v1 kind: Pod #必选,Pod metadata: #必 ...
- .net core读取json格式的配置文件
在.Net Framework中,配置文件一般采用的是XML格式的,.NET Framework提供了专门的ConfigurationManager来读取配置文件的内容,.net core中推荐使用j ...
- 如何修改geditor的配置文件 -好像geditor没有文本格式的配置文件? 要使用dconf-editor来配置- geditor自己配置编码格式
好像geditor没有文本格式的配置文件? 好像是通过一个程序, 叫 dconf-editor 来配置geditor的? 以前是通过gconf-editor来配置的, 但是gconf-editor的配 ...
- Unity3D可以查看YAML格式的场景文件,采用Notepad++
在Editor Settings 将Asset Serialization 的 mode设置成Force Text,否则不能查看YAML格式! Unity圣典描述:Textual Scene File ...
- Fiddler插件---将Mapi请求自动转为HTTPRunner测试用例(YAML格式)
背景 继之前鼓捣出了Mapi解密插件之后,在团队内已经使用了三年之久,一跃成为团队最爱欢迎的测试工具之一(加个之一,低调谦虚一点). 随着团队推行HttpRunner搞接口自动化:编写和维护Case带 ...
随机推荐
- 分类和逻辑回归(Classification and logistic regression)
分类问题和线性回归问题问题很像,只是在分类问题中,我们预测的y值包含在一个小的离散数据集里.首先,认识一下二元分类(binary classification),在二元分类中,y的取值只能是0和1.例 ...
- 编码转换(UTF8->GBK)
WCHAR woutstr[]; ]; , value, -, NULL, ); MultiByteToWideChar(CP_UTF8, , value, -, woutstr, len); len ...
- vue图片、背景图片路径问题
vue图片.背景图片路径问题 vue中引入图片经常会出现路径问题,在此记录一下: 1.组件中 <img> 引用图片 <img src="../assets/img/logo ...
- Strem String Memory TStringStream
System.SysUtils 一.TStringStream方法 Strem>String TMemoryStream to String stm: TStream; ss: TStringS ...
- CBCentralManagerDelegate Protocol 委托协议相关分析
总体概述 CBCentralManagerDelegate 协议中定义了一系列方法列表,这些方法是委托对象必须要实现的方法(也有可选择的),当中央管理器的相应变化就会调用委托对象中实现的相应方法. M ...
- C# Common Keyword II
[C# Common Keyword II] 1.as 运算符用于在兼容的引用类型之间执行某些类型的转换. class csrefKeywordsOperators { class Base { pu ...
- 一个word小技巧
最近在进行word格式重拍的时候发现了一个有些恶心的事,怎么去匹配文档里面所有的中文呢? 后来通过网络搜索发现了答案,在word中的查找和替换中有一个选项,可以使用通配符进行匹配. 当我们使用 ([一 ...
- 【HDU2138】How many prime numbers
[题目大意] 给n个数判断有几个素数.(每个数<=2^32) 注意多组数据 [题解] 用Rabin_Miller测试跑得飞快... /************* HDU 2138 by chty ...
- shell if,case,for,while语法
#shell if的语法 if [空格 xxx 空格] then echo xxxxx exit 1/2/3/4/.... 0表示正确. elif [空格 xxx 空格] then echo xxxx ...
- Linux 下启动两个tomcat
Linux 下启动两个tomcat 闲来无事学习nginx,想要配置个load balance.可是先决条件是:得有两个web容器.两个电脑是不用想了.只能想办法在一个机器上启动两个tomcat.原以 ...