Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

MongoDB startup parameters (to be translated)

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

. / mongod-- help

Options:

General options:

-h [--help] show this usage information

-- version show version information

-f [--config] arg configuration file specifying

Additional options

-v [--verbose] [= arg (= v)] be more verbose (include multiple times

For more verbosity e.g.-vvvvv)

-- quiet quieter output

-- port arg specify port number-27017 by default

-- bind_ip arg comma separated list of ip addresses to

Listen on-all local ips by default

-ipv6 enable IPv6 support (disabled by

Default)

-- maxConns arg max number of simultaneous connections

-1000000 by default

-- logpath arg log file to send write to instead of

Stdout-has to be a file, not

Directory

-- syslog log to system's syslog facility instead

Of file or stdout

-- syslogFacility arg syslog facility used for mongodb syslog

Message

-- logappend append to logpath instead of

Over-writing

-- logRotate arg set the log rotation behavior

(rename | reopen)

-- timeStampFormat arg Desired format for timestamps in log

Messages. One of ctime, iso8601-utc or

Iso8601-local

-- pidfilepath arg full path to pidfile (if not set, no

Pidfile is created)

-- keyFile arg private key for cluster authentication

-- noauth run without security

-- setParameter arg Set a configurable parameter

-- httpinterface enable httpinterface

-- clusterAuthMode arg Authentication mode used for cluster

Authentication. Alternatives are

(keyFile | sendKeyFile | sendX509 | x509)

-- nounixsocket disable listening on unix sockets

-- unixSocketPrefix arg alternative directory for UNIX domain

Sockets (defaults to / tmp)

-- filePermissions arg permissions to set on UNIX domain

Socket file-0700 by default

-- fork fork server process

-- auth run with security

-jsonp allow JSONP access via http (has

Security implications)

-- rest turn on simple rest api

-slowms arg (= 100) value of slow for profile and console

Log

-- profile arg 0=off 1=slow, 2=all

-- cpu periodically show cpu and iowait

Utilization

-- sysinfo print some diagnostic system

Information

-- noIndexBuildRetry don't retry any index builds that were

Interrupted by shutdown

-- noscripting disable scripting engine

-- notablescan do not allow table scans

-shutdown kill a running server (for init

Scripts)

Replication options:

-oplogSize arg size to use (in MB) for replication op

Log. Default is 5% of disk space (i.e.

Large is good)

Master/slave options (old; use replica sets instead):

-- master master mode

-- slave slave mode

-- source arg when slave: specify master as

-- only arg when slave: specify a single database

To replicate

-slavedelay arg specify delay (in seconds) to be used

When applying master ops to slave

-- autoresync automatically resync if slave data is

Stale

Replica set options:

-- replSet arg arg is [/]

-replIndexPrefetch arg specify index prefetching behavior (if

Secondary) [none | _ id_only | all]

-- enableMajorityReadConcern enables majority readConcern

Sharding options:

-- configsvr declare this is a config db of a

Cluster; default port 27019; default

Dir / data/configdb

-- configsvrMode arg Controls what config server protocol is

In use. When set to "sccc" keeps server

In legacy SyncClusterConnection mode

Even when the service is running as a

ReplSet

-- shardsvr declare this is a shard db of a

Cluster; default port 27018

SSL options:

-- sslOnNormalPorts use ssl on configured ports

-- sslMode arg set the SSL operation mode

(disabled | allowSSL | preferSSL | requireSSL

)

-- sslPEMKeyFile arg PEM file for ssl

-- sslPEMKeyPassword arg PEM file password

-- sslClusterFile arg Key file for internal SSL

Authentication

-- sslClusterPassword arg Internal authentication key file

Password

-- sslCAFile arg Certificate Authority file for SSL

-- sslCRLFile arg Certificate Revocation List file for

SSL

-- sslDisabledProtocols arg Comma separated list of TLS protocols

To disable [TLS1_0,TLS1_1,TLS1_2]

-- sslWeakCertificateValidation allow client to connect without

Presenting a certificate

-- sslAllowConnectionsWithoutCertificates

Allow client to connect without

Presenting a certificate

-- sslAllowInvalidHostnames Allow server certificates to provide

Non-matching hostnames

-- sslAllowInvalidCertificates allow connections to servers with

Invalid certificates

-- sslFIPSMode activate FIPS 140-2 mode at startup

Storage options:

-- storageEngine arg what storage engine to use-defaults

To wiredTiger if no data files present

-- dbpath arg directory for datafiles-defaults to

/ data/db

-- directoryperdb each database will be stored in a

Separate directory

-- noprealloc disable data file preallocation-will

Often hurt performance

-- nssize arg (= 16) .ns file size (in MB) for new databases

-- quota limits each database to a certain

Number of files (8 default)

-- quotaFiles arg number of files allowed per db, implies

-- quota

-- smallfiles use a smaller default file size

-syncdelay arg (= 60) seconds between disk syncs (0=never

But not recommended)

-- upgrade upgrade db if needed

-- repair run repair on all dbs

-- repairpath arg root directory for repair files

Defaults to dbpath

-- journal enable journaling

-nojournal disable journaling (journaling is on by

Default for 64 bit)

-- journalOptions arg journal diagnostic options

-- journalCommitInterval arg how often to group/batch commit (ms)

WiredTiger options:

-- wiredTigerCacheSizeGB arg maximum amount of memory to allocate

For cache; defaults to 1/2 of physical

RAM

-- wiredTigerStatisticsLogDelaySecs arg (= 0)

Seconds to wait between each write to a

Statistics file in the dbpath; 0 means

Do not log statistics

-- wiredTigerJournalCompressor arg (= snappy)

Use a compressor for log records

[none | snappy | zlib]

-- wiredTigerDirectoryForIndexes Put indexes and data in different

Directories

-- wiredTigerCollectionBlockCompressor arg (= snappy)

Block compression algorithm for

Collection data [none | snappy | zlib]

-wiredTigerIndexPrefixCompression arg (= 1)

Use prefix compression on row-store

Leaf pages

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report