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