Mongo DatabaseWeb Development

MongoDB (Mongo Database) installation in Windows 10, 8 and 7 ?

In this web guide you will learn how to install mongodb (Mongo Database) on Window 10, 8 and 7. Mongo DB is basically a database in which we store data in a very large amount. It is totally different if we compare mongo db with MySQL. Mongo Database is basically used in websites in which data quantity is very high and needs speed for serving data. Let’s start installing Mongo DB on Windows 10, 8 and 7.

Steps to Install Mongo Database on Windows 10, 8 and 7

1. First download latest version of Mongo DB from their official website . When you open you will see many options for downloading. Just choose community server and select your operating system.

2. After download setup file right click on it and run as administrator. A window will open like below

Mongo DB Installation Windows Screen Shot 1
Mongo DB Installation Windows

3.  Check Terms and conditions of Mongo DB and when you click next second window will open like below

Mongo DB Installation Windows Screen Shot 2
Mongo DB Installation Windows

4. You can see two options one is complete installation and second is custom. To make it easy we will choose custom option so we can install it in root directory of your windows. When you click custom a window will open like below :-

Mongo DB Installation Windows Screen Shot 3
Mongo DB Installation Windows

5. You can see browse button on right side of Location. Change Location from

C:\Program Files\MongoDB\Server\3.4\

Mongo DB Installation Windows Screen Shot 4
Mongo DB Installation Windows

to

C:\mongodb

Mongo DB Installation Windows Screen Shot 5
Mongo DB Installation Windows
Mongo DB Installation Windows Screen Shot 6
Mongo DB Installation Windows

Then click on next button for proceeding the installation. Another window will open like below ..

Mongo DB Installation Windows Screen Shot 7
Mongo DB Installation Windows

Click on Install and wait till the installation is completed.

6. After installation open directory where you have install mongodb library that is C:\mongodb then open bin folder in it.

Mongo DB Installation Windows Screen Shot 8
Mongo DB Installation Windows

7. Copy the path C:\mongodb\bin then click on start menu and search for advance system settings and open it

Mongo DB Installation Windows Screen Shot 9
Mongo DB Installation Windows

8. A new window will open that will show advance system settings for your operating system. Click on Environment Variables for adding mongo DB Path for global access.

Mongo DB Installation Windows Screen Shot 10
Mongo DB Installation Windows

9. A new window will open like below

Mongo DB Installation Windows Screen Shot 10
Mongo DB Installation Windows

 

10.  Click on Edit button as mention above screenshot then a window will open that allow you to add path

 

Mongo DB Installation Windows Screen Shot 11
Mongo DB Installation Windows

Paste your mongodb path in variable value as show above and click ok  as shown in above screenshot.

10.  Mongo DB Windows Installation is completed

Why we set environment variables for mongo db ?

For running mongo db you have to open installation folder and then open command prompt to run windows. But if you have set environment variable for mongo db then you don’t need to go installation folder just simple open cmd anywhere and run Mongo DB.

How to run MongoDB after setting environment variables ?

Just simply open command prompt by searching it on start menu or if you know shortcuts then go for it.

Mongo DB Installation Windows Screen Shot 12
Mongo DB Installation Windows
Mongo DB Installation Windows Screen Shot 13
Mongo DB Installation Windows

Now run command “mongod” like below

Hit Enter some processing will start and ends  like below

Mongo DB Installation Windows Screen Shot 14
Mongo DB Installation Windows

mongod command will activate mongodb default port that is 27017 but it does not start mongodb. For starting mongodb just minimize current command prompt window and open another command prompt window.

When you open new command prompt window type mongo as shown below

Mongo DB Installation Windows Screen Shot 15
Mongo DB Installation Windows

And hit enter to start mongo db.

Mongo DB Installation Windows Screen Shot 16
Mongo DB Installation Windows

That’s it, you can see warnings just ignore it your mongo db is working fine. Warnings are due to anonymous starting mongo db . You can authenticate using username and password then these warnings will not show. We will discuss it in next tutorial.

How to check Mongo DB is running in Windows ?

For checking mongo db is working or not just open any browser and type address http://localhost:27017 you will see below screenshot

Mongo DB Installation Windows Screen Shot 17
Mongo DB Installation Windows

If your mongo db not working then this link will not work. Be sure that both command prompt windows are open while using mongo db.

Category : Web Development

 

 

 

Anil Mehra

I am Anil Mehra, a passionate, workaholic and a Full Stack Tech Savvy Programmer with true north towards growth. I have worked on 256 live projects in MNC. I am expertise in the field of Programming, Server Management, SEO, Blogging and SMO...

Related Articles

Leave a Reply

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

Back to top button

Adblock Detected

Please turn off Ad blocker to view website