In this tutorial, we will learn how to Installing MongoDB database tools same we need to follow the specific steps which are followed here where for each operating System we have some specific steps.
Step 1. Download the appropriate file from approved websites and make sure that it should have competitive packages according to the operating system and architecture.
Step 2. Now Extract the downloaded file at the location of your choice and put the bin directory of the downloaded file into the Path environment variable.
Step 3. now you are ready to check that installation is successful by simply executing a simple command mongo or mongodump.
For installing MongoDB in different operating Systems we need to execute different commands that we will discuss here one by one.
For installing MongoDB on the window operating System we simply need to install the .exe file downloaded file a trusted website at a location of your choice and add the directory of the installed location to the PATH of the environment variable so that we can directly access it through command prompt.
There are some different commands to install the same for different operating systems like MacOS and Linux Ubuntu. That we will discuss here.
To run the same MongoDB on macOS first step that we need to do is install Homebrew if did not install it before for the same simply follow the command by copying from here and past it in the terminal.
/bin/ bash -c "$(curl -fsSL https://raw. git hub usercontent.com/ Homebrew/ install/ HEAD/ install.sh)"
And after installing it we can go for installing MongoDB directly by y by using the command given below.
brew install mongodb/ brew/ mongodb- database- tools
And for checking the installation simply run the command mongo or ‘mongodump’.
For installing the same in Linux ubuntu we need to follow five steps that we will explain here and to make it simple we are going to provide the code also here so that we can simply get it done by simply copying and pasting.
Step 1. Firstly we need to import MongoDB public GPG key by making the command given below and run in the terminal.
wget -qO - https://www.mongodb.org/ static/ pgp/ server-4.4.asc | sudo apt-key add -
Step 2. We have the next step is creating a source file of MongoDB simply by running the command given below.
echo "deb [ arch= amd64, arm64 ] https://repo. mongodb. org/ apt/ ubuntu $( lsb_ release -cs)/ mongodb-org/ 4.4 multiverse" | sudo tee / etc/ apt/ sources. list.d/ mongodb- org-4.4. list
Step 3. Here we will update the packages of MongoDB by applying the command given below.
sudo apt-get update
Step 4. Now the final step is to install the .exe file by running the command given below.
sudo apt-get install mongodb- database- tools
And after installing all the packages we ca check the installation’s success by running the mongo or ‘mongodump’ command.
To learn more about Installing MongoDB database tools: Installation setup of MongoDB.
To learn more about MongoDB tutorials and solutions to the problems faced during using of MongoDB visit: MongoDB Problems And Tutorials.