Skip to content

DOCS-3167 - improvements and lots of bug fixes #1978

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
Show file tree
Hide file tree
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
17 changes: 17 additions & 0 deletions source/includes/fact-directories-debian.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
The MongoDB instance stores its data files in ``/var/lib/mongodb``
and its log files in ``/var/log/mongodb`` by default,
and runs using the ``mongodb``
user account. You can specify alternate log and data file
directories in ``/etc/mongodb.conf``; see
:doc:`/reference/configuration-options` for details.

If you change the user that runs the MongoDB process, you
**must** modify the access control rights to the ``/var/lib/mongodb`` and
``/var/log/mongodb`` directories, e.g. by running

.. code-block:: sh

chown -R <username of new user> /var/lib/mongodb
chown -R <username of new user> /var/log/mongodb

as a user with appropriate privileges.
17 changes: 17 additions & 0 deletions source/includes/fact-directories-redhat.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
The MongoDB instance stores its data files in ``/var/lib/mongo``
and its log files in ``/var/log/mongodb`` by default,
and runs using the ``mongod``
user account. You can specify alternate log and data file
directories in ``/etc/mongodb.conf``; see
:doc:`/reference/configuration-options` for details.

If you change the user that runs the MongoDB process, you
**must** modify the access control rights to the ``/var/lib/mongo`` and
``/var/log/mongodb`` directories, e.g. by running

.. code-block:: sh

chown -R <username of new user> /var/lib/mongo
chown -R <username of new user> /var/log/mongodb

as a user with appropriate privileges.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The default ``/etc/mongodb.conf`` configuration file supplied by the
2.6 series ``.deb`` package has :setting:`~net.bind_ip`` set to
2.6 series packages has :setting:`~net.bind_ip`` set to
``127.0.0.1`` by default. Modify this setting as needed for your
environment before initializing a :term:`replica set`.
36 changes: 36 additions & 0 deletions source/includes/fact-selinux-redhat-options.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
You must configure SELinux to allow MongoDB to start on Red Hat Linux-based
systems (Red Hat Enterprise Linux, CentOS, Fedora). Administrators have three
options:

- enable access to the relevant ports (e.g. 27017) for SELinux. See
:doc:`/reference/default-mongodb-port` for more information on MongoDB's
default ports. For default settings, this can be accomplished by running

.. code-block:: sh

semanage port -a -t mongodb_port_t -p tcp 27017

- set SELinux to ``permissive`` mode in ``/etc/selinux.conf``. The line

.. code-block:: sh

SELINUX=enforcing

should be changed to

.. code-block:: sh

SELINUX=permissive

- disable SELinux entirely; as above but set

.. code-block:: sh

SELINUX=disabled

All three options require ``root`` privileges. The latter two options each
requires a system reboot and may have larger implications for your deployment.

You may alternatively choose not to install the SELinux packages when you are
installing your Linux operating system, or choose to remove the relevant
packages. This option is the most invasive and is not recommended.
6 changes: 4 additions & 2 deletions source/includes/list-mongodb-org-packages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ Control Scripts
---------------

