【MongoDB】3.0 配置文件相关介绍

概述:
在启动mongod和mongos时可以通过配置文件来启动控制实例。
该配置文件包含的设置同等于mongod和mongos命令选项。

使用配置文件管理mongod和mongos更容易,特别是对于大规模部署。
还可以在配置文件中添加注释来解释服务器设置选项。

使用配置文件:
要启动mongod和mongos时使用配置文件,通过–config或者-f选项指定配置文件。
例:
mongod –config /etc/mongod.conf    //–config可以用-f替代
mongos –config /etc/mongos.conf

文件格式:
Mongodb的配置文件使用YAML格式。
注意:YAML不接受tab,请使用空格代替。

官方地址介绍:点击跳转。

#此处为配置文件可配置的内容
#Mongod config file 
#MongoDB configuration files use the YAML format.
#The following example configuration file contains several mongod settings.
#
########Example Start########
#systemLog:
#   destination: file
#   path: "/var/log/mongodb/mongodb.log"
#   logAppend: true
#storage:
#   journal:
#      enabled: true
#processManagement:
#   fork: true
#net:
#   bindIp: 127.0.0.1
#   port: 27017
#setParameter:
#   enableLocalhostAuthBypass: false
#
########Example End########
#
########Core Options
systemLog:
#   verbosity: 0    #Default: 0; 1 to 5 increases the verbosity level to include Debug messages.
#   quiet: <boolean>
#   traceAllException: <boolean>
#   syslogFacility: user
   path: "/usr/local/mongodb/log/mongod.log"
   logAppend: true
#   logRotate: <string>    #rename or reopen
   destination: file
#   timeStampFormat: iso8601-local
#   component:
#      accessControl:
#         verbosity: 0
#      command:
#         verbosity: 0
#      # COMMENT additional component verbosity settings omitted for brevity
#      storage:
#         verbosity: 0
#         journal:
#            verbosity: <int>
#      write:
#         verbosity: 0
#
#
########ProcessManagement Options
processManagement:
   fork: true
   pidFilePath: "/usr/local/mongodb/log/mongod.pid"
#
#
#########Net Options
net:
   port: 27017
#   bindIp: <string>    #Default All interfaces.
#   maxIncomingConnections: 65536
#   wireObjectCheck: true
#   ipv6: false
#   unixDomainSocket:
#      enabled: true
#      pathPrefix: "/tmp"
#      filePermissions: 0700
#   http:
#      enabled: false
#      JSONPEnabled: false
#      RESTInterfaceEnabled: false
#   ssl:
#      sslOnNormalPorts: <boolean>  # deprecated since 2.6
#      mode: <string>
#      PEMKeyFile: <string>
#      PEMKeyPassword: <string>
#      clusterFile: <string>
#      clusterPassword: <string>
#      CAFile: <string>
#      CRLFile: <string>
#      allowConnectionsWithoutCertificates: <boolean>
#      allowInvalidCertificates: <boolean>
#      allowInvalidHostnames: false
#      FIPSMode: <boolean>
#
#
########security Options
#security:
#   keyFile: <string>
#   clusterAuthMode: keyFile
#   authorization: disable
#   javascriptEnabled:  true
########security.sasl Options
#   sasl:
#      hostName: <string>
#      serviceName: <string>
#      saslauthdSocketPath: <string>
#
#
#########setParameter Option
setParameter:
   enableLocalhostAuthBypass: false
#   <parameter1>: <value1>
#   <parameter2>: <value2>
#
#
#########storage Options
storage:
   dbPath: "/data/db"
#   indexBuildRetry: true
#   repairPath: "/data/db/_tmp"
#   journal:
#      enabled: true
#   directoryPerDB: false
#   syncPeriodSecs: 60
   engine: "mmapv1"  #Valid options include mmapv1 and wiredTiger.
#########storage.mmapv1 Options
#   mmapv1:
#      preallocDataFiles: true
#      nsSize: 16
#      quota:
#         enforced: false
#         maxFilesPerDB: 8
#      smallFiles: false
#      journal:
#         debugFlags: <int>
#         commitIntervalMs: 100   # 100 or 30
#########storage.wiredTiger Options
#   wiredTiger:
#      engineConfig:
#         cacheSizeGB: <number>  #Default: the maximum of half of physical RAM or 1 gigabyte
#         statisticsLogDelaySecs: 0
#         journalCompressor: "snappy"
#         directoryForIndexes: false
#      collectionConfig:
#         blockCompressor: "snappy"
#      indexConfig:
#         prefixCompression: true
#
#
##########operationProfiling Options
#operationProfiling:
#   slowOpThresholdMs: 100
#   mode: "off"
#
#
##########replication Options
#replication:
#   oplogSizeMB: <int>
#   replSetName: <string>
#   secondaryIndexPrefetch: all
#
#
##########sharding Options
#sharding:
#   clusterRole: <string>    #configsvr or shardsvr
#   archiveMovedChunks: True
#
#
#########auditLog Options
#auditLog:
#   destination: <string>   #syslog/console/file
#   format: <string>   #JSON/BSON
#   path: <string>
#   filter: <string>
#
#
#########snmp Options
#snmp:
#   subagent: <boolean>
#   master: <boolean>
#
#
########mongos-only Options
#replication:
#   localPingThresholdMs: 15
#
#sharding:
#   autoSplit: true
#   configDB: <string>
#   chunkSize: 64
#
#
########Windows Service Options
#processManagement:
#   windowsService:
#      serviceName: <string>
#      displayName: <string>
#      description: <string>
#      serviceUser: <string>
#      servicePassword: <string>
时间: 2024-08-30 02:23:44

