Big Data and Hadoop (170 Blogs) Become a Certified Professional
AWS Global Infrastructure

Big Data

Topics Covered
  • Big Data and Hadoop (146 Blogs)
  • Hadoop Administration (7 Blogs)
  • Apache Storm (4 Blogs)
  • Apache Spark and Scala (29 Blogs)
SEE MORE

How To Install MongoDB On Windows Operating System?

Published on Sep 30,2019 787 Views

How To Install MongoDB On Windows Operating System?

MongoDB is one of the most popular relational database management software available in the market today. If you have been using some form of relational database management software for sometime now, there is a high probability that you have heard about MongoDB as well. Assuming that you are new to using the MongoDB platform, the first step will be to install MongoDB on Windows operating system and in this article we will talk more about just that. 

Following pointers will be covered in this article

Let us begin then,

Pre-Requisites 

Before you can go ahead and install MongoDB on Windows operating system, make sure that you are familiar with the OS commands as this will be required in the duration of this tutorial. 

In order to install MongoDB Windows OS follow the steps outlined below.

Output - Install MongoDB On WIndows - Edureka

  1. Visit this website (https://www.mongodb.org/downloads#production) and download the latest version of MongoDB available for your system.

  2. Once the download is complete, locate the .msi file using your Windows Explorer. Double click on the file and follow the prompts shown on the screen to install Mongo on your system. Note: If you don’t mention a custom directory where you would like the MongoDB software to be installed, then it will by default get installed in the path C:mongodb directory. On the other hand, if you customize the settings, you can install MongoDB in any other directory present in your system, for example C:Program FilesMongoDBServer3.2. While making the choice of where to install MongoDB, always make sure that you take into account your use and processing power your system has. These will be helpful in determining how fast the system will run once installed.

  3. Once the installation process of MongoDB is completed on your system, you need to go ahead and create a directory for storing the files and collections you create within the MongoDB architecture. In order to do this in your Windows system, first start Run, open the cmd or Command Prompt and enter the following command: md datadb. If you had installed MongoDB on the default directory as prescribed by the Installation Wizard then this command will work for you. If in a certain situation, you have installed MongoDB at some other directory in your computer, then you need to specify the path of the same by using the command, –dbpath. You can additionally visit the following website to get more details regarding the same, https://docs.mongodb.org/v3.0/tutorial/install-mongodb-on-windows/#set-up-the-mongodb-environment.

  4. Once the software has been installed and the directory has been defined, you can move on to starting the MongoDB daemon. In order to do this in the Windows Architecture, first open the Command Prompt and type in the command, C:mongodbbinmongod.exe. Alternatively you can also make use of the command, C:pathtomongodbbinmongod.exe to achieve the same result. 

  5. Now that your Mongo daemon is open, the next step is to connect MongoDB using the MongoDB shell. In order to do this, open the command prompt again in a new window and type the following command: C:mongodbbinmongo.exe. 

To install MongoDB on Windows, we need to install Java drivers,

Installing Java Drivers on MongoDB in Windows

Now that the installation of MongoDB is complete on your windows system, it is time to go ahead and install the java drivers. In MongoDB a java driver is basically used to connect the client to the host and thus facilitate a transmission between the two. In order to install the Java driver, follow the steps mentioned below. 

Output - Install MongoDB on Windows - Edureka

 

  1. Locate the following path on your Windows system, C:Program FilesMongoDBServer4.0bin and click on the icon which reads mongo.exe. An alternate way to do this is by double clicking on the MongoDB icon present on your screen.

  2. Once the MongoDB Shell has opened, enter the following command into it: var myMessage=’Hello World’;

printjson(myMessage);

In the above code we are using a simple JavaScript to declare a variable and store the string Hello World inside it. Then we are making use of the printjson function to print the result of the same onto the screen of the user. 

Moving on let us see how to install Python Driver,

Install Python Driver

  1. Make sure that you already have Python installed on your system.
  2. Once the above has been confirmed, enter the following command on to the Python IDLE to install the required Python drivers. 

gem update -system

  1. Once this is done, enter the following command to install the required mongo drivers onto your Windows system.

gem install mongo

And there you go, this is how you install MongoDB on windows.

Now that you have understood what is Big Data, check out the Big Data training by Edureka, a trusted online learning company with a network of more than 250,000 satisfied learners spread across the globe. The Edureka Big Data Hadoop Certification Training course helps learners become expert in HDFS, Yarn, MapReduce, Pig, Hive, HBase, Oozie, Flume and Sqoop using real-time use cases on Retail, Social Media, Aviation, Tourism, Finance domain.

Got a question for us? Mention them in the comments section and we will get back to you.

Upcoming Batches For Big Data Hadoop Certification Training Course
Course NameDate
Big Data Hadoop Certification Training Course

Class Starts on 11th February,2023

11th February

SAT&SUN (Weekend Batch)
View Details
Big Data Hadoop Certification Training Course

Class Starts on 8th April,2023

8th April

SAT&SUN (Weekend Batch)
View Details
Comments
0 Comments

Join the discussion

Browse Categories

webinar REGISTER FOR FREE WEBINAR
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP

Subscribe to our Newsletter, and get personalized recommendations.

image not found!
image not found!

How To Install MongoDB On Windows Operating System?

edureka.co