• Document Database Service

  1. Help Center
  2. Document Database Service
  3. User Guide
  4. FAQs
  5. Connection and Access FAQs
  6. How Can I Install a MongoDB Client?

How Can I Install a MongoDB Client?

MongoDB provides client installation packages for different OSs at its official website. You can download MongoDB from the official binary download page at https://www.mongodb.com/download-center#community.

The following uses Red Hat Linux 7 and MongoDB 3.2.7 as examples to describe how to obtain the required installation package and install the MongoDB client.


  1. Obtain the installation package.

    1. Log in at https://www.mongodb.com/download-center#community.
    2. Choose Server, select RHEL 7 Linux 64-bit x64 for OS, and click All version binaries. Figure 1 shows an example.
      Figure 1 MongoDB official webpage
    3. Open the downloading page, click linux/mongodb-linux-x86_64-rhel70-3.2.7.tgz to download the binary installation package of MongoDB 3.2.7.
      Figure 2 Downloading page

  2. Open the downloaded installation package. In the bin directory, select the required tools and upload them to the ECS.

    The common tools are as follows:

    • MongoDB client mongo
    • Data export tool mongoexport
    • Data import tool mongoimport

    When you create an ECS, select an OS, such as Red Hat 6.6, and bind an EIP to it. Then, upload the installation package to the ECS using a remote tool, and use PuTTY to connect to the ECS.

  3. Run the following commands to grant the permission to upload tools to the ECS:

    chmod +x mongo

    chmod +x mongoexport

    chmod +x mongoimport

  4. Ensure that the installation is successful by referring to section Connecting to a DB Instance.