【MongoDB】3.0 配置文件相关介绍的相关文章

MongoDB 3.0 配置文件

之前版本的配置文件就几句,现在MongoDB 3.0 内核鸟枪换炮了,效率随之大大提升.兴奋....今天我就着手准备部署到服务器上.下载安装,配置文件片段是YAML格式的如下: systemLog: destination: file path: "/var/log/mongodb/mongodb.log" logAppend: true storage: journal: enabled: true processManagement: fork: true net: bindIp:

(转)MongoDB 3.0 WT引擎参考配置文件

mongodb 3.0 改变很多,从2.6版本升级到3.0要关注的细节很多,如权限等等.3.0在数据存储引擎上更换成了wiredTiger,在数据压缩方面很有效,解决大数据量问题的情况下,磁盘不够用的问题. mongodb 3.0 配置文件采用的是YAML格式,只能使用空格,不支持tab键. 单实例 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 systemLog: dest

MongoDB 3.0 关于安全认证后使用C#调用碰上“System.TimeoutException”类型的异常在 MongoDB.Driver.Core.dll 中发生的相关问题

"System.TimeoutException"类型的异常在 MongoDB.Driver.Core.dll 中发生,但未在用户代码中进行处理 操作MongoDB类库版本: ---------------------------------------------- MongoDB.Driver 2.3 MongoDB.Driver.Core 2.3 MongoDB.Bson 2.3 MongoDB 版本 3.0 连接字符串的相关变化: -----------------------

SpringMVC相关介绍

基于注解的SpringMVC的相关介绍 SpringMVC是一个基于DispatcherServlet的MVC框架,每一个请求最先访问的都是DispatcherServlet,DispatcherServlet负责转发每一个Request请求给相应的Handler,Handler处理以后再返回相应的视图(View)和模型(Model),返回的视图和模型都可以不指定,即可以只返回Model或只返回View或都不返回.在使用注解的SpringMVC中,处理器Handler是基于@Controller

[译]MongoDB 3.0发布说明

原文来自:http://docs.mongodb.org/manual/release-notes/3.0/ 2015年3月3日 MongoDB 3.0现已可供使用.关键新特性包括支持WiredTiger存储引擎,插件化存储引擎API,SCRAM-SHA-1身份验证机制,以及改进的explain功能. MongoDB运维管理器(MongoDB Ops Manager),包括自动化,备份,监控现在可供使用.查看运维管理器和运维管理器发布说明以获取更多内容. 小版本发布 3.0.1 - 2015年3

Android基础入门教程——10.10 传感器专题(1)——相关介绍

Android基础入门教程--10.10 传感器专题(1)--相关介绍 标签(空格分隔): Android基础入门教程 1.传感器相关介绍: 说到传感器,相信大家都不会陌生吧,比如微信的摇一摇就用到了加速度传感器: 传感器的定义:一种物理设备或者生物器官,能够探测.感受外界的信号,物理条件(如光,热, 适度)或化学组成(如烟雾),并将探知的信息传递给其他的设备或者器官! 传感器的种类:可以从不同的角度对传感器进行划分,转换原理(传感器工作的基本物理或化学 效应):用途:输出信号以及制作材料和工艺

3.Struts2配置文件标签介绍

Struts2的很多核心功能都是由拦截器实现的. struts-default.xml中定义了这些拦截器与Result类型. 所以,不继承struts-default包,Struts2提供的很多核心功能是无法使用的. 1.package标签 配置包时必须指定name属性,该属性值可以任意取名,但必须唯一. 其与Java的类包间无对应关系.若其他包要继承该包,则必须通过该属性进行引用. 包的namespace属性用于定义该包的命名空间. 命名空间是访问该包下Action的路径的一部分. 此属性可以

oracle的环境配置-oracle的相关介绍

Oracle的相关介绍: 1.Oracle数据库软件--安装OS上的2.软件的获取路径,商务销售策略.3.数据库版本:9i--10%                      10g--65%                      11g--25%--新建的系统常见               12c--最新版本 8i--Internet   9i   10g--gird compute--10gR2-oracle 10g relaease 10.2.0.x   11g           

Hadoop 2.4.0新特性介绍

在2014年4月7日,Apache发布了Hadoop 2.4.0 .相比于hadoop 2.3.0,这个版本有了一定的改进,突出的变化可以总结为下列几点(官方文档说明): 1 支持HDFS访问控制列表(ACL,Access Control Lists) 这个特性解决了在一定情况下,文件权限访问的权限问题.其机制是基于Linux文件访问权限的特征,如果你熟悉Linux的文件访问机制,你就不用再去理解HDFS文件访问的特性了. 有了ACL特性后,对HDFS文件系统就具有了良性的扩展特性.HDFS-4