MongoDB Start Command mongod parameter description

Source: Internet
Author: User
Tags auth file size mongodb unix domain socket port number
MongoDB Start Command mongod parameter description
The main parameters of Mongod are:
Basic Configuration
--------------------------------------------------------------------------------
--quiet # Quiet Output--port arg # Specify the service port number, default port 27017--bind_ip ARG # BIND service IP, if binding 127.0.0.1, then only native access, do not specify default local all IP--logpath arg # specify M Ongodb log file, note that the specified file is not a directory--logappend # use the appended way to write the full path of the--pidfilepath ARG # PID file, and if not set, then there are no PID files--keyfile Arg # The private key of the cluster ends Full path, valid only for replica set schema--unixsocketprefix arg # UNIX domain socket replacement directory (default =/tmp)--fork # run MongoDB as daemon, create server process--auth # Enable validation --CPU # Regular CPU utilization and iowait--dbpath ARG # Specify the database path--diaglog arg # diaglog option 0=off 1=w 2=r 3=both 7=w+somereads--direct ORYPERDB # Setting Each database will be saved in a separate directory--journal # enable logging option, MONGODB data operation will be written to journal folder in the file--journaloptions arg # Enable log diagnostics option--ipv6 # enable IPV6 option--jsonp # allow JSONP form over HTTP access (with security impact)--maxconns ARG # maximum simultaneous connections default #--noauth # does not enable authentication--nohttpinterface # Close HTTP connection Ports, default off 27018 port Access--noprealloc # Disable data file pre-allocation (often impacting performance)--noscripting # Disable script engine--notablescan # do not allow table Scan--nounixsocket # Disable UNIX sockets Listen--nssize arg (=16) # Set the message database. ns File Size (MB)--objcheck # on receipt of customer data, check validity,--profile arg # archive parameter 0=off 1=slow, 2=all--quota # limit The number of files per database, set default to 8--quotaFiles arg # Number of files Allower per db, Requires--quota--rest # Open Simple rest API--repair # fix all databases run repair on all DBS --repairpath arg # Fix directory of files generated by the library, default to directory name DBPath--slowms arg (=100) # Value of slow for profile and ConsoleLog--smallfiles # using a smaller default file--syncdelay arg (=60) # data written to disk in seconds (0=never, not recommended)--sysinfo # Print Some diagnostic system Information--upgrade # If you need to upgrade the database  * Replicat On parameter
--------------------------------------------------------------------------------
--fastsync #从一个dbpath里启用从库复制服务, the DBPath database is a snapshot of the main library and can be used to quickly enable synchronization--autoresync # If you synchronize data from the library to the main library with much worse, automatic resynchronization,--oplogsize Arg # Set the size of the Oplog (MB) * Master/slave parameter
--------------------------------------------------------------------------------
--master # Main Library mode--slave # from library mode--source arg # from library port number--only arg # Specifying a single database copy--slavedelay arg # Setting the delay time for synchronizing the main library from the library * replicase T (replica set) option:
--------------------------------------------------------------------------------
--replset ARG # set replica set name *sharding (shard) option
----------------------------------------------------------------------------------Configsvr #声明这是一个集群的config服务, Default port 27019, default directory/data/configdb--shardsvr # Declares this is a clustered shard, default port 27018--nomoveparanoia # off paranoid for movechunk data save # All the above parameters can be written In the mongod.conf configuration document, for example:
DBPath =/data/mongodb LogPath =/data/mongodb/mongodb.log Logappend = True Port = 27017 Fork = True Auth = True
E.g:./mongod-shardsvr-replset Shard1-port 16161-dbpath/data/mongodb/data/shard1a-oplogsize 100-logpath/data/ Mongodb/logs/shard1a.log-logappend-fork-rest


Reprinted from: http://blog.sina.com.cn/s/blog_5c45656c010120wx.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.