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带 ...
随机推荐
- Python极其简单的分布式异步作业管理系统RQ入门
Python极其简单的分布式异步作业管理系统RQ入门 原创 2017-08-19 lixing 生信人 Python极其简单的分布式异步作业管理系统RQ入门 1. 什么是Job? Job直译过来就是工 ...
- Spring cloud Eureka高可用 - Windows 7 hosts文件立即生效
hosts 文件所在位置 c:/windows/system32/drivers/etc/hosts 左下角 搜索框 搜索 cmd 弹出命令框 输入 ipconfig /displaydns 显示所有 ...
- 不可能的工作:在FBX模型导入脚本中生成模型的预置体
#if UNITY_EDITOR using System.Collections; using System.Collections.Generic; using System.IO; using ...
- f.lux Ubuntu 下进行安装
这几天在搞Ubuntu 看的是我眼睛特痛,于是查了一下,有Linux 版的f.lux 于是我就行了一番的安装. 步骤 命令行 1. sudo add-apt-r ...
- C++ Assert()函数
assert宏的原型定义在<assert.h>中,其作用是如果它的条件返回错误,则终止程序执行,原型定义: #include <assert.h> void assert( i ...
- iOS常用动画 类封装
//这是一个很好的动画封装类 很容易明白很详细 和大家分享 // CoreAnimationEffect.h // CoreAnimationEffect // // Created by Vince ...
- iOS设计模式(02):单例模式
iOS设计模式(02):单例模式 singleton-design-pattern 什么是单例模式? 单例模式是一个类在系统中只有一个实例对象.通过全局的一个入口点对这个实例对象进行访问.在iOS开发 ...
- CBCentralManager Class 的相关分析
Overview 总体概述 CBCentralManager objects are used to manage discovered or connected remote peripheral ...
- bugfree调试
最近项目用到bugfree ,一直不能用,原来是session目录的文件权限有问题.
- 解决OpenFeign默认无法上传文件的问题
前言 最近在项目中使用OpenFeign时,发现其不支持文件上传功能.网上找了很多资料,最后找到feign-form和feign-form-spring的解决方案.但其默认只支持单文件上传,不支持多文 ...