Skip to content

(DOCS-10468): Revised Windows Install for MongoDB #3346

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

Merged
merged 3 commits into from
Jun 20, 2018
Merged
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
3 changes: 2 additions & 1 deletion source/includes/extracts-install-past-mongodb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ content: |
.. note::

To install a different version of MongoDB, please refer to that
version's documentation. For example, see version {{installLink}}.
version's documentation. To install the previous version, see
the tutorial for version {{installLink}}.
---

# Community
Expand Down
11 changes: 6 additions & 5 deletions source/includes/fact-default-bind-ip-change.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Starting in MongoDB 3.6, MongoDB binaries, :binary:`~bin.mongod` and
:binary:`~bin.mongos`, bind to localhost by default.
Previously, starting in MongoDB 2.6, only the binaries from the
Starting with MongoDB 3.6, MongoDB binaries, :binary:`~bin.mongod` and
:binary:`~bin.mongos`, bind to ``localhost`` by default.
From MongoDB versions 2.6 to 3.4, only the binaries from the
official MongoDB RPM (Red Hat, CentOS, Fedora Linux, and derivatives)
and DEB (Debian, Ubuntu, and derivatives) packages bind to localhost by
default. For more details, see :ref:`3.6-bind_ip-compatibility`.
and DEB (Debian, Ubuntu, and derivatives) packages would bind to
``localhost`` by default. To learn more about this change, see
:ref:`3.6-bind_ip-compatibility`.
68 changes: 68 additions & 0 deletions source/includes/fact-install-windows-prereq.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
Hardware Requirements
~~~~~~~~~~~~~~~~~~~~~

|mdb-edition| requires an x86 64-bit architecture.

Software Requirements
~~~~~~~~~~~~~~~~~~~~~

Install on Windows 7 / Server 2008 R2 or Later
|mdb-edition| requires Microsoft Windows Server
2008 R2 or later or Microsoft Windows 7 or later for the x86 64-bit
architecture.

To find which version, service pack, and build of Windows is
running on your host, as well as the processor type of that host,
enter the following command in either the :guilabel:`Command Prompt`
or :guilabel:`Powershell`:

.. code-block:: powershell

systeminfo | findstr /B /C:"OS Name" /C:"OS Version" /C:"System Type"

.. code-block:: powershell
:copyable: false

OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.17134 N/A Build 17134
System Type: x64-based PC

Show All File Name Extensions
Make certain that you set Windows Explorer to show file name
extensions for all file types. This can prevent issues where the
file type displayed to the user differs from the actual file type.

.. example::

If Windows Explorer has known file extensions hidden, what may
appear to be ``mongod.cfg`` is actually ``mongod.cfg.txt``.

Install all Windows Updates
Before installing MongoDB, update your Windows host with the latest
system updates. At minimum, ensure the following Windows updates
are installed on the host:

- Windows 2012 Server and Windows 10 need
`KB2999226 <https://support.microsoft.com/en-us/help/2999226/update-for-universal-c-runtime-in-windows>`__
to provide Universal C Runtime support for Windows.

- Windows Server 2008 R2 and Windows 7 need
`KB2731284 <http://support.microsoft.com/kb/2731284>`__ to resolve
an issue with memory mapped files on Windows.

The Windows installer (``.msi``) file includes all other
software dependencies and automatically upgrades any previous version
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It only upgrades patch level in the same release

Automatic Upgrade: 3.4.1 -> 3.4.2
Not Upgrade, treated as two separate installs: 3.4.1 -> 3.6.0

of MongoDB in the :ref:`same release series <release-version-numbers>`
(3.4.1 to 3.4.2) that was installed using an ``.msi`` file. Upgrading
a full release series (3.4 to 3.6) requires a new installation.

Security
~~~~~~~~

.. include:: /includes/fact-default-bind-ip-change.rst

.. warning::

Do not expose :binary:`~bin.mongod.exe` to a public network without
:docs:`configuring authentication </core/authentication>`. MongoDB
is designed to be run in trusted environments.
29 changes: 15 additions & 14 deletions source/includes/fact-install-windows.rst
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
In Windows Explorer, locate the downloaded MongoDB ``.msi`` file, which
typically is located in the default ``Downloads`` folder. Double-click
the ``.msi`` file. The Windows Installer guides you through the
installation process.
1. Open Windows Explorer.

You may specify an installation directory if you choose the
:guilabel:`Custom` installation option.
2. Change the directory path to where you downloaded the MongoDB
``.msi`` file. By default, this is ``%HOMEPATH%\Downloads``.

.. note::
3. Double-click the ``.msi`` file.

These instructions assume that you have installed MongoDB
to ``C:\Program Files\MongoDB\Server\{+version+}\``.
4. The Windows Installer guides you through the installation process.

If you choose the :guilabel:`Custom` installation option, you may
specify an installation directory.

MongoDB does not have any other system dependencies. You can install and run MongoDB from any folder you choose.

.. note::

This tutorial assumes that you installed MongoDB
in ``C:\Program Files\MongoDB\Server\{+version+}\``.

During the installation process you will be given the option to install
:ref:`MongoDB Compass <compass-index>` in addition to MongoDB Server.

MongoDB is self-contained and does not have any other system
dependencies. You can run MongoDB from any folder you choose. You may
install MongoDB in any folder (e.g. ``D:\test\mongodb``).
80 changes: 75 additions & 5 deletions source/includes/release-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,94 @@ code: |
---
ref: _install-windows
copyable: true
language: powershell
language: bat
code: |
msiexec.exe /q /i mongodb-win32-x86_64-2008plus-ssl-{{version}}-signed.msi
---
ref: _install-windows-nocompass
copyable: true
language: bat
code: |
msiexec.exe /q /i mongodb-win32-x86_64-2008plus-ssl-{{version}}-signed.msi ^
SHOULD_INSTALL_COMPASS="0"
---
ref: _install-windows-ent
copyable: true
language: bat
code: |
msiexec.exe /q /i mongodb-win32-x86_64-enterprise-windows-64-{{version}}-signed.msi
---
ref: _install-windows-ent-nocompass
copyable: true
language: bat
code: |
msiexec.exe /q /i mongodb-win32-x86_64-enterprise-windows-64-{{version}}-signed.msi ^
SHOULD_INSTALL_COMPASS="0"
---
ref: _install-windows-custom-location
copyable: true
language: bat
code: |
msiexec.exe /q /i mongodb-win32-x86_64-2008plus-ssl-{{version}}-signed.msi ^
INSTALLLOCATION="{{location}}"
---
ref: _install-windows-custom-location-nocompass
copyable: true
language: bat
code: |
msiexec.exe /q /i mongodb-win32-x86_64-2008plus-ssl-{{version}}-signed.msi ^
INSTALLLOCATION="{{location}}" ^
SHOULD_INSTALL_COMPASS="0"
---
ref: _install-windows-ent-custom-location
copyable: true
language: bat
code: |
msiexec.exe /q /i mongodb-win32-x86_64-enterprise-windows-64-{{version}}-signed.msi ^
INSTALLLOCATION="{{location}}"
---
ref: _install-windows-specify-local
copyable: true
language: bat
code: |
msiexec.exe /q /i mongodb-win32-x86_64-2008plus-ssl-{{version}}-signed.msi ^
ADDLOCAL="{{addlocal}}"
---
ref: _install-windows-specify-local-nocompass
copyable: true
language: bat
code: |
msiexec.exe /q /i mongodb-win32-x86_64-2008plus-ssl-{{version}}-signed.msi ^
ADDLOCAL="{{addlocal}}" ^
SHOULD_INSTALL_COMPASS="0"
---
ref: _install-windows-ent-specify-local
copyable: true
language: bat
code: |
msiexec.exe /q /i mongodb-win32-x86_64-enterprise-windows-64-{{version}}-signed.msi ^
ADDLOCAL="{{addlocal}}"
---
ref: _install-windows-custom-location-specify-local
copyable: true
language: bat
code: |
msiexec.exe /q /i mongodb-win32-x86_64-2008plus-ssl-{{version}}-signed.msi ^
INSTALLLOCATION="{{location}}" ^
ADDLOCAL="{{addlocal}}"
---
ref: _install-windows-nocompass
ref: _install-windows-custom-location-specify-local-nocompass
copyable: true
language: powershell
language: bat
code: |
msiexec.exe /q /i mongodb-win32-x86_64-2008plus-ssl-{{version}}-signed.msi ^
INSTALLLOCATION="{{location}}" ^
ADDLOCAL="{{addlocal}}" ^
SHOULD_INSTALL_COMPASS="0"
---
ref: _install-windows-ent
ref: _install-windows-ent-custom-location-specify-local
copyable: true
language: powershell
language: bat
code: |
msiexec.exe /q /i mongodb-win32-x86_64-enterprise-windows-64-{{version}}-signed.msi ^
INSTALLLOCATION="{{location}}" ^
Expand Down
25 changes: 23 additions & 2 deletions source/includes/release-specifications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,18 @@ replacement:
ref: install-windows-addlocal
source:
file: release-base.yaml
ref: _install-windows
ref: _install-windows-specify-local
replacement:
location: 'C:\Program Files\MongoDB\Server\{+version+}\'
addlocal: 'MonitoringTools,ImportExportTools,MiscellaneousTools'
---
ref: install-windows-addlocation
source:
file: release-base.yaml
ref: _install-windows-custom-location
replacement:
location: 'C:\MongoDB\Server\{+version+}\'
---
ref: install-ent-windows-default
source:
file: release-base.yaml
Expand All @@ -49,8 +56,22 @@ replacement:
ref: install-ent-windows-addlocal
source:
file: release-base.yaml
ref: _install-windows-ent
ref: _install-windows-ent-specify-local
replacement:
location: 'C:\Program Files\MongoDB\Server\{+version+}\'
addlocal: 'MonitoringTools,ImportExportTools,MiscellaneousTools'
---
ref: install-ent-windows-addlocation
source:
file: release-base.yaml
ref: _install-windows-ent-custom-location
replacement:
location: 'C:\MongoDB\Server\{+version+}\'
---
ref: install-ent-windows-nocompass
source:
file: release-base.yaml
ref: _install-windows-ent-nocompass
replacement:
location: 'C:\Program Files\MongoDB\Server\{+version+}\'
...
78 changes: 42 additions & 36 deletions source/includes/steps-configure-windows-service-for-mongodb.yaml
Original file line number Diff line number Diff line change
@@ -1,55 +1,59 @@
stepnum: 1
level: 4
inherit:
file: steps-create-manually-windows-service-for-mongodb.yaml
ref: open-command-prompt
---
stepnum: 2
inherit:
file: steps-create-manually-windows-service-for-mongodb.yaml
file: steps-run-mongodb-on-windows.yaml
ref: create-directories
pre: |

