Platforms for MongoDB

MongoDB supports many platforms like Linux and Windows with 64-bit architecture for production and 64/32-bit architectures for testing purpose.

Let’s learn how MongoDB is installed on Linux platform –

MongoDB installation on Linux

The installation packages of 64 and 32 bits are available on the web for Linux. In order to install the tool, you need to download the suitable package.

Step 1 – Download the package : You can download the MongoDB packages from the following link –

download the package

Step 2 – Unzip the folder : Unzip the downloaded folder at the location where you would like to install the tool.

Step 3 – Create a data directory : The next step is to create a data directory manually in the root as the data are stored in this directory only.

Create a Data Directory

Step 4 – Run MongoDB server : The next task is to run the MongoDB server on the command prompt for which you need to execute the mongod.exe file from the bin folder inside the MongoDB folder.

Step 5 – Start Administrative Shell : Specify the bin directory location of the MongoDB package and run mongo.exe file. The administrative shell is a JavaScript shell and the moment you install MongoDB, it will connect you to the test document.

Installing MongoDB on Windows

MongoDB does not support Windows XP and in order to install it on Windows you need to have Windows Server 2008 R2, Windows Vista, or latest versions.
Step 1 – Download the MongoDB package : Understand your requirements and download the suitable package from the following link –

Step 2 – Install the MongoDB package : Find the MongoDB.msi file in the windows explorer which should be in the Downloads folder. Double click on the file and follow through the instruction to successfully complete the installation. You can also choose the ‘Custom’ option.
Step 3 – Create a data directory : Create a data directory by running following command –

md \data\db

MongoDB needs this folder to store all the data.
Step 4 – Execute MongoDB : Run MongoDB by executing mongod.exe on command prompt.

For example, "C:\Program Files\MongoDB\Server\3.4\bin\mongod.exe"


Recommended Videos

Leave a Reply

Your email address will not be published. Required fields are marked *