MongoDB official website provides client installation packages for different OSs. Download the official package at https://www.mongodb.com/download-center#community.
The following uses RedHat/CentOS 7.0 and MongoDB 4.0.28 as examples to describe how to obtain the required installation package and install the MongoDB client.
During the installation, select the client version that matches the instance version.
Figure 1 MongoDB official webpage

For details about how to log in to an ECS, see How Can I Create and Log In to an ECS?
Replace copylink with the actual download address.
tar zxvf mongodb-linux-x86_64-rhel70-4.0.28.tgz
cd mongodb-linux-x86_64-rhel70-4.0.28/bin
The common tools are as follows: