Configuration File Settings and Command-Line Options Mapping

The following table maps the configuration file settings and the related mongod and mongos command-line options.

Configuration File Setting mongod and mongos Command-Line Options
auditLog.destination mongod --auditDestinationmongos --auditDestination
auditLog.filter mongod --auditFiltermongos --auditFilter
auditLog.format mongod --auditFormatmongos --auditFormat
auditLog.path mongod --auditPathmongos --auditPath
cloud.monitoring.free.state mongod --enableFreeMonitoring
cloud.monitoring.free.tags mongod --freeMonitoringTag
net.bindIp mongod --bind_ipmongos --bind_ip
net.bindIpAll mongod --bind_ip_allmongos --bind_ip_all
net.compression.compressors mongod --networkMessageCompressorsmongos --networkMessageCompressors
net.ipv6 mongod --ipv6mongos --ipv6
net.maxIncomingConnections mongod --maxConnsmongos --maxConns
net.port mongod --portmongos --port
net.serviceExecutor mongod --serviceExecutormongos --serviceExecutor
net.tls.allowConnectionsWithoutCertificates mongod --tlsAllowConnectionsWithoutCertificatesmongos --tlsAllowConnectionsWithoutCertificates
net.tls.allowInvalidCertificates mongod --tlsAllowInvalidCertificatesmongos --tlsAllowInvalidCertificates
net.tls.allowInvalidHostnames mongod --tlsAllowInvalidHostnamesmongos --tlsAllowInvalidHostnames
net.tls.CAFile mongod --tlsCAFilemongos --tlsCAFile
net.tls.clusterCAFile mongod --tlsClusterCAFilemongos --tlsClusterCAFile
net.tls.certificateSelector mongod --tlsCertificateSelectormongos --tlsCertificateSelector
net.tls.clusterCertificateSelector mongod --tlsClusterCertificateSelectormongos --tlsClusterCertificateSelector
net.tls.clusterFile mongod --tlsClusterFilemongos --tlsClusterFile
net.tls.clusterPassword mongod --tlsClusterPasswordmongos --tlsClusterPassword
net.tls.CRLFile mongod --tlsCRLFilemongos --tlsCRLFile
net.tls.disabledProtocols mongod --tlsDisabledProtocolsmongos --tlsDisabledProtocols
net.tls.FIPSMode mongod --tlsFIPSModemongos --tlsFIPSMode
net.tls.mode mongod --tlsModemongos --tlsMode
net.tls.certificateKeyFile mongod --tlsCertificateKeyFilemongos --tlsCertificateKeyFile
net.tls.certificateKeyFilePassword mongod --tlsCertificateKeyFilePasswordmongos --tlsCertificateKeyFilePassword
net.ssl.sslOnNormalPorts mongod --sslOnNormalPortsmongos --sslOnNormalPorts
net.unixDomainSocket.enabled mongod --nounixsocketmongos --nounixsocket
net.unixDomainSocket.filePermissions mongod --filePermissionsmongos --filePermissions
net.unixDomainSocket.pathPrefix mongod --unixSocketPrefixmongos --unixSocketPrefix
net.wireObjectCheck
operationProfiling.mode mongod --profile
operationProfiling.slowOpSampleRate mongod --slowOpSampleRatemongos --slowOpSampleRate
operationProfiling.slowOpThresholdMs mongod --slowmsmongos --slowms
processManagement.fork mongod --forkmongos --fork
processManagement.pidFilePath mongod --pidfilepathmongos --pidfilepath
processManagement.timeZoneInfo mongod --timeZoneInfomongos --timeZoneInfo
processManagement.windowsService.description mongod.exe --serviceDescriptionmongos.exe --serviceDescription
processManagement.windowsService.displayName mongod.exe --serviceDisplayNamemongos.exe --serviceDisplayName
processManagement.windowsService.serviceName mongod.exe --serviceNamemongos.exe --serviceName
processManagement.windowsService.servicePassword mongod.exe --servicePasswordmongos.exe --servicePassword
processManagement.windowsService.serviceUser mongod.exe --serviceUsermongos.exe --serviceUser
replication.enableMajorityReadConcern mongod --enableMajorityReadConcern
replication.localPingThresholdMs mongos --localThreshold
replication.oplogSizeMB mongod --oplogSize
replication.replSetName mongod --replSet
security.authorization mongod --authmongod --noauth
security.clusterAuthMode mongod --clusterAuthModemongos --clusterAuthMode
security.enableEncryption mongod --enableEncryption
security.encryptionCipherMode mongod --encryptionCipherMode
security.encryptionKeyFile mongod --encryptionKeyFile
security.javascriptEnabled mongod --noscriptingmongos --noscripting
security.keyFile mongod --keyFilemongos --keyFile
security.kmip.clientCertificateFile mongod --kmipClientCertificateFile
security.kmip.clientCertificatePassword mongod --kmipClientCertificatePassword
security.kmip.clientCertificateSelector mongod --kmipClientCertificateSelector
security.kmip.connectRetries mongod --kmipConnectRetries
security.kmip.connectTimeoutMS mongod --kmipConnectTimeoutMS
security.kmip.keyIdentifier mongod --kmipKeyIdentifier
security.kmip.port mongod --kmipPort
security.kmip.rotateMasterKey mongod --kmipRotateMasterKey
security.kmip.serverCAFile mongod --kmipServerCAFile
security.kmip.serverName mongod --kmipServerName
security.ldap.authz.queryTemplate mongod --ldapAuthzQueryTemplate
security.ldap.bind.method mongod --ldapBindMethodmongos --ldapBindMethod
security.ldap.bind.queryPassword mongod --ldapQueryPasswordmongos --ldapQueryPassword
security.ldap.bind.queryUser mongod --ldapQueryUsermongos --ldapQueryUser
security.ldap.bind.saslMechanisms mongod --ldapBindSaslMechanismsmongos --ldapBindSaslMechanisms
security.ldap.bind.useOSDefaults mongod --ldapBindWithOSDefaultsmongos --ldapBindWithOSDefaults
security.ldap.servers mongod --ldapServersmongos --ldapServers
security.ldap.timeoutMS mongod --ldapTimeoutMSmongos --ldapTimeoutMS
security.ldap.transportSecurity mongod --ldapTransportSecuritymongos --ldapTransportSecurity
security.ldap.userToDNMapping mongod --ldapUserToDNMappingmongos --ldapUserToDNMapping
security.redactClientLogData mongod --redactClientLogDatamongos --redactClientLogData
security.sasl.hostName mongod --setParameter saslHostName=...mongos --setParameter saslHostName=...
security.sasl.saslauthdSocketPath mongod --setParameter saslauthdPath=...mongos --setParameter saslauthdPath=...
security.sasl.serviceName mongod --setParameter saslServiceName=...mongos --setParameter saslServiceName=...
security.transitionToAuth mongod --transitionToAuthmongos --transitionToAuth
setParameter mongod --setParametermongos --setParameter
sharding.archiveMovedChunks mongod --moveParanoiamongod --noMoveParanoia
sharding.clusterRole mongod --shardsvrmongod --configsvr
sharding.configDB mongos --configdb
snmp.disabled mongod --snmp-disabled
snmp.master mongod --snmp-master
snmp.subagent mongod --snmp-subagent
storage.dbPath mongod --dbpath
storage.directoryPerDB mongod --directoryperdb
storage.engine mongod --storageEngine
storage.inMemory.engineConfig.inMemorySizeGB mongod --inMemorySizeGB
storage.journal.commitIntervalMs mongod --journalCommitInterval
storage.journal.enabled mongod --journalmongod --nojournal
storage.syncPeriodSecs mongod --syncdelay
storage.wiredTiger.collectionConfig.blockCompressor mongod --wiredTigerCollectionBlockCompressor
storage.wiredTiger.engineConfig.cacheSizeGB mongod --wiredTigerCacheSizeGB
storage.wiredTiger.engineConfig.directoryForIndexes mongod --wiredTigerDirectoryForIndexes
storage.wiredTiger.engineConfig.journalCompressor mongod --wiredTigerJournalCompressor
storage.wiredTiger.indexConfig.prefixCompression mongod --wiredTigerIndexPrefixCompression
systemLog.component.accessControl.verbosity mongod --setParameter "logComponentVerbosity={accessControl: ... }"mongos --setParameter "logComponentVerbosity={accessControl: ... }"
systemLog.component.command.verbosity mongod --setParameter "logComponentVerbosity={command: ... }"mongos --setParameter "logComponentVerbosity={command: ... }"
systemLog.component.control.verbosity mongod --setParameter "logComponentVerbosity={control: ... }"mongos --setParameter "logComponentVerbosity={control: ... }"
systemLog.component.ftdc.verbosity mongod --setParameter "logComponentVerbosity={ftdc: ... }"mongos --setParameter "logComponentVerbosity={ftdc: ... }"
systemLog.component.geo.verbosity mongod --setParameter "logComponentVerbosity={geo: ... }"mongos --setParameter "logComponentVerbosity={geo: ... }"
systemLog.component.index.verbosity mongod --setParameter "logComponentVerbosity={index: ... }"mongos --setParameter "logComponentVerbosity={index: ... }"
systemLog.component.network.verbosity mongod --setParameter "logComponentVerbosity={network: ... }"mongos --setParameter "logComponentVerbosity={network: ... }"
systemLog.component.query.verbosity mongod --setParameter "logComponentVerbosity={query: ... }"mongos --setParameter "logComponentVerbosity={query: ... }"
systemLog.component.replication.heartbeats.verbosity mongod --setParameter "logComponentVerbosity={replication: {heartbeats: ... }}"mongos --setParameter "logComponentVerbosity={replication: {heartbeats: ... }}"
systemLog.component.replication.rollback.verbosity mongod --setParameter "logComponentVerbosity={replication: {rollback: ... }}"mongos --setParameter "logComponentVerbosity={replication: {rollback: ... }}"
systemLog.component.replication.verbosity mongod --setParameter "logComponentVerbosity={replication: ... }"mongos --setParameter "logComponentVerbosity={replication: ... }"
systemLog.component.sharding.verbosity mongod --setParameter "logComponentVerbosity={sharding: ... }"mongos --setParameter "logComponentVerbosity={sharding: ... }"
systemLog.component.storage.journal.verbosity mongod --setParameter "logComponentVerbosity={storage: {journal: ... }}"mongos --setParameter "logComponentVerbosity={storage: {journal: ... }}"
systemLog.component.storage.recovery.verbosity mongod --setParameter "logComponentVerbosity={storage: {recovery: ... }}"mongos --setParameter "logComponentVerbosity={storage: {recovery: ... }}"
systemLog.component.storage.verbosity mongod --setParameter "logComponentVerbosity={storage: ... }"mongos --setParameter "logComponentVerbosity={storage: ... }"
systemLog.component.write.verbosity mongod --setParameter "logComponentVerbosity={write: ... }"mongos --setParameter "logComponentVerbosity={write: ... }"
systemLog.destination mongod --logpathmongos --logpathmongod --syslogmongos --syslog
systemLog.logAppend mongod --logappendmongos --logappend
systemLog.logRotate mongod --logRotatemongos --logRotate
systemLog.path mongod --logpathmongos --logpath
systemLog.quiet mongod --quietmongos --quiet
systemLog.syslogFacility mongod --syslogFacilitymongos --syslogFacility
systemLog.timeStampFormat mongod --timeStampFormatmongos --timeStampFormat
systemLog.traceAllExceptions mongod --traceExceptions
systemLog.verbosity mongod --verbosemongos --verbose

