Skip to content

Commit 9bc95fe

Browse files
authored
DOCSP-36043 adds mongod --dbpath --logpath example to install docs (#6117)
* adds mongod --dbpath --logpath example to install docs * adds missing --fork
1 parent 6c9dde0 commit 9bc95fe

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

source/tutorial/install-mongodb-on-os-x.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ MongoDB as a macOS service, as doing so sets the correct system
204204

205205
brew services stop mongodb-community@{+version+}
206206

207-
- To run MongoDB (i.e. the :binary:`~bin.mongod` process) **manually
208-
as a background process**, run:
207+
- To run :binary:`~bin.mongod` **manually as a background process**
208+
using a config file, run:
209209

210210
- For macOS running Intel processors:
211211

@@ -220,6 +220,14 @@ MongoDB as a macOS service, as doing so sets the correct system
220220

221221
mongod --config /opt/homebrew/etc/mongod.conf --fork
222222

223+
- To run ``mongod`` **manually as a background process** specifying
224+
:option:`--dbpath <mongod --dbpath>` and :option:`--logpath
225+
<mongod --logpath>` on the command line, run:
226+
227+
.. code-block:: bash
228+
229+
mongod --dbpath /path/to/dbdir --logpath /path/to/mongodb.log --fork
230+
223231
To stop a :binary:`~bin.mongod` running as a background process,
224232
connect to the :binary:`~bin.mongod` using :mongosh:`mongosh </>`,
225233
and issue the :dbcommand:`shutdown` command as needed.

0 commit comments

Comments
 (0)