@@ -26,7 +26,7 @@ a package for your operating system, you likely already have a
26
26
configuration file located at ``/etc/mongodb.conf``. Confirm this by
27
27
checking the content of the ``/etc/init.d/mongod`` or
28
28
``/etc/rc.d/mongod`` script to insure that the :term:`control scripts
29
- <control script>` start the :program:` mongod` with the appropriate
29
+ <control script>` start the :binary:`~bin. mongod` with the appropriate
30
30
configuration file (see below.)
31
31
32
32
To start MongoDB instance using this configuration issue a command in
@@ -63,7 +63,7 @@ configuration. It makes several assumptions, but consider the
63
63
following explanation:
64
64
65
65
- :setting:`fork` is ``true``, which enables a
66
- :term:`daemon` mode for :program:` mongod`, which detaches (i.e. "forks")
66
+ :term:`daemon` mode for :binary:`~bin. mongod`, which detaches (i.e. "forks")
67
67
the MongoDB from the current session and allows you to run the
68
68
database as a conventional server.
69
69
@@ -93,21 +93,21 @@ following explanation:
93
93
- :setting:`dbpath` is ``/srv/mongodb``, which
94
94
specifies where MongoDB will store its data files. ``/srv/mongodb``
95
95
and ``/var/lib/mongodb`` are popular locations. The user account
96
- that :program:` mongod` runs under will need read and write access to this
96
+ that :binary:`~bin. mongod` runs under will need read and write access to this
97
97
directory.
98
98
99
99
- :setting:`logpath` is ``/var/log/mongodb/mongod.log``
100
- which is where :program:` mongod` will write its output. If you do not set
101
- this value, :program:` mongod` writes all output to standard output
100
+ which is where :binary:`~bin. mongod` will write its output. If you do not set
101
+ this value, :binary:`~bin. mongod` writes all output to standard output
102
102
(e.g. ``stdout``.)
103
103
104
104
- :setting:`logappend` is ``true``, which ensures that
105
- :program:` mongod` does not overwrite an existing log file
105
+ :binary:`~bin. mongod` does not overwrite an existing log file
106
106
following the server start operation.
107
107
108
108
- :setting:`journal` is ``true``, which enables :term:`journaling <journal>`.
109
109
Journaling ensures single instance write-durability. 64-bit builds
110
- of :program:` mongod` enable journaling by default. Thus, this
110
+ of :binary:`~bin. mongod` enable journaling by default. Thus, this
111
111
setting may be redundant.
112
112
113
113
Given the default configuration, some of these values may be
@@ -120,7 +120,7 @@ Security Considerations
120
120
-----------------------
121
121
122
122
The following collection of configuration options are useful for
123
- limiting access to a :program:` mongod` instance. Consider the
123
+ limiting access to a :binary:`~bin. mongod` instance. Consider the
124
124
following:
125
125
126
126
.. code-block:: cfg
@@ -169,7 +169,7 @@ among all members of the set. Consider the following:
169
169
replSet = set0
170
170
171
171
Use descriptive names for sets. Once configured use the
172
- :program:` mongo` shell to add hosts to the replica set.
172
+ :binary:`~bin. mongo` shell to add hosts to the replica set.
173
173
174
174
.. seealso:: :ref:`Replica set reconfiguration <replica-set-reconfiguration-usage>`.
175
175
@@ -185,7 +185,7 @@ following option:
185
185
Setting :setting:`keyFile` enables authentication and specifies a key
186
186
file for the replica set member use to when authenticating to each
187
187
other. The content of the key file is arbitrary, but must be the same
188
- on all members of the :term:`replica set` and :program:` mongos`
188
+ on all members of the :term:`replica set` and :binary:`~bin. mongos`
189
189
instances that connect to the set. The keyfile must be less than one
190
190
kilobyte in size and may only contain characters in the base64 set and
191
191
the file must not have group or "world" permissions on UNIX systems.
@@ -205,7 +205,7 @@ following option:
205
205
Sharding Configuration
206
206
~~~~~~~~~~~~~~~~~~~~~~
207
207
208
- Sharding requires a number of :program:` mongod` instances with
208
+ Sharding requires a number of :binary:`~bin. mongod` instances with
209
209
different configurations. The config servers store the cluster's
210
210
metadata, while the cluster distributes data among one or more shard
211
211
servers.
@@ -216,7 +216,7 @@ servers.
216
216
sets <replica set>`.
217
217
218
218
To set up one or three "config server" instances as :ref:`normal
219
- <base-config>` :program:` mongod` instances, and then add the following
219
+ <base-config>` :binary:`~bin. mongod` instances, and then add the following
220
220
configuration option:
221
221
222
222
.. code-block:: cfg
@@ -229,9 +229,9 @@ configuration option:
229
229
This creates a config server running on the private IP address
230
230
``10.8.0.12`` on port ``27001``. Make sure that there are no port
231
231
conflicts, and that your config server is accessible from all of your
232
- ":program:` mongos`" and ":program:` mongod`" instances.
232
+ ":binary:`~bin. mongos`" and ":binary:`~bin. mongod`" instances.
233
233
234
- To set up shards, configure two or more :program:` mongod` instance
234
+ To set up shards, configure two or more :binary:`~bin. mongod` instance
235
235
using your :ref:`base configuration <base-config>`, adding the
236
236
:setting:`shardsvr` setting:
237
237
@@ -240,7 +240,7 @@ using your :ref:`base configuration <base-config>`, adding the
240
240
shardsvr = true
241
241
242
242
Finally, to establish the cluster, configure at least one
243
- :program:` mongos` process with the following settings:
243
+ :binary:`~bin. mongos` process with the following settings:
244
244
245
245
.. code-block:: cfg
246
246
@@ -251,7 +251,7 @@ You can specify multiple :setting:`configdb` instances by
251
251
specifying hostnames and ports in the form of a comma separated
252
252
list. In general, avoid modifying the :setting:`chunkSize` from
253
253
the default value of 64, [#chunksize]_ and *should* ensure this setting is consistent
254
- among all :program:` mongos` instances.
254
+ among all :binary:`~bin. mongos` instances.
255
255
256
256
.. [#chunksize] :term:`Chunk` size is 64 megabytes by default, which
257
257
provides the ideal balance between the most even distribution of
@@ -264,10 +264,10 @@ among all :program:`mongos` instances.
264
264
Running Multiple Database Instances on the Same System
265
265
------------------------------------------------------
266
266
267
- In many cases running multiple instances of :program:` mongod` on a
267
+ In many cases running multiple instances of :binary:`~bin. mongod` on a
268
268
single system is not recommended. On some types of deployments
269
269
[#multimongod]_ and for testing purposes you may need to run more than
270
- one :program:` mongod` on a single system.
270
+ one :binary:`~bin. mongod` on a single system.
271
271
272
272
In these cases, use a :ref:`base configuration <base-config>` for each
273
273
instance, but consider the following configuration values:
@@ -278,11 +278,11 @@ instance, but consider the following configuration values:
278
278
pidfilepath = /srv/mongodb/db0.pid
279
279
280
280
The :setting:`dbpath` value controls the location of the
281
- :program:` mongod` instance's data directory. Ensure that each database
281
+ :binary:`~bin. mongod` instance's data directory. Ensure that each database
282
282
has a distinct and well labeled data directory. The
283
- :setting:`pidfilepath` controls where :program:` mongod` process
283
+ :setting:`pidfilepath` controls where :binary:`~bin. mongod` process
284
284
places it's :term:`process id <pid>` file. As this tracks the specific
285
- :program:` mongod` file, it is crucial that file be unique and well
285
+ :binary:`~bin. mongod` file, it is crucial that file be unique and well
286
286
labeled to make it easy to start and stop these processes.
287
287
288
288
Create additional :term:`control scripts <control script>` and/or
@@ -291,14 +291,14 @@ needed to control these processes.
291
291
292
292
.. [#multimongod] Single-tenant systems with :term:`SSD` or other high
293
293
performance disks may provide acceptable performance levels for
294
- multiple :program:` mongod` instances. Additionally, you may find that
294
+ multiple :binary:`~bin. mongod` instances. Additionally, you may find that
295
295
multiple databases with small working sets may function acceptably
296
296
on a single system.
297
297
298
298
Diagnostic Configurations
299
299
-------------------------
300
300
301
- The following configuration options control various :program:` mongod`
301
+ The following configuration options control various :binary:`~bin. mongod`
302
302
behaviors for diagnostic purposes. The following settings have default
303
303
values that tuned for general production purposes:
304
304
@@ -327,7 +327,7 @@ needed:
327
327
has a value, queries are not profiled.
328
328
329
329
- :setting:`verbose` enables a verbose logging mode that
330
- modifies :program:` mongod` output and increases logging to include a
330
+ modifies :binary:`~bin. mongod` output and increases logging to include a
331
331
greater number of events. Only use this option if you are
332
332
experiencing an issue that is not reflected in the normal logging
333
333
level. If you require additional verbosity, consider the following
@@ -347,13 +347,13 @@ needed:
347
347
- :setting:`diaglog` enables :term:`diagnostic logging <diagnostic log>`. Level ``3``
348
348
logs all read and write options.
349
349
350
- - :setting:`objcheck` forces :program:` mongod` to validate all
350
+ - :setting:`objcheck` forces :binary:`~bin. mongod` to validate all
351
351
requests from clients upon receipt. Use this option to ensure that
352
352
invalid requests are not causing errors, particularly when running a
353
353
database with untrusted clients. This option may affect database
354
354
performance.
355
355
356
- - :setting:`cpu` forces :program:` mongod` to report the percentage of
356
+ - :setting:`cpu` forces :binary:`~bin. mongod` to report the percentage of
357
357
the last interval spent in :term:`write-lock`. The interval is
358
358
typically 4 seconds, and each output line in the log includes both
359
359
the actual interval since the last report and the percentage of
0 commit comments