From cb556f1dd16b82dd9f02aeecebfebb58c5099242 Mon Sep 17 00:00:00 2001 From: Andrew Feierabend Date: Wed, 22 Apr 2020 11:48:59 -0400 Subject: [PATCH] DOCSP-10020 add download header to mongo shell doc --- source/includes/fact-download-mongo-shell.rst | 17 +++++--- source/mongo.txt | 40 +++++++++++-------- 2 files changed, 36 insertions(+), 21 deletions(-) diff --git a/source/includes/fact-download-mongo-shell.rst b/source/includes/fact-download-mongo-shell.rst index 7d478b53b62..ca8c57f9672 100644 --- a/source/includes/fact-download-mongo-shell.rst +++ b/source/includes/fact-download-mongo-shell.rst @@ -1,7 +1,11 @@ -The :binary:`~bin.mongo` shell is included as part of the :doc:`MongoDB Server -` installation. MongoDB also provides the :binary:`~bin.mongo` -shell as a standalone package. To download the standalone :binary:`~bin.mongo` -shell package: +The :binary:`~bin.mongo` shell is included as part of the :doc:`MongoDB +server installation `. If you have already installed the +server, the :binary:`~bin.mongo` shell is installed to the same location +as the server binary. + +Alternatively, if you would like to download the :binary:`~bin.mongo` +shell separately from the MongoDB Server, you can install the shell as +a standalone package by following these steps: 1. Access the Download Center for your Edition of MongoDB: @@ -38,5 +42,8 @@ shell package: * - *Linux* - - Select the ``shell`` package to download the + - Select the ``tgz`` package to download the :binary:`~bin.mongo` shell. + +4. Copy the :binary:`~bin.mongo` shell from the archive to a location on + your filesystem. diff --git a/source/mongo.txt b/source/mongo.txt index 1a150e21a17..176bc1a5ad5 100644 --- a/source/mongo.txt +++ b/source/mongo.txt @@ -14,37 +14,45 @@ The :binary:`~bin.mongo` shell is an interactive JavaScript interface to MongoDB. You can use the :binary:`~bin.mongo` shell to query and update data as well as perform administrative operations. +Download the ``mongo`` Shell +---------------------------- + .. include:: /includes/fact-download-mongo-shell.rst -Once you have :doc:`installed and have started MongoDB `, connect -the :binary:`~bin.mongo` shell to your running MongoDB instance. +Start the ``mongo`` Shell and Connect to MongoDB +------------------------------------------------ + +Once you have downloaded the :binary:`~bin.mongo` shell, you can use it +to connect to your running MongoDB server. .. note:: .. include:: /includes/extracts/4.2-changes-mongoshell-emulation.rst -Start the ``mongo`` Shell and Connect to MongoDB ------------------------------------------------- - Prerequisites ~~~~~~~~~~~~~ -Ensure that MongoDB is running before attempting to start the -:binary:`~bin.mongo` shell. +- The MongoDB server must be installed and running before you can + connect to it from the :binary:`~bin.mongo` shell. Follow the steps in + the :doc:`installation tutorial for your platform ` + to install and start the MongoDB server if required. -Open a terminal window (or a command prompt for Windows) and go to your -``/bin`` directory: +- Once you have verified that the :binary:`~bin.mongod` server is + running, open a terminal window (or a command prompt for Windows) and + go to your ```` directory: -.. code-block:: sh + .. code-block:: sh - cd /bin + cd -.. tip:: + .. tip:: - Adding your ``/bin`` to the ``PATH`` - environment variable allows you to type ``mongo`` instead of having - to go to the ``/bin`` directory or specify - the full path to the binary. + Adding your ```` to the ``PATH`` + environment variable allows you to type ``mongo`` directly instead + of having to first go to the ```` + directory or specify the full path to the binary. Alternatively, you + can copy the ``mongo`` shell to a location on your filesystem that + is already present in your ``PATH``, such as ``/usr/bin`` on Linux. Local MongoDB Instance on Default Port ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~