diff options
Diffstat (limited to 'debian/mongo.1')
-rw-r--r-- | debian/mongo.1 | 401 |
1 files changed, 206 insertions, 195 deletions
diff --git a/debian/mongo.1 b/debian/mongo.1 index daff93bb7c8..87523a98768 100644 --- a/debian/mongo.1 +++ b/debian/mongo.1 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH "MONGO" "1" "October 03, 2013" "2.4" "mongodb-manual" +.TH "MONGO" "1" "March 18, 2014" "2.6" "mongodb-manual" .SH NAME mongo \- MongoDB Shell . @@ -39,8 +39,8 @@ operations directly with the database. \fBmongo\fP also provides a fully functional JavaScript environment for use with a MongoDB. This document addresses the basic invocation of the \fBmongo\fP shell and an overview of its usage. -.SH INTERFACE -.SS Options +.SH OPTIONS +.SS Core Options .INDENT 0.0 .TP .B mongo @@ -48,25 +48,23 @@ and an overview of its usage. .INDENT 0.0 .TP .B \-\-shell -Enables the shell interface after evaluating a \fIJavaScript\fP file. -If you invoke the \fBmongo\fP command and specify a JavaScript -file as an argument, or use \fI\%--eval\fP to specify -JavaScript on the command line, the \fI\%--shell\fP option -provides the user with a shell prompt after the file finishes -executing. +Enables the shell interface. If you invoke the \fBmongo\fP command +and specify a JavaScript file as an argument, or use \fI\%\-\-eval\fP to +specify JavaScript on the command line, the \fI\%\-\-shell\fP option +provides the user with a shell prompt after the file finishes executing. .UNINDENT .INDENT 0.0 .TP .B \-\-nodb -Prevents the shell from connecting to any database instances. Later, -to connect to a database within the shell, see +Prevents the shell from connecting to any database instances. Later, to +connect to a database within the shell, see \fImongo\-shell\-new\-connections\fP\&. .UNINDENT .INDENT 0.0 .TP .B \-\-norc -Prevents the shell from sourcing and evaluating -\fB~/.mongorc.js\fP on start up. +Prevents the shell from sourcing and evaluating \fB~/.mongorc.js\fP on +start up. .UNINDENT .INDENT 0.0 .TP @@ -77,177 +75,60 @@ Silences output from the shell during the connection process. .TP .B \-\-port <port> Specifies the port where the \fBmongod\fP or \fBmongos\fP -instance is listening. Unless specified \fBmongo\fP connects -to \fBmongod\fP instances on port \fB27017\fP, which is the default -\fBmongod\fP port. +instance is listening. If \fI\-\-port\fP is not specified, +\fBmongo\fP attempts to connect to port \fB27017\fP\&. .UNINDENT .INDENT 0.0 .TP .B \-\-host <hostname> -specifies the host where the \fBmongod\fP or \fBmongos\fP is running to -connect to as \fB<hostname>\fP\&. By default \fBmongo\fP will attempt -to connect to a MongoDB process running on the localhost. +Specifies the name of the host machine where the \fBmongod\fP or +\fBmongos\fP is running. If this is not specified, +\fBmongo\fP attempts to connect to a MongoDB process running on +the localhost. .UNINDENT .INDENT 0.0 .TP .B \-\-eval <javascript> -Evaluates a JavaScript expression specified as an argument to this -option. \fBmongo\fP does not load its own environment when evaluating -code: as a result many options of the shell environment are not -available. +Evaluates a JavaScript expression that is specified as an argument. +\fBmongo\fP does not load its own environment when evaluating code. +As a result many options of the shell environment are not available. .UNINDENT .INDENT 0.0 .TP -.B \-\-username <username>, \-u <username> -Specifies a username to authenticate to the MongoDB instance. -Use in conjunction with the -\fI\-\-password\fP option to supply a password. -If you specify a username and password but the default database -or the specified database do not require authentication, -\fBmongo\fP will exit with an exception. +.B \-\-username <username>, \-u +Specifies a username with which to authenticate to a MongoDB database +that uses authentication. Use in conjunction with the \fB\-\-password\fP and +\fB\-\-authenticationDatabase\fP options. .UNINDENT .INDENT 0.0 .TP -.B \-\-password <password>, \-p <password> -Specifies a password to authenticate to the MongoDB instance. -Use in conjunction with the -\fI\-\-username\fP option to supply a username. If you -specify a \fI\-\-username\fP and do not pass an argument to the -\fI\-\-password\fP option, \fBmongo\fP will prompt for a -password interactively, if the \fBmongod\fP or -\fBmongos\fP requires authentication. -.sp -If you chose not to provide an argument so that \fBmongo\fP -will prompt for a password, \fI\-\-password\fP must be the last -option. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-authenticationDatabase <dbname> -New in version 2.4. - -.sp -Specifies the database that holds the user\(aqs (e.g -\fI\-\-username\fP) credentials. -.sp -By default, \fBmongo\fP assumes that the database name specified -in the \fI\%db address\fP holds the user\(aqs -credentials, unless you specify \fI\-\-authenticationDatabase\fP\&. -.sp -See \fBuserSource\fP, -http://docs.mongodb.org/manual/reference/privilege\-documents and -http://docs.mongodb.org/manual/reference/user\-privileges for more information about -delegated authentication in MongoDB. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-authenticationMechanism <name> -New in version 2.4. - -.sp -Specifies the authentication mechanism. By default, the -authentication mechanism is \fBMONGODB\-CR\fP, which is the MongoDB -challenge/response authentication mechanism. In MongoDB Enterprise, -\fBmongo\fP also includes support for \fBGSSAPI\fP to handle -Kerberos authentication. -.sp -See http://docs.mongodb.org/manual/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication -for more information about Kerberos authentication. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-ssl -Enable connection to a \fBmongod\fP or -\fBmongos\fP that has SSL encryption. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-sslPEMKeyFile <filename> -New in version 2.4. - -.sp -\fBNOTE:\fP -.INDENT 7.0 -.INDENT 3.5 -The \fI\%default distribution of MongoDB\fP does \fBnot\fP contain support -for SSL. To use SSL you can either compile MongoDB with SSL support -or use MongoDB Enterprise\&. See http://docs.mongodb.org/manual/tutorial/configure\-ssl for -more information about SSL and MongoDB. -.UNINDENT -.UNINDENT -.sp -Specifies the \fB\&.pem\fP file that contains both the SSL -certificate and key. Specify the file name of the \fB\&.pem\fP -file using relative or absolute paths -.sp -Required when using the \fI\-\-ssl\fP option if the -\fBmongod\fP or \fBmongos\fP has \fBsslCAFile\fP -enabled \fIwithout\fP \fBsslWeakCertificateValidation\fP\&. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-sslPEMKeyPassword <value> -New in version 2.4. - -.sp -\fBNOTE:\fP -.INDENT 7.0 -.INDENT 3.5 -The \fI\%default distribution of MongoDB\fP does \fBnot\fP contain support -for SSL. To use SSL you can either compile MongoDB with SSL support -or use MongoDB Enterprise\&. See http://docs.mongodb.org/manual/tutorial/configure\-ssl for -more information about SSL and MongoDB. -.UNINDENT -.UNINDENT -.sp -Specifies the password to decrypt the root certificate chain -specified by \fI\-\-sslPEMKeyFile\fP\&. -.sp -Only required if the certificate\-key file is encrypted. -.UNINDENT -.INDENT 0.0 -.TP -.B \-\-sslCAFile <filename> -New in version 2.4. - -.sp -\fBNOTE:\fP -.INDENT 7.0 -.INDENT 3.5 -The \fI\%default distribution of MongoDB\fP does \fBnot\fP contain support -for SSL. To use SSL you can either compile MongoDB with SSL support -or use MongoDB Enterprise\&. See http://docs.mongodb.org/manual/tutorial/configure\-ssl for -more information about SSL and MongoDB. -.UNINDENT -.UNINDENT -.sp -Specifies the \fB\&.pem\fP file that contains the certificate from -the Certificate Authority. Specify the file name of the \fB\&.pem\fP -file using relative or absolute paths +.B \-\-password <password>, \-p +Specifies a password with which to authenticate to a MongoDB database +that uses authentication. Use in conjunction with the \fB\-\-username\fP and +\fB\-\-authenticationDatabase\fP options. .UNINDENT .INDENT 0.0 .TP .B \-\-help, \-h -Returns a basic help and usage text. +Returns information on \fBmongo\fP options and usage. .UNINDENT .INDENT 0.0 .TP .B \-\-version -Returns the version of the shell. +Returns the \fBmongo\fP release number. .UNINDENT .INDENT 0.0 .TP .B \-\-verbose -Increases the verbosity of the output of the shell during the -connection process. +Increases the verbosity of the output of the shell during the connection +process. .UNINDENT .INDENT 0.0 .TP .B \-\-ipv6 -Enables IPv6 support that allows \fBmongo\fP to connect -to the MongoDB instance using an IPv6 network. All MongoDB programs -and processes, including \fBmongo\fP, disable IPv6 -support by default. +Enables IPv6 support, which allows \fBmongo\fP to connect to the MongoDB +instance using an IPv6 network. All MongoDB programs and processes, +including \fBmongo\fP, disable IPv6 support by default. .UNINDENT .INDENT 0.0 .TP @@ -266,10 +147,10 @@ mongo admin .UNINDENT .sp The above command will connect the \fBmongo\fP shell to the -\fIadmin database\fP on the local machine. You may specify a -remote database instance, with the resolvable hostname or IP -address. Separate the database name from the hostname using a -\fB/\fP character. See the following examples: +\fIadmin database\fP on the local machine. You may specify a remote +database instance, with the resolvable hostname or IP address. Separate +the database name from the hostname using a \fB/\fP character. See the +following examples: .INDENT 7.0 .INDENT 3.5 .sp @@ -286,17 +167,17 @@ mongo 10.8.8.10/test .INDENT 0.0 .TP .B <file.js> -Specifies a JavaScript file to run and then exit. -Generally this should be the last option specified. +Specifies a JavaScript file to run and then exit. Generally this should +be the last option specified. .INDENT 7.0 .INDENT 3.5 .SS Optional .sp To specify a JavaScript file to execute \fIand\fP allow \fBmongo\fP to prompt you for a password using -\fI\-\-password\fP, pass the filename as the first parameter -with \fI\-\-username\fP and \fI\-\-password\fP s the last -options as in the following: +\fI\-\-password\fP, pass the filename as the first parameter with +\fI\-\-username\fP and \fI\-\-password\fP as the last options, as +in the following: .INDENT 0.0 .INDENT 3.5 .sp @@ -310,19 +191,145 @@ mongo file.js \-\-username username \-\-password .UNINDENT .UNINDENT .sp -Use the \fI\%--shell\fP option to return to a shell after the -file finishes running. +Use the \fI\%\-\-shell\fP option to return to a shell after the file +finishes running. .UNINDENT -.SS Files +.SS Authentication Options +.INDENT 0.0 +.TP +.B \-\-authenticationDatabase <dbname> +New in version 2.4. + .sp -\fB~/.dbshell\fP +Specifies the database that holds the user\(aqs credentials. +If you do not specify an authentication database, \fBmongo\fP assumes +that the database specified as the argument to the \fI\-\-db\fP option +holds the user\(aqs credentials. +.UNINDENT .INDENT 0.0 -.INDENT 3.5 +.TP +.B \-\-authenticationMechanism <name> +New in version 2.4. + +.sp +Specifies the authentication mechanism. By default, the authentication +mechanism is \fBMONGODB\-CR\fP, which is the MongoDB challenge/response +authentication mechanism. In MongoDB Enterprise, \fBmongo\fP also includes +support for \fBGSSAPI\fP to handle Kerberos authentication. See +http://docs.mongodb.org/manual/tutorial/control\-access\-to\-mongodb\-with\-kerberos\-authentication +for more information about Kerberos authentication. +.UNINDENT +.SS SSL Options +.INDENT 0.0 +.TP +.B \-\-ssl +New in version 2.6. + +.sp +Enables connection to a \fBmongod\fP or \fBmongos\fP that has +SSL support enabled. +.sp +The default distribution of MongoDB does not contain support for SSL. +For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-sslPEMKeyFile <filename> +New in version 2.6. + +.sp +Specifies the \fB\&.pem\fP file that contains both the SSL certificate +and key. Specify the file name of the \fB\&.pem\fP file using relative +or absolute paths. +.sp +This option is required when using the \fI\-\-ssl\fP option to connect +to a \fBmongod\fP or \fBmongos\fP that has +\fBsslCAFile\fP enabled \fIwithout\fP +\fBsslWeakCertificateValidation\fP\&. +.sp +The default distribution of MongoDB does not contain support for SSL. +For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-sslPEMKeyPassword <value> +New in version 2.6. + +.sp +Specifies the password to de\-crypt the certificate\-key file (i.e. +\fI\-\-sslPEMKeyFile\fP). Use \fI\-\-sslPEMKeyPassword\fP only if +the certificate\-key file is encrypted. In all cases, \fBmongo\fP will +redact the password from all logging and reporting output. +.sp +If the private key in the PEM file is encrypted and you do not specify +\fI\-\-sslPEMKeyPassword\fP, \fBmongo\fP will prompt for a passphrase. +See \fIssl\-certificate\-password\fP\&. +.sp +The default distribution of MongoDB does not contain support for SSL. +For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-sslCAFile <filename> +New in version 2.6. + +.sp +Specifies the \fB\&.pem\fP file that contains the root certificate chain +from the Certificate Authority. Specify the file name of the +\fB\&.pem\fP file using relative or absolute paths. +.sp +The default distribution of MongoDB does not contain support for SSL. +For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-sslCRLFile <filename> +New in version 2.6. + +.sp +Specifies the \fB\&.pem\fP file that contains the Certificate Revocation +List. Specify the file name of the \fB\&.pem\fP file using relative or +absolute paths. +.sp +The default distribution of MongoDB does not contain support for SSL. +For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-sslFIPSMode +New in version 2.6. + +.sp +Directs \fBmongo\fP to use the FIPS mode of the installed OpenSSL +library. Your system must +have a FIPS compliant OpenSSL library to use \fI\-\-sslFIPSMode\fP\&. +.sp +The default distribution of MongoDB does not contain support for SSL. +For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-sslAllowInvalidCertificates +New in version 2.6. + +.sp +Bypasses the validation checks for server certificates and allows +the use of invalid certificates. When using the +\fBsslAllowInvalidCertificates\fP setting, MongoDB logs as a +warning the use of the invalid certificate. +.sp +The default distribution of MongoDB does not contain support for SSL. +For more information on MongoDB and SSL, see http://docs.mongodb.org/manual/tutorial/configure\-ssl\&. +.UNINDENT +.SH FILES +.INDENT 0.0 +.TP +.B \fB~/.dbshell\fP \fBmongo\fP maintains a history of commands in the \fB\&.dbshell\fP file. .sp \fBNOTE:\fP -.INDENT 0.0 +.INDENT 7.0 .INDENT 3.5 \fBmongo\fP does not recorded interaction related to authentication in the history file, including @@ -331,7 +338,7 @@ authentication in the history file, including .UNINDENT .sp \fBWARNING:\fP -.INDENT 0.0 +.INDENT 7.0 .INDENT 3.5 Versions of Windows \fBmongo.exe\fP earlier than 2.2.0 will save the \fI\&.dbshell\fP file in the \fBmongo.exe\fP working @@ -339,45 +346,49 @@ directory. .UNINDENT .UNINDENT .UNINDENT -.UNINDENT -.sp -\fB~/.mongorc.js\fP .INDENT 0.0 -.INDENT 3.5 +.TP +.B \fB~/.mongorc.js\fP \fBmongo\fP will read the \fB\&.mongorc.js\fP file from the home directory of the user invoking \fBmongo\fP\&. In the file, users can define variables, customize the \fBmongo\fP shell prompt, or update information that they would like updated every time they launch a shell. If you use the shell to evaluate a JavaScript file -or expression either on the command line with \fI\%--eval\fP or +or expression either on the command line with \fI\%\-\-eval\fP or by specifying \fI\%a .js file to mongo\fP, \fBmongo\fP will read the \fB\&.mongorc.js\fP file \fIafter\fP the JavaScript has finished processing. .sp -Specify the \fI\%--norc\fP option to disable +Specify the \fI\%\-\-norc\fP option to disable reading \fB\&.mongorc.js\fP\&. .UNINDENT -.UNINDENT -.sp -\fB/tmp/mongo_edit\fI<time_t>\fP\&.js\fP .INDENT 0.0 -.INDENT 3.5 -Created by \fBmongo\fP when editing a file. If the file -exists \fBmongo\fP will append an integer from \fB1\fP to \fB10\fP to the +.TP +.B \fB/etc/mongorc.js\fP +Global \fBmongorc.js\fP file which the \fBmongo\fP shell +evaluates upon start\-up. If a user also has a \fB\&.mongorc.js\fP +file located in the \fI\%HOME\fP directory, the \fBmongo\fP +shell evaluates the global \fB/etc/mongorc.js\fP file \fIbefore\fP +evaluating the user\(aqs \fB\&.mongorc.js\fP file. +.sp +\fB/etc/mongorc.js\fP must have read permission for the user +running the shell. The \fI\%\-\-norc\fP option for \fBmongo\fP +suppresses only the user\(aqs \fB\&.mongorc.js\fP file. +.sp +On Windows, the global \fBmongorc.js </etc/mongorc.js>\fP exists +in the \fB%ProgramData%\eMongoDB\fP directory. +.TP +.B \fB/tmp/mongo_edit\fI<time_t>\fP\&.js\fP +Created by \fBmongo\fP when editing a file. If the file exists, +\fBmongo\fP will append an integer from \fB1\fP to \fB10\fP to the time value to attempt to create a unique file. +.TP +.B \fB%TEMP%mongo_edit\fI<time_t>\fP\&.js\fP +Created by \fBmongo.exe\fP on Windows when editing a file. If +the file exists, \fBmongo\fP will append an integer from \fB1\fP +to \fB10\fP to the time value to attempt to create a unique file. .UNINDENT -.UNINDENT -.sp -\fB%TEMP%mongo_edit\fI<time_t>\fP\&.js\fP -.INDENT 0.0 -.INDENT 3.5 -Created by \fBmongo.exe\fP on Windows when editing a file. -If the file -exists \fBmongo\fP will append an integer from \fB1\fP to \fB10\fP to -the time value to attempt to create a unique file. -.UNINDENT -.UNINDENT -.SS Environment +.SH ENVIRONMENT .INDENT 0.0 .TP .B EDITOR @@ -762,6 +773,6 @@ the additional JavaScript required to generate this output. .SH AUTHOR MongoDB Documentation Project .SH COPYRIGHT -2011-2013, MongoDB, Inc. +2011-2014, MongoDB, Inc. .\" Generated by docutils manpage writer. . |