Skip to content

Commit b612281

Browse files
committed
DOCS-14143,DOCSP-8696,DOCSP-14087 macOS brew conf file location apple silicon
1 parent eac6fac commit b612281

File tree

4 files changed

+87
-56
lines changed

4 files changed

+87
-56
lines changed

source/administration/configuration.txt

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,9 @@ best-practice configurations for common use cases.
2121

2222
While both interfaces provide access to the same collection of options
2323
and settings, this document primarily uses the configuration file
24-
interface. If you installed MongoDB with a package manager such as
25-
``yum`` or ``apt`` on Linux, or ``brew`` on macOS, a default
26-
:doc:`configuration file </reference/configuration-options>` has been
27-
provided as part of your installation:
24+
interface.
2825

29-
- On Linux, a default :file:`/etc/mongod.conf` configuration file is
30-
included when using a package manager to install MongoDB.
31-
32-
- On Windows, a default :file:`<install directory>/bin/mongod.cfg`
33-
configuration file is included during the installation.
34-
35-
- On macOS, a default :file:`/usr/local/etc/mongod.conf`
36-
configuration file is included when installing from MongoDB's
37-
official Homebrew tap.
26+
.. include:: /includes/fact-default-conf-file.rst
3827

3928
For package installations of MongoDB on Linux or macOS, an
4029
initialization script which uses this default configuration file is also
@@ -67,14 +56,14 @@ to create your own configuration file. A
6756
this document. Once you have created a configuration file, you can start
6857
a MongoDB instance with this configuration file by using either the
6958
:option:`--config <mongod --config>` or :option:`-f <mongod --config>`
70-
options to :binary:`~bin.mongod`:
59+
options to :binary:`~bin.mongod`. For example, on Linux:
7160

7261
.. code-block:: sh
7362

7463
mongod --config /etc/mongod.conf
7564
mongod -f /etc/mongod.conf
7665

77-
Modify the values in the ``/etc/mongod.conf`` file on your system to
66+
Modify the values in the ``mongod.conf`` file on your system to
7867
control the configuration of your database instance.
7968

8069
.. _base-config:
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
- If you :doc:`installed MongoDB </installation>` with a package manager
2+
such as ``yum`` or ``apt`` on Linux or ``brew`` on macOS, or with the
3+
MSI installer on Windows, a default :doc:`configuration file
4+
</reference/configuration-options>` has been provided as part of your
5+
installation:
6+
7+
.. list-table::
8+
:header-rows: 1
9+
:widths: 10 25 65
10+
11+
* - Platform
12+
- Method
13+
- Configuration File
14+
15+
* - Linux
16+
- ``apt``, ``yum``, or ``zypper`` Package Manager
17+
- ``/etc/mongod.conf``
18+
19+
* - macOS
20+
- ``brew`` Package Manager
21+
- ``/usr/local/etc/mongod.conf`` (on Intel processors), or
22+
23+
``/opt/homebrew/etc/mongod.conf`` (on `Apple M1 processors
24+
<https://support.apple.com/en-us/HT211814>`__)
25+
26+
* - Windows
27+
- MSI Installer
28+
- ``<install directory>\bin\mongod.cfg``
29+
30+
- If you :doc:`installed MongoDB </installation>` via a downloaded
31+
``TGZ`` or ``ZIP`` file, you will need to create your own configuration
32+
file. The :ref:`basic example configuration <base-config>` is a good
33+
place to start.

source/reference/configuration-options.txt

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,7 @@ Using a configuration file makes managing :binary:`~bin.mongod` and
3131
deployments. You can also add comments to the configuration file to
3232
explain the server's settings.
3333

34-
.. admonition:: Default Configuration File
35-
:class: note
36-
37-
- On Linux, a default :file:`/etc/mongod.conf` configuration file is
38-
included when using a package manager to install MongoDB.
39-
40-
- On Windows, a default :file:`<install directory>/bin/mongod.cfg`
41-
configuration file is included during the installation.
42-
43-
- On macOS, a default :file:`/usr/local/etc/mongod.conf` configuration
44-
file is included when installing from MongoDB's official Homebrew tap.
34+
.. include:: /includes/fact-default-conf-file.rst
4535

4636
File Format
4737
~~~~~~~~~~~

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

Lines changed: 49 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -86,38 +86,26 @@ macOS does not include the Homebrew ``brew`` package by default.
8686
- Install ``brew`` using the official
8787
`Homebrew installation instructions <https://brew.sh/#install>`_.
8888