ChangeLog

  • Starting in version 4.4:

    MongoDB removes the --noIndexBuildRetry command-line option and the corresponding storage.indexBuildRetry option.

  • Starting in version 4.2:

    MongoDB removes the deprecated MMAPv1 storage engine and the MMAPv1-specific configuration options:Removed Configuration File SettingRemoved Command-line Optionstorage.mmapv1.journal.commitIntervalMs storage.mmapv1.journal.debugFlags``mongod --journalOptions``storage.mmapv1.nsSize``mongod --nssize``storage.mmapv1.preallocDataFiles``mongod --noprealloc``storage.mmapv1.quota.enforced``mongod --quota``storage.mmapv1.quota.maxFilesPerDB``mongod --quotaFiles``storage.mmapv1.smallFiles``mongod --smallfiles``storage.repairPath``mongod --repairpath``replication.secondaryIndexPrefetch``mongod --replIndexPrefetchFor earlier versions of MongoDB, refer to the corresponding version of the manual. For example:https://docs.mongodb.com/v4.0https://docs.mongodb.com/v3.6https://docs.mongodb.com/v3.4

    参见

原文 - Configuration File Settings and Command-Line Options Mapping

Copyright © 上海锦木信息技术有限公司 all right reserved,powered by Gitbook文件修订时间: 2020-12-18 11:34:57

results matching ""

    No results matching ""