MongoDB Start Command mongod parameter descriptionThe main parameters of Mongod are:Basic Configuration--------------------------------------------------------------------------------
--quiet
# quiet Output
--port Arg
# Specify the service port number, default ports 27017
--BIND_IP Arg
# Bind service IP, if bind 127.0.0.1, can only native access, do n
-mongodb database binaries, often used for backup and recovery operations
Five, build a simple MongoDB server
Create a directory structure
Copy the Mongod file to the bin directory: CP.. /mongod-linux-x86_64-2.6.7/bin/mongod bin/
Create configuration file mongod.conf:1 port = 123452 dbpath = data3
Mongodb Study Notes 06 -- mongod configuration file
In note 01, when mongod is started, the parameter is directly specified through the command line.
Mongod -- dbpath/path/to/database -- logpath/path/to/logfile -- fork -- port 27017
You can specify the configuration file to start, and-f specifies the configuration f
The main parameters of Mongod are:
Basic Configuration
--------------------------------------------------------------------------------
--quiet
# quiet Output
--port Arg
# Specify the service port number, default ports 27017
--BIND_IP Arg
# Bind service IP, if bind 127.0.0.1, can only native access, do not specify default local all IP
--logpath Arg
# Specify the MongoDB log file, n
Problem Description:
使用命令:mongod --config /usr/local/etc/mongod.conf 无法启动mongodb,也不打印任何信息。之前用的都好好的,请问是什么原因呢?
Enter Mongod print:
liudemacbook-air:~ liu$ mongod2016-05-09t15:05:42.632+0800 I CONTROL [Initandlisten] MongoDB starting:pid=867 port=270 dbpath=/data/db 64-bit host=liudemacbook-air.local2016-05-09t15:05:42.633+0800 I CONTROL [Initandlisten] DB versio
D: \> Cd MongoDB
D: \ MongoDB> mongod -- Help
** Note: When Using MongoDB 32 bit, you are limited to about 2 gigabytes of data** See
Http://blog.mongodb.org/post/137788967/32-bit-limitations
** With -- dur, the limit is lower
Allowed options:
General options:-H [-- help] Show this usage information-- Version show version information-F [-- config] Arg configuration file specifying additional options-V [-- verbose] Be more verbose (include multiple time
Tags: mongod nosql yamlIn note 01, the start Mongod is specified directly from the command line. mongod --dbpath /path/to/database --logpath /path/to/logfile --fork --port 27017
You can specify the profile to start,-F to specify the configuration file directory mongod -f
Tags: http io ar os using SP for on fileBasic Configuration----------------------------------------------------------------------------------quiet# Quiet Output--port arg# Specify the service port number, default ports 27017--BIND_IP arg# bind service IP, if bind 127.0.0.1, then only native access, do not specify default local all IP--logpath arg# Specifies the MongoDB log file, note that the specified file is not a directory--logappend# writing the log using the Append method--pidfilepath arg#
To view the Mongodb.log log, the following statement is found in the log:
..............
Mon Mar 317:46:37 [conn148] Assertion:10295:getfile (): Bad file number value (corrupt db?): Run Repair
..............
Translated as: declaration: GetFile (): Incorrect file value (corrupted database. ): Run Repair
After checking the MongoDB documentation, the process is repaired using the following methods:
First stop the Mongod service, delete the Mongodb.lo
(1) To download the MongoDB package, it is easy to find on the MongoDB official website, and then delete the extra stuff, just keep the bin folder, create the Data folder under the directory of the Bin folder sibling, and create the Mongo.log file under the log folder.(2) Administrator open cmd CD to MONGO bin directory, example belowC:\Program files\mongodb\bin>mongod--dbpath "c:\program Files\mongodb\data
1: InstallationGo to MongoDB's official website http://www.mongodb.org/downloads Download 32bit PackageThe following files will appear after decompressionIn the installation of the disk C: Build the MongoDB directory, copy the bin directory to this directory, which is equivalent to the installation of MongoDB related commands.In order to start MongoDB convenient, add the Mongod.exe path to environment variables, computer----Advanced system settings--environment variables, add path in path:This a
:--------------------------------------------------------------------------------
--replset Arg
# set Replica set name
* sharding (Shard) option--------------------------------------------------------------------------------
--configsvr
# Declare this is a clustered config service, default port 27019, default directory/data/configdb
--shardsvr
# Declare this is a clustered shard, default port 27018
--nomovepa
, default port 27019, default directory/data/configdb
--shardsvr
# Declare this to be a cluster fragment, default port 27018
--nomoveparanoia
# off paranoia for movechunk data save
# All of the above parameters can be written to the mongod.conf configuration document for example:
DBPath =/data/mongodbLogPath =/data/mongodb/mongodb.logLogappend = TruePort = 27017Fork = TrueAuth = True
E.g:./
--------------------------------------------------------------------------------
--configsvr
# Declare this is a cluster config service, default port 27019, default directory/data/configdb
--shardsvr
# Declare this to be a cluster fragment, default port 27018
--nomoveparanoia
# off paranoia for movechunk data save
# All of the above parameters can be written to the mongod.conf configuration document for example:
Tags: mongodb basic commandMongoDB Start Command mongod parameter descriptionThe main parameters of Mongod are:Basic Configuration----------------------------------------------------------------------------------quiet# Quiet output--port arg# Specify the service port number, default ports 27017--bind_ip arg# BIND service IP, if bind 127.0.0.1, then only native access, do not specify default local all IP--lo
(replica set) option:----------------------------------------------------------------------------------replsetarg # Set the replica set name* sharding (Shard) option----------------------------------------------------------------------------------CONFIGSVR # Declare this is a clustered config service, default port 27019, default directory/data/configdb--shardsvr # declares that this is a clustered shard, the default port 27018--nomoveparanoia # Turn off paranoid for movechunk data save?# The ab
Tags: data service side assignment bind security SLA sha Nop NoiThe main parameters of Mongod are:Basic Configuration *********************************************
--quiet
# quiet Output
--port Arg
# Specify the service port number, default ports 27017
--BIND_IP Arg
# Bind service IP, if bind 127.0.0.1, can only native access, do not specify default local all IP
--logpath Arg
Issue: MONGO run Error: Failed to connect 127.0.0.1:27017,reason:errno:10061 Unable to connect due to target computer actively rejectingIn the MongoDB installation process encountered problems, first understand the MongoDB installation steps1. Download the corresponding version on the MongoDB website, https://www.mongodb.org/downloads2. Unzip the downloaded file to the C drive or the D packing directory3. Use the cmd command mkdir data to create the data folder under the extracted MongoDB (or cr
In fact, the official has a detailed installation of the tutorial, if strictly according to the official steps will not appear here the error.Initctl: Unknown Task: Mongod This error is the fourth step in the installation process is less "sudo", that is, this stepsudo apt-get install-y mongodb-orgDuring the installation process, because it is already a root user, it omits sudo, causing initctl: Unknown task: Mongo
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.