@@ -83,38 +83,26 @@ macOS does not include the Homebrew ``brew`` package by default.
83
83
- Install ``brew`` using the official
84
84
`Homebrew installation instructions <https://brew.sh/#install>`_.
85
85
86
- Tap the MongoDB Homebrew Tap
87
- ````````````````````````````
88
-
89
- Tap the
90
- `MongoDB Homebrew Tap <https://github.com/mongodb/homebrew-brew>`_ to
91
- download the official Homebrew formulae for MongoDB and the Database
92
- Tools.
93
-
94
- - Run the following command in your macOS Terminal:
95
-
96
- .. code-block:: sh
97
-
98
- brew tap mongodb/brew
99
-
100
86
.. _install:
101
87
102
88
Installing MongoDB {+version+} |edition| Edition
103
89
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
104
90
105
- Follow these steps to install MongoDB |edition| Edition using
106
- Homebrew's ``brew`` package manager.
91
+ Follow these steps to install MongoDB |edition| Edition using Homebrew's
92
+ ``brew`` package manager. Be sure that you have followed the
93
+ :ref:`installation prerequisites <osx-prereq>` above before proceeding.
107
94
108
- #. Verify that your system meets all the
109
- :ref:`installation prerequisites <osx-prereq>` by running the
95
+ #. Tap the `MongoDB Homebrew Tap
96
+ <https://github.com/mongodb/homebrew-brew>`_ to download the official
97
+ Homebrew formula for MongoDB and the Database Tools, by running the
110
98
following command in your macOS Terminal:
111
99
112
100
.. code-block:: sh
113
101
114
- brew tap | grep mongodb
102
+ brew tap mongodb/brew
115
103
116
- You should see the MongoDB brew tap listed. If you do not, or you
117
- receive an error, return to the :ref:`osx-prereq` section .
104
+ If you have already done this for a previous installation of MongoDB,
105
+ you can skip this step .
118
106
119
107
#. To install MongoDB, run the following command in your macOS Terminal
120
108
application:
@@ -139,16 +127,38 @@ The installation includes the following binaries:
139
127
- The :binary:`~bin.mongos` sharded cluster query router
140
128
- The :binary:`~bin.mongo` shell
141
129
142
- In addition, the installation creates:
130
+ In addition, the installation creates the following files and
131
+ directories at the location specified below, depending on your Apple
132
+ hardware:
143
133
144
- - the :doc:`configuration file </reference/configuration-options>`
145
- (``/usr/local/etc/mongod.conf``)
134
+ .. list-table::
135
+ :header-rows: 1
136
+ :widths: 20 30 30
146
137
147
- - the :setting:`log directory path <systemLog.path>`
148
- (``/usr/local/var/log/mongodb``)
138
+ * -
139
+ - Intel Processor
140
+ - Apple M1 Processor
149
141
150
- - the :setting:`data directory path <storage.dbPath>`
151
- (``/usr/local/var/mongodb``)
142
+ * - :doc:`configuration file </reference/configuration-options>`
143
+ - ``/usr/local/etc/mongod.conf``
144
+ - ``/opt/homebrew/etc/mongod.conf``
145
+
146
+ * - :setting:`log directory <systemLog.path>`
147
+ - ``/usr/local/var/log/mongodb``
148
+ - ``/opt/homebrew/var/log/mongodb``
149
+
150
+ * - :setting:`data directory <storage.dbPath>`
151
+ - ``/usr/local/var/mongodb``
152
+ - ``/opt/homebrew/var/mongodb``
153
+
154
+ See `Apple's documentation <https://support.apple.com/en-us/HT211814>`__
155
+ for the current list of Apple hardware using the M1 processor. You can
156
+ also run the following command to check where ``brew`` has installed
157
+ these files and directories:
158
+
159
+ .. code-block:: sh
160
+
161
+ brew --prefix
152
162
153
163
Run MongoDB Community Edition
154
164
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -179,15 +189,24 @@ MongoDB as a macOS service, as doing so sets the correct system
179
189
- To run MongoDB (i.e. the :binary:`~bin.mongod` process) **manually
180
190
as a background process**, issue the following:
181
191
182
- .. code-block:: sh
192
+ - For macOS running Intel processors:
193
+
194
+ .. code-block:: sh
195
+
196
+ mongod --config /usr/local/etc/mongod.conf --fork
197
+
198
+ - For macOS running on `Apple M1 processors
199
+ <https://support.apple.com/en-us/HT211814>`__:
200
+
201
+ .. code-block:: sh
183
202
184
- mongod --config /usr/local /etc/mongod.conf --fork
203
+ mongod --config /opt/homebrew /etc/mongod.conf --fork
185
204
186
205
To stop a :binary:`~bin.mongod` running as a background process,
187
206
connect to the :binary:`~bin.mongod` from the :program:`mongo`
188
207
shell, and issue the :dbcommand:`shutdown` command as needed.
189
208
190
- Both methods use the :file:`/usr/local/etc/ mongod.conf` file created
209
+ Both methods use the :file:`mongod.conf` file created
191
210
during the install. You can add your own MongoDB
192
211
:doc:`configuration options </reference/configuration-options>` to
193
212
this file as well.
0 commit comments