@@ -86,38 +86,26 @@ macOS does not include the Homebrew ``brew`` package by default.
86
86
- Install ``brew`` using the official
87
87
`Homebrew installation instructions <https://brew.sh/#install>`_.
88
88
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
-
103
89
.. _install:
104
90
105
91
Installing MongoDB {+version+} |edition| Edition
106
92
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
107
93
108
94
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.
110
97
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
113
101
following command in your macOS Terminal:
114
102
115
103
.. code-block:: sh
116
104
117
- brew tap | grep mongodb
105
+ brew tap mongodb/brew
118
106
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 .
121
109
122
110
#. To install MongoDB, run the following command in your macOS Terminal
123
111
application:
@@ -142,16 +130,38 @@ The installation includes the following binaries:
142
130
- The :binary:`~bin.mongos` sharded cluster query router
143
131
- The :binary:`~bin.mongo` shell
144
132
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``
146
148
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``
149
152
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``
152
156
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
155
165
156
166
Starting with MongoDB 4.4.1, the installation also includes the
157
167
`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
188
198
- To run MongoDB (i.e. the :binary:`~bin.mongod` process) **manually
189
199
as a background process**, issue the following:
190
200
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
192
211
193
- mongod --config /usr/local /etc/mongod.conf --fork
212
+ mongod --config /opt/homebrew /etc/mongod.conf --fork
194
213
195
214
To stop a :binary:`~bin.mongod` running as a background process,
196
215
connect to the :binary:`~bin.mongod` from the :program:`mongo`
197
216
shell, and issue the :dbcommand:`shutdown` command as needed.
198
217
199
- Both methods use the :file:`/usr/local/etc/ mongod.conf` file created
218
+ Both methods use the :file:`mongod.conf` file created
200
219
during the install. You can add your own MongoDB
201
220
:doc:`configuration options </reference/configuration-options>` to
202
221
this file as well.
0 commit comments