Created
February 18, 2014 17:33
-
-
Save tychoish/9075644 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
title: Enable authentication on each component in the cluster. | |
stepnum: 2 | |
ref: enable-auth | |
pre: | |
Enable authentication by specifying the key file on each | |
:program:`mongos` and :program:`mongod` in the cluster, including each | |
config server and shard. On each, specify the key file by doing one of | |
the following: | |
action: | |
- heading: Specify the key file in the configuration file. | |
pre: | |
In the configuration file, set the :setting:`keyFile` option to the | |
key file's path and then start the component, as in the following | |
example: | |
language: cfg | |
code: | | |
keyFile = /srv/mongodb/keyfile | |
- heading: Specify the key file at runtime. | |
pre: | |
When starting the component, set the :option:`--keyFile <mongos --keyFile>` | |
option, which is an option for both :program:`mongos` | |
instances and :program:`mongod` instances. Set the | |
:option:`--keyFile <mongos --keyFile>` to the key file's path. The | |
:setting:`keyFile` setting implies :setting:`auth`, which means in | |
most cases you do not need to set :setting:`auth` explicitly. | |
--- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
lines 8 and 14 in the example above