Skip to content

DOCS-5527: Improve Windows installation guide #2327

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
7 changes: 7 additions & 0 deletions source/includes/release-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,11 @@ code: |
curl -O https://downloads.mongodb.com/{{platform}}/mongodb-{{platform}}-{{builder}}-enterprise-{{distro}}-{{version}}.tgz
tar -zxvf mongodb-{{platform}}-{{builder}}-enterprise-{{distro}}-{{version}}.tgz
cp -R -n mongodb-{{platform}}-{{builder}}-enterprise-{{distro}}-{{version}}/ mongodb
---
ref: _install-windows
language: powershell
code: |
msiexec.exe /q /i mongodb-win32-x86_64-2008plus-ssl-{{version}}-signed.msi ^
INSTALLLOCATION="{{location}}" ^
ADDLOCAL="{{addlocal}}"
...
18 changes: 17 additions & 1 deletion source/includes/release-specifications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,20 @@ replacement:
platform: 'linux'
distro: 'amzn64'
builder: 'x86_64'
...
---
ref: install-windows-default
source:
file: release-base.yaml
ref: _install-windows
replacement:
location: 'C:\mongodb'
addlocal: 'all'
---
ref: install-windows-addlocal
source:
file: release-base.yaml
ref: _install-windows
replacement:
location: 'C:\mongodb'
addlocal: 'MonitoringTools,ImportExportTools,MiscellaneousTools'
...
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pre: |
.. important::

Run all of the following commands in :guilabel:`Command Prompt` with
"Administrative Privileges:"
"Administrative Privileges"
action:
- pre: |
Install the MongoDB service. For :option:`--install <mongod.exe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,9 @@ title:
character: "~"
stepnum: 1
ref: open-command-prompt
action:
- heading:
text: Windows 7 / Vista / Server 2008 (and R2)
character: "`"
pre: |
Press ``Win + R``, then type ``cmd``, then press ``Ctrl + Shift + Enter``.
- heading:
text: Windows 8
character: "`"
pre: |
Press ``Win + X``, then press ``A``.
pre: |
Press the ``Win`` key, type ``cmd.exe``, and press ``Ctrl + Shift + Enter``
to run the :guilabel:`Command Prompt` as Administrator.
post: |
Execute the remaining steps from the Administrator command prompt.
---
Expand Down Expand Up @@ -53,7 +45,7 @@ action:
- pre: "Create the MongoDB service."
language: powershell
code: |
sc.exe create MongoDB binPath= "\"C:\mongodb\bin\mongod.exe\" --service --config=\"C:\mongodb\mongod.cfg\"" DisplayName= "MongoDB" start= "auto"
sc.exe create MongoDB binPath= "C:\mongodb\bin\mongod.exe --service --config=\"C:\mongodb\mongod.cfg\"" DisplayName= "MongoDB" start= "auto"
post: |
``sc.exe`` requires a space between "=" and the configuration values
(eg "binPath= "), and a "\\" to escape double quotes.
Expand Down
84 changes: 38 additions & 46 deletions source/includes/steps-install-mongodb-on-windows-unattended.yaml
Original file line number Diff line number Diff line change
@@ -1,52 +1,44 @@
title: Install MongoDB for Windows.
stepnum: 1
inherit:
file: steps-create-manually-windows-service-for-mongodb.yaml
ref: open-command-prompt
---
title: Install MongoDB for Windows.
stepnum: 2
ref: install
action:
pre: |
Open a shell in the directory containing the ``.msi`` installation
binary of your choice and invoke:
language: powershell
code: |
msiexec.exe /q /i mongodb-<version>-signed.msi INSTALLLOCATION="<installation directory>"
Change to the directory containing the ``.msi`` installation binary of your
choice and invoke:

.. include:: /includes/release/install-windows-default.rst
post: |
By default, this method installs the following MongoDB binaries:
``mongod.exe``, ``mongo.exe``, ``mongodump.exe``,
``mongorestore.exe``, ``mongoimport.exe``, ``mongoexport.exe``,
``mongostat.exe``, and ``mongotop.exe``.
You can specify the installation location for the executable by
modifying the ``<installation directory>`` value. To install specific
subsets of the binaries, you may specify an ``ADDLOCAL`` argument:

.. code-block:: powershell

msiexec.exe /q /i mongodb-<version>-signed.msi INSTALLLOCATION="<installation directory>" ADDLOCAL=<binary set(s)>

The ``<binary set(s)>`` value is a comma-separated list including one
or more of the following:

- ``Server`` - includes ``mongod.exe``

- ``Client`` - includes ``mongo.exe``

- ``MonitoringTools`` - includes ``mongostat.exe`` and ``mongotop.exe``

- ``ImportExportTools`` - includes ``mongodump.exe``,
``mongorestore.exe``, ``mongoexport.exe``, and ``mongoimport.exe``)

- ``MiscellaneousTools`` - includes ``bsondump.exe``,
``mongofiles.exe``, ``mongooplog.exe``, and ``mongoperf.exe``

For instance, to install *only* the entire set of tools to
``C:\mongodb``, invoke:

.. code-block:: powershell

msiexec.exe /q /i mongodb-<version>-signed.msi INSTALLLOCATION="C:\mongodb" ADDLOCAL=MonitoringTools,ImportExportTools,MiscellaneousTools

You may also specify ``ADDLOCAL=ALL`` to install the complete set of
binaries, as in the following:

.. code-block:: powershell

msiexec.exe /q /i mongodb-<version>-signed.msi INSTALLLOCATION="C:\mongodb" ADDLOCAL=ALL
...
modifying the ``INSTALLLOCATION`` value.

By default, this method installs all MongoDB binaries. To install specific
MongoDB component sets, you can specify them in the ``ADDLOCAL`` argument
using a comma-separated list including one or more of the following
component sets:

.. list-table::
:widths: 20 80

* - **Component Set**
- **Binaries**
* - ``Server``
- ``mongod.exe``
* - ``Router``
- ``mongos.exe``
* - ``Client``
- ``mongo.exe``
* - ``MonitoringTools``
- ``mongostat.exe``, ``mongotop.exe``
* - ``ImportExportTools``
- ``mongodump.exe``, ``mongorestore.exe``, ``mongoexport.exe``, ``mongoimport.exe``
* - ``MiscellaneousTools``
- ``bsondump.exe``, ``mongofiles.exe``, ``mongooplog.exe``, ``mongoperf.exe``

For instance, to install *only* the MongoDB utilities, invoke:

.. include:: /includes/release/install-windows-addlocal.rst