If you have not created the data and log directories for your
MongoDB server, you must create them before running |mdb-edition| as
a Windows service.
---
stepnum: 3
stepnum: 2
level: 4
inherit:
file: steps-create-manually-windows-service-for-mongodb.yaml
ref: create-configuration-file
---
title: Install the MongoDB service.
stepnum: 4
stepnum: 3
level: 4
ref: mongodb-service
pre: |
.. important::
content: |

Run all of the following commands in :guilabel:`Command Prompt` with
"Administrative Privileges".
action:
- pre: |
Install the MongoDB service by starting :binary:`~bin.mongod.exe`
with the ``--install`` option and the ``-config``
option to specify the previously created configuration file.
language: powershell
copyable: true
code: |
"C:\Program Files\MongoDB\Server\{+version+}\bin\mongod.exe" ^
Install the MongoDB service by starting :binary:`~bin.mongod.exe`
with the ``--install`` option and the ``-config``
option to specify the previously created configuration file.

.. code-block::

"C:\Program Files\MongoDB\Server\{+version+}\bin\mongod.exe" ^
--config "C:\Program Files\MongoDB\Server\{+version+}\mongod.cfg" ^
--install
post: |

To use an alternate :setting:`dbpath`, specify the path in the
configuration file (e.g. ``C:\mongodb\mongod.cfg``) or
on the command line with the :option:`--dbpath <mongod --dbpath>` option.
on the command line with the :option:`--dbpath <mongod --dbpath>`
option.

.. note::

If needed, you can install services for multiple instances of
:binary:`~bin.mongod.exe` or :binary:`~bin.mongos.exe`. Install each service
with a unique :option:`--serviceName <mongod.exe --serviceName>` and
:option:`--serviceDisplayName <mongod.exe --serviceDisplayName>`. Use
multiple instances only when sufficient system resources exist and your
system design requires it.
You can install services for multiple instances of
:binary:`~bin.mongod.exe` or :binary:`~bin.mongos.exe` on a
single host. Install each service with a unique
:option:`--serviceName <mongod.exe --serviceName>` and
:option:`--serviceDisplayName <mongod.exe --serviceDisplayName>`.
Use multiple instances only when sufficient system resources
exist and your system design requires it.
---
stepnum: 5
stepnum: 4
level: 4
inherit:
file: steps-create-manually-windows-service-for-mongodb.yaml
ref: start-mongodb-service
---
stepnum: 6
stepnum: 5
level: 4
source:
file: steps-run-mongodb-on-linux.yaml
ref: verify
Expand All @@ -66,11 +70,12 @@ post: |
ignore these warnings during your initial evaluation of MongoDB.
---
title: Connect to MongoDB.
stepnum: 7
stepnum: 6
level: 4
ref: connect
pre: |
To connect to MongoDB through the :binary:`mongo.exe <bin.mongo>` shell,
open another :guilabel:`Command Prompt`.
To connect to MongoDB through the :binary:`mongo.exe <bin.mongo>`
shell, open another :guilabel:`Command Prompt`.
action:
copyable: true
language: powershell
Expand All @@ -80,8 +85,9 @@ post: |
If you want to develop applications using .NET, see the documentation
of :ecosystem:`C# and MongoDB </drivers/csharp>` for more information.
---
title: Stop or remove the MongoDB service as needed.
stepnum: 8
title: Stop or remove the MongoDB service.
stepnum: 7
level: 4
ref: stop
action:
- pre: |
Expand Down
Loading