@@ -174,11 +174,17 @@ insert a record in the ``test`` :term:`collection` of the default
174
174
MongoDB as a Windows Service
175
175
----------------------------
176
176
177
- .. versionadded:: 2.1.1
177
+ .. versionadded:: 2.0
178
178
179
179
Setup MongoDB as a :guilabel:`Windows Service`, so that the database
180
180
will start automatically following each reboot cycle.
181
181
182
+ .. note::
183
+
184
+ :program:`mongod.exe` added support for running as a Windows
185
+ service in version 2.0, and :program:`mongos.exe` added support for
186
+ running as a windows service in version 2.1.1.
187
+
182
188
Configure the System
183
189
~~~~~~~~~~~~~~~~~~~~
184
190
@@ -197,7 +203,7 @@ Service: a path for the log output (i.e. :setting:`logpath`) and a
197
203
198
204
.. code-block:: powershell
199
205
200
- echo logpath=C:\mongodb\log > C:\mongodb\mongodb .cfg
206
+ echo logpath=C:\mongodb\log > C:\mongodb\mongod .cfg
201
207
202
208
While these optional steps are optional, using the configuration file,
203
209
and creating a specific location for log files are good practice.
@@ -221,8 +227,15 @@ Run all of the following commands in :guilabel:`Command Shell` with
221
227
222
228
.. code-block:: powershell
223
229
224
- C:\mongodb\bin\mongod.exe --config C:\mongodb\mongodb.cfg --install
230
+ C:\mongodb\bin\mongod.exe --config C:\mongodb\mongod.cfg --install
231
+
232
+ Modify the path to the ``monogd.cfg`` file as needed. For the
233
+ ``--install`` option to succeed, you *must* specify a
234
+ :setting:`logpath` setting or the :option:`--logpath <mongod --logpath>`
235
+ run-time option.
225
236
237
+ .. TODO fix --install link once mongod.exe manual page exists.
238
+
226
239
#. To run the MongoDB Service:
227
240
228
241
.. code-block:: powershell
0 commit comments