Mongo dB Parameters

Source: Internet
Author: User


Tool introduction:
Mongo command line Client tool.
Mongod Database Service Program.
Mongodump database backup program.
Export export data export tool.
Program Files gridfs tool, built-in Distributed File System
Mongoimport data import tool.
Mongorestore database recovery tool.
Mongos data sharding program, supporting horizontal data Scaling
Mongostat Monitoring Program
Mongosniff
 
Mongod details:
[Root @ localhost bin]./mongod -- Help

Allowed options:

General options:
-H [-- help] Show this usage information
-- Version show version information
-F [-- config] Arg configuration file specifying additional options
-- Port Arg specify port number
-- Bind_ip Arg local IP address to bind listener-all local IPS
Bound by default
-V [-- verbose] Be more verbose (include multiple times for more
Verbosity e.g.-vvvvv)
-- Dbpath Arg (=/data/DB/) directory for datafiles specifies the data storage directory
-- Quiet quieter output silent mode
-- Logpath Arg file to send all output to instead of stdout specifies the log storage directory
-- Logappend appnd to logpath instead of over-writing specifies whether to append or overwrite a log file.
-- Fork server process is run by creating a sub-process
-- CPU periodically show CPU and iowait utilization periodically displays CPU and IO usage
-- Noauth run without security run in No Authentication Mode
-- Auth run with Security Authentication Mode
-- Objcheck inspect client data for validity on receipt check the validity of client input data
-- Quota enable dB Quota Management
-- Quotafiles Arg number of files allower per dB, requires -- quota specifies the number of files allowed by each database
-- Initialize rvpath Arg root directory for the babble app Server
-- Nocursors diagnostic/debugging option debug diagnostic options
-- Nohints ignore query hints ignore query hit rate
-- Nohttpinterface disable HTTP interface: Disable the HTTP interface. The default value is 28017.
-- Noscripting disable scripting engine shut down the Script Engine
-- Noprealloc disable data file preallocation disable database file size pre-allocation
-- Smallfiles use a smaller default file size
-- Nssize Arg (= 16). Ns file size (in MB) for new databases default size of the NS file in the new database
-- Diaglog Arg 0 = off 1 = W 2 = R 3 = both 7 = W + some reads: Read-only, write-only, or read/write, or the primary write + part Read mode
-- Sysinfo print some diagnostic system information print system diagnostic information
-- Upgrade DB if needed update the database if necessary
-- Repair run repair on all DBS fix all databases
-- Notablescan do not allow table scans does not run table Scan
-- Syncdelay Arg (= 60) seconds between disk syncs (0 for never) the time when the system refreshes the disk synchronously. The default value is 60 s.

Replication options:
-- Master mode master replication Mode
-- Slave mode slave replication Mode
-- Source Arg when slave: Specify master as <server: Port> when it is a slave, specify the Master Address and Port
-- Only Arg when slave: specify a single database to replicate when it is set to slave, specify a single database to be copied from the master
-- Pairwith Arg address of server to pair
-- Arbiter Arg address of arbiter server arbitration server, used in master and pair
-- Autoresync automatically Resync if Slave Data is stale automatically synchronize Slave Data
-- Oplogsize Arg size limit (in MB) for OP log specifies the size of the operation log
-- Opidmem Arg size limit (in bytes) for in memory storage of OP IDs specifies the memory size for storing operation logs.

Sharding options:
-- Configsvr declare this is a Config dB of a cluster specifies the configuration server in the shard.
-- Shardsvr declare this is a shard dB of a cluster specified shard Server

 

Usage Details:

Before starting MongoDB, we must create a directory to store MongoDB data and logs.

[Root @ localhost bin] #./mongod -- dbpath =/data/Mongo/bestlovesky -- logpath =/data/log/-- logappend &
 

 

Check whether MongoDB is started:
[Root @ localhost bin] # ps-Ef | grep mongod
Root 2533 2271 0 00:00:00 pts/0 bin/mongod -- dbpath =/data/Mongo/bestlovesky -- logpath =/data/log/-- logappend
Root 2541 2271 0 00:00:00 pts/0 grep mongod
 

Check whether the MongoDB port is enabled. The default value is 28017. when starting the server, you can use -- port to specify

[Root @ localhost bin] # netstat-an-T | grep 28017
TCP 0 0 0.0.0.0: 28017 0.0.0.0: * listen
 

This proves that MongoDB has been started successfully.

The method for disabling is simple:
Killall mongod or kill [pid]

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.