89-
Tap the MongoDB Homebrew Tap
90-
````````````````````````````
91-
92-
Tap the
93-
`MongoDB Homebrew Tap <https://github.com/mongodb/homebrew-brew>`_ to
94-
download the official Homebrew formulae for MongoDB and the Database
95-
Tools.
96-
97-
- Run the following command in your macOS Terminal:
98-
99-
.. code-block:: sh
100-
101-
brew tap mongodb/brew
102-
10389
.. _install:
10490

10591
Installing MongoDB {+version+} |edition| Edition
10692
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10793

10894
Follow these steps to install MongoDB |edition| Edition using Homebrew's
109-
``brew`` package manager.
95+
``brew`` package manager. Be sure that you have followed the
96+
:ref:`installation prerequisites <osx-prereq>` above before proceeding.
11097

111-
#. Verify that your system meets all the
112-
:ref:`installation prerequisites <osx-prereq>` by running the
98+
#. Tap the `MongoDB Homebrew Tap
99+
<https://github.com/mongodb/homebrew-brew>`_ to download the official
100+
Homebrew formula for MongoDB and the Database Tools, by running the
113101
following command in your macOS Terminal:
114102

115103
.. code-block:: sh
116104

117-
brew tap | grep mongodb
105+
brew tap mongodb/brew
118106

119-
You should see the MongoDB brew tap listed. If you do not, or you
120-
receive an error, return to the :ref:`osx-prereq` section.
107+
If you have already done this for a previous installation of MongoDB,
108+
you can skip this step.
121109

122110
#. To install MongoDB, run the following command in your macOS Terminal
123111
application:
@@ -142,16 +130,38 @@ The installation includes the following binaries:
142130
- The :binary:`~bin.mongos` sharded cluster query router
143131
- The :binary:`~bin.mongo` shell
144132

145-
In addition, the installation creates:
133+
In addition, the installation creates the following files and
134+
directories at the location specified below, depending on your Apple
135+
hardware:
136+
137+
.. list-table::
138+
:header-rows: 1
139+
:widths: 20 30 30
140+
141+
* -
142+
- Intel Processor
143+
- Apple M1 Processor
144+
145+
* - :doc:`configuration file </reference/configuration-options>`
146+
- ``/usr/local/etc/mongod.conf``
147+
- ``/opt/homebrew/etc/mongod.conf``
146148

147-
- the :doc:`configuration file </reference/configuration-options>`
148-
(``/usr/local/etc/mongod.conf``)
149+
* - :setting:`log directory <systemLog.path>`
150+
- ``/usr/local/var/log/mongodb``
151+
- ``/opt/homebrew/var/log/mongodb``
149152

150-
- the :setting:`log directory path <systemLog.path>`
151-
(``/usr/local/var/log/mongodb``)
153+
* - :setting:`data directory <storage.dbPath>`
154+
- ``/usr/local/var/mongodb``
155+
- ``/opt/homebrew/var/mongodb``
152156

153-
- the :setting:`data directory path <storage.dbPath>`
154-
(``/usr/local/var/mongodb``)
157+
See `Apple's documentation <https://support.apple.com/en-us/HT211814>`__
158+
for the current list of Apple hardware using the M1 processor. You can
159+
also run the following command to check where ``brew`` has installed
160+
these files and directories:
161+
162+
.. code-block:: sh
163+
164+
brew --prefix
155165

156166
Starting with MongoDB 4.4.1, the installation also includes the
157167
`MongoDB Database Tools <https://docs.mongodb.com/database-tools/>`__.
@@ -188,15 +198,24 @@ MongoDB as a macOS service, as doing so sets the correct system
188198
- To run MongoDB (i.e. the :binary:`~bin.mongod` process) **manually
189199
as a background process**, issue the following:
190200

191-
.. code-block:: sh
201+
- For macOS running Intel processors:
202+
203+
.. code-block:: sh
204+
205+
mongod --config /usr/local/etc/mongod.conf --fork
206+
207+
- For macOS running on `Apple M1 processors
208+
<https://support.apple.com/en-us/HT211814>`__:
209+
210+
.. code-block:: sh
192211

193-
mongod --config /usr/local/etc/mongod.conf --fork
212+
mongod --config /opt/homebrew/etc/mongod.conf --fork
194213

195214
To stop a :binary:`~bin.mongod` running as a background process,
196215
connect to the :binary:`~bin.mongod` from the :program:`mongo`
197216
shell, and issue the :dbcommand:`shutdown` command as needed.
198217

199-
Both methods use the :file:`/usr/local/etc/mongod.conf` file created
218+
Both methods use the :file:`mongod.conf` file created
200219
during the install. You can add your own MongoDB
201220
:doc:`configuration options </reference/configuration-options>` to
202221
this file as well.

0 commit comments

Comments
 (0)