Skip to content

Commit 4882743

Browse files
author
Sam Kleinman
committed
DOCS-1893: reorganizing os x tutorial.
1 parent 09bb0c4 commit 4882743

File tree

1 file changed

+91
-90
lines changed

1 file changed

+91
-90
lines changed

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

Lines changed: 91 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ This tutorial outlines the basic installation process for deploying
1717
:term:`MongoDB` on Macintosh OS X systems. This tutorial provides two
1818
main methods of installing the MongoDB server
1919
(i.e. ":program:`mongod`") and associated tools: first using the
20-
community package management tools, and second using the official
21-
MongoDB builds.
20+
official MongoDB builds, and second using community package management
21+
tools.
2222

2323
.. see:: Additional installation tutorials:
2424

@@ -33,94 +33,6 @@ MongoDB builds.
3333
.. - :doc:`/getting-started`
3434
.. STUB - :doc:`/tutorial/insert-test-data-into-a-mongodb-database`
3535

36-
Install with Package Management
37-
-------------------------------
38-
39-
Both community package management tools: `Homebrew
40-
<http://mxcl.github.com/homebrew/>`_ and `MacPorts
41-
<http://www.macports.org/>`_ require some initial setup and
42-
configuration. This configuration is beyond the scope of this
43-
document. You only need to use one of these tools.
44-
45-
If you want to use package management, and do not already have a
46-
system installed, Homebrew is typically easier and simpler to use.
47-
48-
Homebrew
49-
~~~~~~~~
50-
51-
Homebrew installs binary packages based on published "formula." Issue
52-
the following command at the system shell to update the ``brew``
53-
package manager:
54-
55-
.. code-block:: sh
56-
57-
brew update
58-
59-
Use the following command to install the MongoDB package into your
60-
Homebrew system.
61-
62-
.. code-block:: sh
63-
64-
brew install mongodb
65-
66-
Later, if you need to upgrade MongoDB, you can issue the following
67-
sequence of commands to update the MongoDB installation on your
68-
system:
69-
70-
.. code-block:: sh
71-
72-
brew update
73-
brew upgrade mongodb
74-
75-
MacPorts
76-
~~~~~~~~
77-
78-
MacPorts distributes build scripts that allow you to easily build
79-
packages and their dependencies on your own system. The compilation
80-
process can take significant period of time depending on your system's
81-
capabilities and existing dependencies. Issue the following command in
82-
the system shell:
83-
84-
.. code-block:: sh
85-
86-
port install mongodb
87-
88-
Using MongoDB from Homebrew and MacPorts
89-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
90-
91-
The packages installed with Homebrew and MacPorts contain no
92-
:term:`control scripts <control script>` or interaction with the
93-
system's process manager.
94-
95-
If you have configured Homebrew and MacPorts correctly, including
96-
setting your ``PATH``, the MongoDB applications and utilities will be
97-
accessible from the system shell. Start the :program:`mongod` process
98-
in a terminal (for testing or development) or using a process
99-
management tool.
100-
101-
.. code-block:: sh
102-
103-
mongod
104-
105-
Then open the :program:`mongo` shell by issuing the
106-
following command at the system prompt:
107-
108-
.. code-block:: sh
109-
110-
mongo
111-
112-
This will connect to the database running on the localhost interface
113-
by default. At the :program:`mongo` prompt, issue the following two
114-
commands to insert a record in the "test" :term:`collection` of the
115-
(default) "test" database and then retrieve that record.
116-
117-
.. code-block:: javascript
118-
119-
> db.test.save( { a: 1 } )
120-
> db.test.find()
121-
122-
.. seealso:: ":program:`mongo`" and ":doc:`/reference/method`"
123-
12436
Install from Official Builds
12537
----------------------------
12638

@@ -229,3 +141,92 @@ commands to insert a record in the "test" :term:`collection` of the
229141
db.test.find()
230142

231143
.. seealso:: ":program:`mongo`" and ":doc:`/reference/method`"
144+
145+
Install with Package Management
146+
-------------------------------
147+
148+
Both community package management tools: `Homebrew
149+
<http://mxcl.github.com/homebrew/>`_ and `MacPorts
150+
<http://www.macports.org/>`_ require some initial setup and
151+
configuration. This configuration is beyond the scope of this
152+
document. You only need to use one of these tools.
153+
154+
If you want to use package management, and do not already have a
155+
system installed, Homebrew is typically easier and simpler to use.
156+
157+
Homebrew
158+
~~~~~~~~
159+
160+
Homebrew installs binary packages based on published "formula." Issue
161+
the following command at the system shell to update the ``brew``
162+
package manager:
163+
164+
.. code-block:: sh
165+
166+
brew update
167+
168+
Use the following command to install the MongoDB package into your
169+
Homebrew system.
170+
171+
.. code-block:: sh
172+
173+
brew install mongodb
174+
175+
Later, if you need to upgrade MongoDB, you can issue the following
176+
sequence of commands to update the MongoDB installation on your
177+
system:
178+
179+
.. code-block:: sh
180+
181+
brew update
182+
brew upgrade mongodb
183+
184+
MacPorts
185+
~~~~~~~~
186+
187+
MacPorts distributes build scripts that allow you to easily build
188+
packages and their dependencies on your own system. The compilation
189+
process can take significant period of time depending on your system's
190+
capabilities and existing dependencies. Issue the following command in
191+
the system shell:
192+
193+
.. code-block:: sh
194+
195+
port install mongodb
196+
197+
Using MongoDB from Homebrew and MacPorts
198+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
199+
200+
The packages installed with Homebrew and MacPorts contain no
201+
:term:`control scripts <control script>` or interaction with the
202+
system's process manager.
203+
204+
If you have configured Homebrew and MacPorts correctly, including
205+
setting your ``PATH``, the MongoDB applications and utilities will be
206+
accessible from the system shell. Start the :program:`mongod` process
207+
in a terminal (for testing or development) or using a process
208+
management tool.
209+
210+
.. code-block:: sh
211+
212+
mongod
213+
214+
Then open the :program:`mongo` shell by issuing the
215+
following command at the system prompt:
216+
217+
.. code-block:: sh
218+
219+
mongo
220+
221+
This will connect to the database running on the localhost interface
222+
by default. At the :program:`mongo` prompt, issue the following two
223+
commands to insert a record in the "test" :term:`collection` of the
224+
(default) "test" database and then retrieve that record.
225+
226+
.. code-block:: javascript
227+
228+
> db.test.save( { a: 1 } )
229+
> db.test.find()
230+
231+
.. seealso:: ":program:`mongo`" and ":doc:`/reference/method`"
232+

0 commit comments

Comments
 (0)