The ``mongodb-org`` package includes various :term:`control scripts
<control script>`, including the init script |init-script-path|.
<control script>`, including the init script |init-script-path|. These scripts
are used to stop, start, and restart daemon processes.

The package configures MongoDB using the ``/etc/mongod.conf`` file in
conjunction with the control scripts. See
Expand All @@ -45,4 +46,5 @@ configuration file.
As of version |release|, there are no control scripts for
:program:`mongos`. The :program:`mongos` process is used only in
:doc:`sharding </core/sharding>`. You can use the ``mongod`` init script
to derive your own :program:`mongos` control script.
to derive your own :program:`mongos` control script for use in such
environments. See the :program:`mongos` reference for configuration details.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ action:
baseurl=https://repo.mongodb.com/yum/redhat/$releasever/mongodb-enterprise/2.6/$basearch/
gpgcheck=0
enabled=1
- pre: |
``.repo`` files for each release can also be found `in the repository itself <https://repo.mongodb.com/yum/redhat/>`_.
Remember that odd-numbered minor release versions (e.g. 2.5) are development versions and are unsuitable
for production deployment.
---
title: Install the MongoDB Enterprise packages and associated tools.
stepnum: 1
Expand All @@ -46,7 +50,7 @@ action:
pre: "Issue the following command:"
language: sh
code: |
sudo yum install mongodb-enterprise
sudo yum install -y mongodb-enterprise
---
stepnum: 2
title: Manage Installed Version
Expand All @@ -62,7 +66,7 @@ action:
that installs the ``2.6.1`` release of MongoDB:
language: sh
code: |
sudo yum install mongodb-enterprise-2.6.1 mongodb-enterprise-server-2.6.1 mongodb-enterprise-shell-2.6.1 mongodb-enterprise-mongos-2.6.1 mongodb-enterprise-tools-2.6.1
sudo yum install -y mongodb-enterprise-2.6.1 mongodb-enterprise-server-2.6.1 mongodb-enterprise-shell-2.6.1 mongodb-enterprise-mongos-2.6.1 mongodb-enterprise-tools-2.6.1
- heading:
text: Pin a specific version of MongoDB Enterprise.
character: "'"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ action:
command:
language: sh
code: |
sudo yum install mongodb-org
sudo yum install -y mongodb-org
- pre: |
To install a specific release of MongoDB, specify each
component package individually and append the version number to the
package name, as in the following example that installs the `2.6.1``
release of MongoDB:
language: sh
code: |
sudo yum install mongodb-org-2.6.1 mongodb-org-server-2.6.1 mongodb-org-shell-2.6.1 mongodb-org-mongos-2.6.1 mongodb-org-tools-2.6.1
sudo yum install -y mongodb-org-2.6.1 mongodb-org-server-2.6.1 mongodb-org-shell-2.6.1 mongodb-org-mongos-2.6.1 mongodb-org-tools-2.6.1
- pre: |
You can specify any available version of MongoDB. However ``yum``
will upgrade the packages when a newer version becomes available. To
Expand Down
4 changes: 2 additions & 2 deletions source/includes/steps-install-mongodb-on-ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ action:
pre: "Issue the following command:"
language: sh
code: |
sudo apt-get install mongodb-org
sudo apt-get install -y mongodb-org
- heading:
text: Install a specific release of MongoDB.
character: "'"
Expand All @@ -55,7 +55,7 @@ action:
that installs the ``2.6.1`` release of MongoDB:
language: sh
code: |
apt-get install mongodb-org=2.6.1 mongodb-org-server=2.6.1 mongodb-org-shell=2.6.1 mongodb-org-mongos=2.6.1 mongodb-org-tools=2.6.1
sudo apt-get install -y mongodb-org=2.6.1 mongodb-org-server=2.6.1 mongodb-org-shell=2.6.1 mongodb-org-mongos=2.6.1 mongodb-org-tools=2.6.1
- heading:
text: Pin a specific version of MongoDB.
character: "'"
Expand Down
22 changes: 15 additions & 7 deletions source/includes/steps-run-mongodb-on-a-linux-distribution.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,22 @@ ref: verify
pre: |
You can verify that the :program:`mongod` process has started
successfully by checking the contents of the log file at
``/var/log/mongodb/mongod.log``.
``/var/log/mongodb/mongod.log``
for a line reading
action:
pre: |
You can optionally ensure that MongoDB will start following a system
reboot by issuing the following command:
language: sh
code: |
sudo chkconfig mongod on
- language: none
code: |
[initandlisten] waiting for connections on port <port>

- pre: |
where ``<port>`` is the port configured in ``/etc/mongod.conf``, ``27017`` by default.

You can optionally ensure that MongoDB will start following a system
reboot by issuing the following command:

language: sh
code: |
sudo chkconfig mongod on
---
title: Stop MongoDB.
stepnum: 3
Expand Down
9 changes: 8 additions & 1 deletion source/includes/steps-run-mongodb-on-debian.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@ ref: verify
pre: |
Verify that the :program:`mongod` process has started successfully by
checking the contents of the log file at
``/var/log/mongodb/mongod.log``.
``/var/log/mongodb/mongod.log``
for a line reading
action:
language: none
code: |
[initandlisten] waiting for connections on port <port>
post: |
where ``<port>`` is the port configured in ``/etc/mongod.conf``, ``27017`` by default.
---
title: Stop MongoDB.
stepnum: 3
Expand Down
15 changes: 8 additions & 7 deletions source/tutorial/install-mongodb-enterprise-on-debian.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,16 @@ Install MongoDB Enterprise on Debian
Overview
--------

Use this tutorial to install MongoDB Enterprise on Debian Linux systems.
The tutorial uses ``.deb`` packages to install.
Use this tutorial to install MongoDB Enterprise on Debian Linux systems from
``.deb`` packages.

.. include:: /includes/list-mongodb-enterprise-packages.rst

Considerations
--------------

MongoDB only provides Enterprise packages for 64-bit versions of Debian Wheezy.

Install MongoDB Enterprise
--------------------------

Expand All @@ -20,10 +25,6 @@ Install MongoDB Enterprise
Run MongoDB Enterprise
----------------------

The MongoDB Enterprise instance stores its data files in ``/var/lib/mongo``
and its log files in ``/var/log/mongo``, and runs using the ``mongod``
user account. If you change the user that runs the MongoDB process, you
**must** modify the access control rights to the ``/var/lib/mongo`` and
``/var/log/mongo`` directories.
.. include:: /includes/fact-directories-debian.rst

.. include:: /includes/steps/run-mongodb-on-debian.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,20 @@ Overview
--------

Use this tutorial to install MongoDB Enterprise on Red Hat Enterprise
Linux or CentOS Linux. The tutorial uses ``.rpm`` packages to install.
Linux or CentOS Linux from ``.rpm`` packages.

.. The following include includes two h2 headers:
.. Packages and Control Scripts

.. include:: /includes/list-mongodb-enterprise-packages.rst

Considerations
~~~~~~~~~~~~~~
--------------

MongoDB only provides Enterprise packages for Red Hat
Enterprise Linux and CentOS Linux versions 5 and 6.
Enterprise Linux and CentOS Linux versions 5 and 6, 64-bit.

.. include:: /includes/fact-installation-bind-ip-default-in-config.rst

Install MongoDB Enterprise
--------------------------
Expand All @@ -32,5 +34,10 @@ how to do both.

Run MongoDB Enterprise
----------------------
.. important::

.. include:: /includes/fact-selinux-redhat-options.rst

.. include:: /includes/fact-directories-redhat.rst

.. include:: /includes/steps/run-mongodb-on-a-linux-distribution.rst
12 changes: 4 additions & 8 deletions source/tutorial/install-mongodb-enterprise-on-ubuntu.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ Install MongoDB Enterprise on Ubuntu
Overview
--------

Use this tutorial to install MongoDB Enterprise on Ubuntu Linux systems.
The tutorial uses ``.deb`` packages to install.
Use this tutorial to install MongoDB Enterprise on Ubuntu Linux systems from
``.deb`` packages.

.. include:: /includes/list-mongodb-enterprise-packages.rst

Considerations
--------------

MongoDB only provides Enterprise packages for Ubuntu
14.04 LTS (Precise Pangolin).
14.04 LTS (Precise Pangolin) 64-bit.

Install MongoDB Enterprise
--------------------------
Expand All @@ -26,10 +26,6 @@ Install MongoDB Enterprise
Run MongoDB Enterprise
----------------------

The MongoDB Enterprise instance stores its data files in ``/var/lib/mongo``
and its log files in ``/var/log/mongo``, and runs using the ``mongod``
user account. If you change the user that runs the MongoDB process, you
**must** modify the access control rights to the ``/var/lib/mongo`` and
``/var/log/mongo`` directories.
.. include:: /includes/fact-directories-debian.rst

.. include:: /includes/steps/run-mongodb-on-debian.rst
10 changes: 3 additions & 7 deletions source/tutorial/install-mongodb-on-debian.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Install MongoDB on Debian
Overview
--------

Use this tutorial to install MongoDB on Debian systems. The tutorial uses
``.deb`` packages to install. While some Debian distributions include
Use this tutorial to install MongoDB on Debian systems from
``.deb`` packages. While some Debian distributions include
their own MongoDB packages, the official MongoDB packages are generally
more up to date.

Expand Down Expand Up @@ -48,10 +48,6 @@ sign packages with GPG keys.
Run MongoDB
-----------

The MongoDB instance stores its data files in ``/var/lib/mongo``
and its log files in ``/var/log/mongo``, and runs using the ``mongod``
user account. If you change the user that runs the MongoDB process, you
**must** modify the access control rights to the ``/var/lib/mongo`` and
``/var/log/mongo`` directories.
.. include:: /includes/fact-directories-debian.rst

.. include:: /includes/steps/run-mongodb-on-debian.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Overview
--------

Use this tutorial to install MongoDB on Red Hat Enterprise Linux, CentOS
Linux, Fedora Linux, or a related system. The tutorial uses ``.rpm``
packages to install. While some of these distributions include their own
Linux, Fedora Linux, or a related system from ``.rpm``
packages. While some of these distributions include their own
MongoDB packages, the official MongoDB packages are generally more up to
date.

Expand All @@ -25,7 +25,7 @@ date.
With the introduction of ``systemd`` in Fedora 15, the control scripts
included in the packages available in the MongoDB downloads repository
are not compatible with Fedora systems. A correction is
forthcoming, see :issue:`SERVER-7285` for more information, and in
forthcoming; see :issue:`SERVER-7285` for more information. In
the mean time use your own control scripts *or* install using the
procedure outlined in :doc:`/tutorial/install-mongodb-on-linux`.

Expand All @@ -43,21 +43,10 @@ Install MongoDB

Run MongoDB
-----------
.. important::

.. important:: You must configure SELinux to allow MongoDB to start on
Fedora systems. Administrators have two options:
.. include:: /includes/fact-selinux-redhat-options.rst

- enable access to the relevant ports (e.g. 27017) for SELinux. See
:ref:`security-port-numbers` for more information on MongoDB's
:doc:`default ports </reference/default-mongodb-port>`.

- disable SELinux entirely. This requires a system reboot and may have
larger implications for your deployment.

The MongoDB instance stores its data files in ``/var/lib/mongo``
and its log files in ``/var/log/mongodb``, and runs using the ``mongod``
user account. If you change the user that runs the MongoDB process, you
**must** modify the access control rights to the ``/var/lib/mongo`` and
``/var/log/mongodb`` directories.
.. include:: /includes/fact-directories-redhat.rst

.. include:: /includes/steps/run-mongodb-on-a-linux-distribution.rst
10 changes: 3 additions & 7 deletions source/tutorial/install-mongodb-on-ubuntu.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Install MongoDB on Ubuntu
Overview
--------

Use this tutorial to install MongoDB on Ubuntu Linux systems. The tutorial
uses ``.deb`` packages to install. While Ubuntu includes its own MongoDB
Use this tutorial to install MongoDB on Ubuntu Linux systems from ``.deb``
packages. While Ubuntu includes its own MongoDB
packages, the official MongoDB packages are generally more up-to-date.

.. note::
Expand Down Expand Up @@ -42,10 +42,6 @@ Install MongoDB
Run MongoDB
-----------

The MongoDB instance stores its data files in ``/var/lib/mongodb``
and its log files in ``/var/log/mongodb``, and runs using the ``mongodb``
user account. If you change the user that runs the MongoDB process, you
**must** modify the access control rights to the ``/var/lib/mongodb`` and
``/var/log/mongodb`` directories.
.. include:: /includes/fact-directories-debian.rst

.. include:: /includes/steps/run-mongodb-on-debian.rst