Mongodb startup parameter Generaloptions: general option-h [-- help] showthisusageinformation displays this usage information -- versionshowversioninformation displays the version information-f [-- config] argconfigurationfilespecifyingadditionaloptions parameter specified in the configuration file
Mongodb startup parameters General options: general options-h [-- help] show this usage information display this usage information -- version show version information display version information-f [-- config] arg configuration file specifying additional options parameter configuration file the
Mongodb startup parameters
General options:
General options
-H [-- help] show this usage information
Display this usage information
-- Version show version information
Show version information
-F [-- config] arg configuration file specifying additional options
Other options specified in the parameter configuration file: www.2cto.com
-V [-- verbose] be more verbose (include multiple times for more verbosity e.g.-vvvvv)
More detailed (including multiple times to obtain more details, such as-vvvvv)
-- Quiet quieter output
Quiet output
-- Port arg specify port number
Port number specified by the Parameter
-- Bind_ip arg comma separated list of ip addresses to listen on-all local ips by default
IP addresses used for listening in the list separated by commas-all local IP addresses by default
-- MaxConns arg max number of simultaneous connections
Maximum number of simultaneous connections
-- Logpath arg log file to send write to instead of stdout-has to be a file, not directory
Log File that replaces stdout-a file instead of a directory
-- Logappend append to logpath instead of over-writing
Append the log, instead of overwriting the previous
-- Pidfilepath arg full path to pidfile (if not set, no pidfile is created)
Complete path of the pid file (if not set, do not create the pid file)
-- KeyFile arg private key for cluster authentication (only for replica sets)
Private Key for cluster authentication (only valid for replica sets)
-- UnixSocketPrefix arg alternative directory for UNIX domain sockets (defaults to/tmp)
Replace the UNIX domain socket directory (default:/tmp directory)
-- Fork server process
Create a server process to start
-- Auth run with security
Run in Safe Mode
-- Cpu periodically show cpu and iowait utilization
Regular display of CPU and iowait utilization rate www.2cto.com
-- Dbpath arg directory for datafiles
Data File directory
-- Diaglog arg 0 = off 1 = W 2 = R 3 = both 7 = W + some reads
-- Directoryperdb each database will be stored in a separate directory
Each database will be stored in a separate directory
-- Journal enable journaling
Allow debugging
-- JournalOptions arg journal diagnostic options
Debug diagnostic options
-- Ipv6 enable IPv6 support (disabled by default)
Enable IPv6 support (disabled by default)
-- Jsonp allow JSONP access via http (has security implications)
Allow JSONP access over HTTP (with security risks)
-- Noauth run without security
Run in non-secure mode
-- Nohttpinterface disable http interface
Disable HTTP interface
-- Noprealloc disable data file preallocation-will often hurt performance
Disabling data file pre-allocation often compromises performance
-- Noscripting disable scripting engine www.2cto.com
Disable Script Engine
-- Notablescan do not allow table scans
Table scan not allowed
-- Nounixsocket disable listening on unix sockets
Disable listening for Unix sockets
-- Nssize arg (= 16). ns file size (in MB) for new databases
Size of the. ns file of the new database (unit: MB ).
-- Objcheck inspect client data for validity on receept
Check the validity of the data received from the client
-- Profile arg 0 = off 1 = slow, 2 = all
-- Quota limits each database to a certain number of files (8 default)
Limit the number of files in each database (default value: 8)
-- QuotaFiles arg number of files allower per db, requires -- quota
The maximum number of files in each database. The -- quota parameter is required.
-- Rest turn on simple rest api
Open other simple APIs www.2cto.com
-- Repair run repair on all dbs
Fix all databases at startup
-- Repairpath arg root directory for repair files-defaults to dbpath
The root directory of the repaired file-taken from the -- dbpath parameter by default
-- Slowms arg (= 100) value of slow for profile and console log
Log delay to profile and terminal in milliseconds
-- Smallfiles use a smaller default file size
Use a small default file size
-- Syncdelay arg (= 60) seconds between disk syncs (0 = never, but not recommended)
The number of seconds between synchronization and disk (default: 60 seconds) (0 = never, but not recommended)
-- Sysinfo print some diagnostic system information
Print some diagnostic system information
-- Upgrade db if needed
Upgrade the database.
Replication options:
Copy Option
-- Fastsync indicate that this instance is starting from a dbpath snapshot of the repl peer
Indicates that this instance starts from a REPL same DBPATH snapshot.
-- Autoresync automatically resync if slave data is stale
If the data from the slave node is outdated, it will be automatically re-synchronized.
-- OplogSize arg size limit (in MB) for op log
Operation Log Size (unit: MB)
Master/slave options:
Master/Slave option www.2cto.com
-- Master mode
Master Mode
-- Slave mode
Slave Mode
-- Source arg when slave: specify master
When it is a slave node: specify the location of the master node
-- Only arg when slave: specify a single database to replicate
When it is a slave node: Specify the database to be copied, not all copies
-- Slavedelay arg specify delay (in seconds) to be used when applying master ops to slave
Specifies the latency (in seconds) for synchronizing the oplog of the master node from the slave node)
Replica set options:
Option of replica settings
-- ReplSet arg is [/ ]
Sharding options:
Shard option www.2cto.com
-- Configsvr declare this is a config db of a cluster; default port 27019; default dir/data/configdb
Declare that this is the configuration server of a cluster; default port 27019; default directory/data/configdb
-- Shardsvr declare this is a shard db of a cluster; default port 27018
Declare that this is a sharded server of a cluster; default port: 27018
-- NoMoveParanoia turn off paranoid saving of data for moveChunk. this is on by default for now, but default will switch