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带 ...
随机推荐
- Tkinter简易教程
支持python的常见GUI工具包: Tkinter 使用Tk平台 很容易得到 半标准 wxpython 基于wxWindows.跨平台越来越流行 Python Win 只能在Windows上使用 使 ...
- CentOS7.6安装稳定版Nginx
官网地址:http://nginx.org/en/linux_packages.html#RHEL-CentOS 需先安装依赖:sudo yum install -y yum-utils 安装开始: ...
- jquery制作滚动条到一定位置触发
$(function(){ var nav=$(".nav"); //得到导航对象 var win=$(window); //得到窗口对象 var sc=$(document);/ ...
- Arduino教程资料汇总(8月22日悄悄跟新了一下)
http://www.geek-workshop.com/thread-985-1-1.html 本帖最后由 迷你强 于 2013-8-31 12:36 编辑 =====F-101 arduino基础 ...
- linux系统构架 - LB集群之LVS介绍
LB 集群是 load balance 集群的简写,翻译成中文就是负载均衡集群.常用的负载均衡开源软件有 nginx.lvs.keepalived ,商业的硬件负载设备 F5.Netscale. LB ...
- python:while 语句的使用方法
while语句: count = 0 while True: print(count) count += 1 if count == 10: break 实例: 计算n!,若:n = 5:则:n! = ...
- 3DMAX导出FBX的烘焙动画选项
勾选了 [烘焙动画]选项时,表示由骨骼动画塌陷为逐帧动画,这样的结果就是:导出的动画确保是正确的,但体积增大,这是骨骼动画与逐帧去画的区别所在. 如果不勾选此选项,则导出的是骨骼动画,可能出现一些问题 ...
- 服务器意外重启导致storm报错的问题处理
解决方法 cat /opt/storm-0.8.2/conf/storm.yaml中找到storm.local.dir设定的目录,备份supervisor和workers两个文件夹,#nohup su ...
- Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
在Apache的配置文件 httpd.conf 中开启 LoadModule headers_module modules/mod_headers.so 即可解决这个问题.
- 新手C#ListView使用记录2018.08.03
在使用C#的ListView时,感觉有一些部分需要自己注意. ListView1.Clear()这条指令在使用时,用于Click后在ListView中显示数据,应该放在输入数据的前面. 在ListVi ...