根据官网的提示内容,默认的配置文件内容为

  

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格式的配置文件的更多相关文章

  1. Go 处理yaml类型的配置文件

    先说一下,这里用到了很多关于反射类型的功能,可能刚开始看代码,如果对反射不熟悉的可能会不是非常清晰,但是同时也是为了更好的理解golang中的反射,同时如果后面想在代码中可以直接从我的git地址get ...

  2. mongodb3.2配置文件yaml格式 详解

    mongodb3.x版本后就是要yaml语法格式的配置文件,下面是yaml配置文件格式如下:官方yaml配置文件选项参考:https://docs.mongodb.org/manual/ ... #c ...

  3. yaml格式配置文件

    YAML 是一种可读性非常高,与程序语言数据结构非常接近.同时具备丰富的表达能力和可扩展性,并且易于使用的数据标记语言. python中处理 Yaml 格式的数据需要先下载pyyaml: pip in ...

  4. golang使用yaml格式解析构建配置文件

    现在主流的配置文件格式有这么几种,xml.yaml.config…  xml就算了,太挫了,太土, 太繁琐… config 就是mysql,apache my.cnf的那种格式,这个格式适合功能分层, ...

  5. kubernetes yaml格式的Pod配置文件

    kubernetes yaml文件解析 # yaml格式的pod定义文件完整内容: apiVersion: v1 #必选,版本号,例如v1 kind: Pod #必选,Pod metadata: #必 ...

  6. .net core读取json格式的配置文件

    在.Net Framework中,配置文件一般采用的是XML格式的,.NET Framework提供了专门的ConfigurationManager来读取配置文件的内容,.net core中推荐使用j ...

  7. 如何修改geditor的配置文件 -好像geditor没有文本格式的配置文件? 要使用dconf-editor来配置- geditor自己配置编码格式

    好像geditor没有文本格式的配置文件? 好像是通过一个程序, 叫 dconf-editor 来配置geditor的? 以前是通过gconf-editor来配置的, 但是gconf-editor的配 ...

  8. Unity3D可以查看YAML格式的场景文件,采用Notepad++

    在Editor Settings 将Asset Serialization 的 mode设置成Force Text,否则不能查看YAML格式! Unity圣典描述:Textual Scene File ...

  9. Fiddler插件---将Mapi请求自动转为HTTPRunner测试用例(YAML格式)

    背景 继之前鼓捣出了Mapi解密插件之后,在团队内已经使用了三年之久,一跃成为团队最爱欢迎的测试工具之一(加个之一,低调谦虚一点). 随着团队推行HttpRunner搞接口自动化:编写和维护Case带 ...

随机推荐

  1. martin/docker-cleanup-volumes

    https://hub.docker.com/r/martin/docker-cleanup-volumes/

  2. windows兼容方式安装python[转]

    Python 是一门很不错的语言,语言简单易学,又不失脚本语言的灵活性,还有海量的第三方库,覆盖的很全面.但也有不少“硬伤”,比如 Python 2.x 和 Python 3.x 版本之间的不兼容等等 ...

  3. [转] 实现winfrom进度条及进度信息提示,winfrom程序假死处理

    china_xuhua 原文地址 1.方法一:使用线程 功能描述:在用c#做WinFrom开发的过程中.我们经常需要用到进度条(ProgressBar)用于显示进度信息.这时候我们可能就需要用到多线 ...

  4. leetcode384

    public class Solution { private int[] nums; private Random random; public Solution(int[] nums) { thi ...

  5. 利用 Django admin 完成更多任务(转)

    利用 Django admin 完成更多任务   Django admin Django 为未来的开发人员提供了许多功能:一个成熟的标准库,一个活跃的用户社区,以及 Python 语言的所有好处.虽然 ...

  6. Embarcadero RAD Studio 2016 Product Approach and Roadmap

    delphi  2016 路线图 http://community.embarcadero.com/article/news/16211-embarcadero-rad-studio-2016-pro ...

  7. PHP 连接打开新网页带参数

    PHP 连接打开新网页带参数 detail.php?ID=<?PHP echo $row['ID'];?> aa.php?ID=123 取ID参数 $aid=$_GET['ID']; 网页 ...

  8. Remote error: Provider not exported: DataSetProvider1

    Remote error: Provider not exported: DataSetProvider1 是服务端的问题,ServerMethodsUnit1.cpp窗体上添加DataSetProv ...

  9. Spring Boot实践——SpringMVC视图解析

    一.注解说明 在spring-boot+spring mvc 的项目中,有些时候我们需要自己配置一些项目的设置,就会涉及到这三个,那么,他们之间有什么关系呢? 首先,@EnableWebMvc=Web ...

  10. 颜色模式中8位,16位,24位,32位色彩是什么意思?会有什么区别?计算机颜色格式( 8位 16位 24位 32位色)<转>

    颜色模式中8位,16位,24位,32位色彩是什么意思?会有什么区别简单地说这里说的位数和windows系统显示器设置中的颜色位数是一样的.表示的是能够显示出来的颜色的多少. 8位的意思是说,能够显示出 ...