Skip to content

Updates to Mac OS X install docs as per SamK's request #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 25 additions & 12 deletions source/tutorial/install-mongodb-on-os-x.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ Both community package management tools, `Homebrew
configuration. This configuration is beyond the scope of this
document. You only need to use one of these tools.

If you can't decide, choose homebrew in the interest of time
and simplicity.

Homebrew
~~~~~~~~

Expand Down Expand Up @@ -80,7 +83,13 @@ If you have configured Homebrew and MacPorts correctly, including
setting your ``PATH``, the MongoDB applications and utilities will be
accessible from the system shell. Start the :program:`mongod` process
in a terminal (for testing or development) or using a process
management tool. Then open the :program:`mongo` shell by issuing the
management tool.

.. code-block:: sh

mongod

Then open the :program:`mongo` shell by issuing the
following command at the system prompt:

.. code-block:: sh
Expand Down Expand Up @@ -113,13 +122,17 @@ most cases you will want to download the 64-bit version of MongoDB.

.. code-block:: sh

curl http://downloads.mongodb.org/osx/mongodb-osx-x86_64-latest.tgz > mongo.tgz
curl http://downloads.mongodb.org/osx/mongodb-osx-x86_64-x.y.z.tgz > mongo.tgz

If you need to run the 32-bit version, use the following command.
If you need to run the 32-bit version, use the following command:

.. code-block:: sh

curl http://downloads.mongodb.org/osx/mongodb-osx-i386-latest.tgz > mongo.tgz
curl http://downloads.mongodb.org/osx/mongodb-osx-i386-x.y.z.tgz > mongo.tgz

.. note::

Replace x.y.z with the current version such as 2.0.2 or 2.0.0

.. note::

Expand All @@ -145,7 +158,7 @@ extract the files from the archive:

.. code-block:: sh

mv -n mongodb-osx-20??-??-??/ mongodb
mv -n mongodb-osx-[platform]-[version]/ /path/to/new/location/

You can find the :program:`mongod` binary, and the binaries all of the
associated MongoDB utilities, in the "``bin/``" directory within the
Expand All @@ -156,16 +169,16 @@ Using MongoDB from 10gen Builds

Before you start :program:`mongod` for the first time, you will need
to create the data directory. By default, :program:`mongod` writes
data to the ``/data/db/`` directory. To create this directory, use the
following command:
data to the ``/data/db/`` directory. To create this directory, and set
the appropriate permissions use the following commands:

.. code-block:: sh

mkdir -p /data/db
sudo mkdir -p /data/db
sudo chown `id -u` /data/db

You can specify, and create, an alternate path using the
:option:`--dbpath <mongod --dbpath>` option to :program:`mongod` and
the above command.
You can specify an alternate path for data files using the
:option:`--dbpath <mongod --dbpath>` option to :program:`mongod`.

The 10gen builds of MongoDB contain no :term:`control scripts <control
script>` or method to control the :program:`mongod` process. You may
Expand All @@ -176,7 +189,7 @@ directory for easier use.
Among the tools included with this MongoDB distribution, is the
:program:`mongo` shell. You can use this shell to connect to your
MongoDB instance by issuing the following command at the system
prompt:
prompt from inside of the directory where mongo was extracted:

.. code-block:: sh

Expand Down