Skip to content

Commit 888d137

Browse files
jeff-allen-mongoJeff Allen
andauthored
(DOCSP-12464): Update install steps for PPA (#68)
* (DOCSP-12464): Update install steps for PPA * tweaks per review * Fix log and preference directories Co-authored-by: Jeff Allen <jeffrey.allen@mongodb.com>
1 parent d73d1ef commit 888d137

File tree

5 files changed

+176
-48
lines changed

5 files changed

+176
-48
lines changed

snooty.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ toc_landing_pages = ["/run-commands", "/crud", "/field-level-encryption"]
88
[constants]
99

1010
version = "0.8.2"
11+
mdb-version = "4.4"
12+
mdb-version-dev = "4.3"
13+
pgp-version = "{+mdb-version+}"
1114

1215
[substitutions]
1316

Lines changed: 102 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,111 @@
1+
title: Import the public key used by the package management system.
2+
stepnum: 1
3+
level: 4
4+
ref: import-key
5+
content: |
6+
From a terminal, issue the following command to import the
7+
MongoDB public GPG Key from `<https://www.mongodb.org/static/pgp/server-{+pgp-version+}.asc>`_:
8+
9+
.. code-block:: sh
10+
11+
wget -qO - https://www.mongodb.org/static/pgp/server-{+pgp-version+}.asc | sudo apt-key add -
12+
13+
The operation should respond with an ``OK``.
14+
15+
However, if you receive an error indicating that ``gnupg`` is not
16+
installed, you can:
17+
18+
#. Install ``gnupg`` and its required libraries using the following command:
19+
20+
.. code-block:: sh
21+
22+
sudo apt-get install gnupg
23+
24+
#. Once installed, retry importing the key:
25+
26+
.. code-block:: sh
27+
28+
wget -qO - https://www.mongodb.org/static/pgp/server-{+pgp-version+}.asc | sudo apt-key add -
129
---
2-
source:
3-
file: steps-install-shell-base.yaml
4-
ref: navigate-dlc
5-
ref: navigate-dlc-linux-deb
30+
title: Create a list file for MongoDB.
31+
stepnum: 2
32+
level: 4
33+
ref: sources-list
34+
content: |
35+
36+
Create the list file
37+
``/etc/apt/sources.list.d/mongodb-org-{+mdb-version+}.list`` for your
38+
version of Ubuntu.
39+
40+
Click on the appropriate tab for your version of Ubuntu.
41+
If you are unsure of what Ubuntu version the host is running,
42+
open a terminal or shell on the host and execute ``lsb_release -dc``.
43+
44+
.. tabs::
45+
46+
tabs:
47+
- id: focal
48+
name: Ubuntu 20.04 (Focal)
49+
content: |
50+
51+
The following instruction is for **Ubuntu 20.04 (Focal)**.
52+
For Ubuntu 18.04 (Bionic) click on the appropriate tab.
53+
54+
Create the
55+
``/etc/apt/sources.list.d/mongodb-org-{+mdb-version+}.list``
56+
file for Ubuntu 20.04 (Focal):
57+
58+
.. code-block:: sh
59+
60+
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/{+mdb-version+} multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-{+mdb-version+}.list
61+
62+
- id: bionic
63+
name: Ubuntu 18.04 (Bionic)
64+
content: |
65+
66+
The following instruction is for **Ubuntu 18.04
67+
(Bionic)**. For Ubuntu 20.04 (Focal) click on the
68+
appropriate tab.
69+
70+
Create the
71+
``/etc/apt/sources.list.d/mongodb-org-{+mdb-version+}.list``
72+
file for Ubuntu 18.04 (Bionic):
73+
74+
.. code-block:: sh
75+
76+
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/{+mdb-version+} multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-{+mdb-version+}.list
677
---
7-
title: "Download the Debian 64-bit ``.deb`` package."
8-
ref: download-archive-rhel
9-
level: 4
78+
title: Reload local package database.
79+
stepnum: 3
80+
level: 4
81+
ref: reload
82+
content: |
83+
84+
Issue the following command to reload the local package database:
85+
86+
.. code-block:: sh
87+
88+
sudo apt-get update
1089
---
11-
title: "Extract and install the ``.deb`` package."
12-
ref: extract-archive-linux-deb
90+
title: Install the ``mongosh`` package.
91+
stepnum: 4
1392
level: 4
93+
ref: install
1494
content: |
15-
To install the |mdb-shell|, run the following command from the
16-
directory containing the ``mongosh`` ``.deb`` package:
95+
96+
To install the latest stable version of ``mongosh``, issue the
97+
following command:
1798
1899
.. code-block:: sh
19100
20-
sudo dpkg --install mongosh_{+version+}_amd64.deb
101+
sudo apt-get install -y mongosh
102+
103+
Optional. ``apt-get`` will upgrade the packages when a newer version
104+
becomes available. To prevent unintended upgrades, you can pin the
105+
package at the currently installed version:
106+
107+
.. code-block:: sh
108+
109+
echo "mongosh hold" | sudo dpkg --set-selections
110+
21111
...
Lines changed: 39 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,46 @@
1+
title: Configure the package management system (``yum``).
2+
stepnum: 1
3+
level: 4
4+
ref: config-yum
5+
content: |
6+
7+
Create a ``/etc/yum.repos.d/mongodb-org-{+mdb-version+}.repo`` file so that
8+
you can install ``mongosh`` directly using ``yum``:
9+
10+
.. code-block:: sh
11+
12+
[mongodb-org-{+mdb-version+}]
13+
name=MongoDB Repository
14+
baseurl=https://repo.mongodb.org/yum/{{distro_name}}/{{distro_release}}/mongodb-org/{+mdb-version+}/x86_64/
15+
gpgcheck=1
16+
enabled=1
17+
gpgkey=https://www.mongodb.org/static/pgp/server-{+pgp-version+}.asc
18+
19+
You can also download the ``.rpm`` files directly from the
20+
{{distro_link}}. Downloads are organized by {{distro_name_full}}
21+
version (e.g. ``{{distro_num}}``), then MongoDB
22+
:manual:`release version </reference/versioning>`
23+
(e.g. ``{+mdb-version+}``), then architecture (e.g. ``x86_64``).
24+
Odd-numbered MongoDB release versions, such as
25+
``{+mdb-version-dev+}``, are development versions and are
26+
unsuitable for production deployment.
27+
replacement:
28+
distro_name: "redhat"
29+
distro_link: "`MongoDB repository <https://repo.mongodb.org/yum/redhat/>`_"
30+
distro_release: "$releasever"
31+
distro_name_full: "Red Hat / CentOS"
32+
distro_num: "7"
133
---
2-
source:
3-
file: steps-install-shell-base.yaml
4-
ref: navigate-dlc
5-
ref: navigate-dlc-linux-rpm
6-
---
7-
title: "Download the Red Hat 64-bit ``.rpm`` package."
8-
ref: download-archive-rhel
9-
level: 4
10-
---
11-
title: "Extract and install the ``.rpm`` package."
12-
ref: extract-archive-rpm
34+
title: Install ``mongosh``.
35+
stepnum: 2
1336
level: 4
37+
ref: install
1438
content: |
15-
To install the |mdb-shell|, run the following command from the
16-
directory containing the ``mongosh`` ``.rpm`` package:
39+
40+
To install the latest stable version of ``mongosh``, issue the following
41+
command:
1742
1843
.. code-block:: sh
1944
20-
sudo yum install -y mongosh-{+version+}-x86_64.rpm
45+
sudo yum install -y mongosh
2146
...

source/includes/steps-view-logs.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,20 +69,20 @@ content: |
6969
7070
.. code-block:: sh
7171
72-
%UserProfile%/.mongodb/mongosh/<LogID>_log
72+
%UserProfile%/AppData/Local/mongodb/mongosh/<LogID>_log
7373
7474
Run the following PowerShell command to view the log for a session:
7575
7676
.. code-block:: sh
7777
78-
Get-Content %UserProfile%/.mongodb/mongosh/<LogID>_log
78+
Get-Content %UserProfile%/AppData/Local/mongodb/mongosh/<LogID>_log
7979
8080
Run the following PowerShell command to tail the log for a
8181
session:
8282
8383
.. code-block:: sh
8484
85-
Get-Content %UserProfile%/.mongodb/mongosh/<LogID>_log -Wait
85+
Get-Content %UserProfile%/AppData/Local/mongodb/mongosh/<LogID>_log
8686
8787
.. tip::
8888
@@ -94,6 +94,6 @@ content: |
9494
9595
.. code-block:: sh
9696
97-
Get-Content %UserProfile%/.mongodb/mongosh/<LogID>_log -Wait | pino-colada
97+
Get-Content %UserProfile%/AppData/Local/mongodb/mongosh/<LogID>_log -Wait | pino-colada
9898
9999
...

source/install.txt

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ Procedure
3838

3939
.. note::
4040

41-
``mongosh`` preferences are stored by default in the directory
42-
``C:\Users\<username>\AppData\Roaming``.
41+
On Windows, ``mongosh`` preferences and configuration options
42+
are stored in the ``%APPDATA%/mongodb/mongosh`` directory.
4343

4444
.. tab::
4545
:tabid: macos
@@ -87,11 +87,35 @@ Procedure
8787
.. tab::
8888
:tabid: linux
8989

90+
Considerations for Ubuntu
91+
~~~~~~~~~~~~~~~~~~~~~~~~~
92+
93+
- ``mongosh`` is available as a
94+
:abbr:`PPA (Personal Package Archive)` for Ubuntu 20.04 (Focal)
95+
and Ubuntu 18.04 (Bionic).
96+
97+
- If you are using Ubuntu 20.04 (Focal) or Ubuntu 18.04
98+
(Bionic), use the procedure in the ``.deb`` tab.
99+
100+
- If you are using Ubuntu 16.04 (Xenial), you must
101+
obtain the ``mongosh`` tarball using the procedure in the
102+
``.tgz`` tab.
103+
104+
- The ``mongocryptd`` binary in the |mdb-shell| ``.deb``
105+
package does not work on Ubuntu 16.04 or older. On
106+
Ubuntu 16.04 and older systems, you must
107+
:manual:`install </reference/security-client-side-encryption-appendix/#installation>`
108+
the ``mongocryptd`` binary separately to use its
109+
functionality in the |mdb-shell|.
110+
111+
Procedure
112+
~~~~~~~~~
113+
90114
Select the appropriate tab based on your Linux distribution and
91115
desired package from the tabs below:
92116

93-
- To install the ``.deb`` package on Ubuntu and Debian,
94-
click the ``.deb`` tab.
117+
- To install the ``.deb`` package on Ubuntu 20.04 (Focal), Ubuntu
118+
18.04 (Bionic), and Debian, click the ``.deb`` tab.
95119

96120
- To install the ``.rpm`` package on
97121
:abbr:`RHEL (Red Hat Enterprise Linux)`, click the
@@ -104,15 +128,6 @@ Procedure
104128
.. tab:: .deb
105129
:tabid: deb
106130

107-
.. note::
108-
109-
The ``mongocryptd`` binary in the |mdb-shell| ``.deb``
110-
package does not work on Ubuntu 16.04 or older. On
111-
Ubuntu 16.04 and older systems, you must
112-
:manual:`install </reference/security-client-side-encryption-appendix/#installation>`
113-
the ``mongocryptd`` binary separately to use its
114-
functionality in the |mdb-shell|.
115-
116131
.. include:: /includes/steps/install-shell-linux-deb.rst
117132

118133
.. tab:: .rpm
@@ -125,11 +140,6 @@ Procedure
125140

126141
.. include:: /includes/steps/install-shell-linux-generic.rst
127142

128-
.. important:: Windows Users
129-
130-
``mongosh`` preferences are stored by default in the directory
131-
``C:\Users\<username>'\.mongodb\mongosh``.
132-
133143
Next Steps
134144
----------
135145

0 commit comments

Comments
 (0)