Hey did everyone this year and welcome to the video of how to install MongoDB on Windows ten.
Now this video is exactly the same.
If you are having any other operations or slide here and there, it's just the same installation process.
Now again, the installation process for Windows is much more easier as compared to the Linux or the
Mac OS.
So without wasting any more time, let's directly jump into the installation process.
Now, installation is straightforward.
First and foremost, go to MongoDB and click on this top blue, top green button that says Get MongoDB.
Once you go on to that, what we require is actually not the cloud but the server addition because we
want to run MongoDB locally on our system.
Now again, I would like to recommend you that MongoDB only supports the 64 bit architecture and in
fact, most of the people are now switching to 64 bit architecture if still you are on Windows or any
other on a 32 bit.
Please go ahead and switch that and we can see that's the right version.
So once you click on the download, it's going to download the MSI Microsoft Installer for you.
And that's basically what we need on the base end.
Now we're going to put the star to the installation process and then I'll walk you some of the gotchas,
like where the problem hits up.
So I have already downloaded this one to save some of us our time.
So we're going to just download, I'm going to just minimize it for a moment and I have got this one
here, so I'm going to just make it up and running with MongoDB.
There we go.
Hit the run there.
And the installation is pretty straightforward, just like you have installed any other thing on windows.
It just always next.
Next.
I agree.
Click.
Okay.
So next.
Of course I want to accept the terms and agreement in case you want to go ahead and read all of that,
I would like to agree for all of it.
Click on next.
Now we got two options complete and custom for most users.
In fact, 95% of the user complete is actually what we require we're going to hit on complete.
And there we go.
Now make sure you understand one thing that it is run service.
As network service users, you always want to check that and also you want to keep this check mark there
which says install MongoDB as a service.
What it will allow you to do is allow you MongoDB to run as a service and this is exactly what we want.
Also note down these directories here.
It's getting installed on C Drive program files.
We might need to go there later on.
So just click on next there.
Just remember that and it says I want to install MongoDB campus as well.
We're going to click on next and we don't mind if it installs the campus as well.
Okay.
So by the time it does a job, I would like to and make sure if it prompts any security warnings or
anything, just allow it.
It's totally fine.
It's totally okay.
So now in the meantime, it's copying the file and doing the installation.
I would like to point your focus on to some documentation.
So click on this upper link which says Docs.
Docs are a little bit like they are properly arranged, but sometimes it's hard to find for the beginner
the exact right point where they want to go.
So click on this MongoDB server because that's exactly what we are looking for and we are looking for
the installation instruction here and please pardon my cursor some time.
It blinks on window.
I don't know why and we want to install the community edition, so we are going to look into the documentation
of community addition.
Of course we are on Windows, so click on Windows and this is the exact page in case you face any other
error, maybe later on.
This is the page which is going to help you much here.
It looks like my installer is asking for some things, so we're going to click on Finish and there we
go.
Now it is installed.
Now things are not done yet.
Make sure you just scroll down a little bit onto the installation process.
Notice we have done all these steps for the MSI installer, now we want to run it.
So the running process is pretty easy.
So we're going to just keep on scrolling because we have done all of this part here.
We can keep on scrolling and there we go.
When it says If you are to install MongoDB as a service, this is the command that you might want to
run.
So we're going to run this entire command.
So I'm going to hit control C to copy this.
I'm going to go on my command prompt, hit the windows and type cmd command prompt.
I want to open you and I want to paste this here and I'm going to hit enter.
There we go.
Now, if you are seeing this tilde arrow here, that means everything is good and we have got MongoDB
successfully installed here.
Now again, I cannot zoom it much here, but this is exactly what we are looking for.
That means installation is pretty okay.
Now let me tell you a couple of things which what used to be a problem and how to resolve that in some
of the previous versions.
I'm going to press control C to kill this process right now.
This is all good.
Now, in some of the previous versions of MongoDB, you were required to create data directory and DB
directory manually.
So in case you are working with some of the previous versions, again, a big notification here.
You don't.
Not need to do this if you are not an experienced user.
In the previous one versions of MongoDB, if you are installing it on a Windows, you need to run an
extra command.
This is completely optional, which is make directory and it requires a slash data and slash.
I forgot that it was data and DB data and db.
It is all written up here.
Now, one very crucial thing that I would like to talk to you is whenever I'm going to be teaching you
anything, I expect you that you will always be running this command.
But when you run this command.
One thing I wanted to show you is let me open up this.
I want to go into C directory.
There we go.
I want to go into my C directory.
There we go inside the program files.
This is my program files and I want to check out MongoDB.
Let me explore that.
And I want to go into MongoDB and in the server make sure that if whatever the version you are installing
this is exactly written here like 4.0.
So note it down somewhere.
When you go back into the documentation, whatever the command you are running, this should be exactly
same.
If your version is 4.2, make sure you're writing in the command.
4.2 If your version is five, make sure you write the version five here for all the versions which are
I guess like less than four requires you to create an extra directory, which is slash data, slash
DB for all the people who are watching the video right now.
You don't need to do anything.
Okay.
It's pretty straightforward installation process.
Now, one more thing.
I know I've said it a lot, but one more last thing here.
Whenever, whenever I'm going to be teaching you MongoDB, I will assume that you will open up your
command prompt, run this entire line of command here and hit enter and we'll keep it up and running.
You can always minimize this and keep it up and running.
I will not mention it again any further in this entire tutorial series that hey, why my MongoDB is
not working.
Hey, you forgot to run that command, so make sure you keep it a note somewhere or just hang it on
the wall that whenever I need to go up, I need to get started with MongoDB as a server and that command
will help you.
I'll probably just bookmark this page or something if you are interested.
Again, pretty straightforward.
Previously it was a little bit tricky with the DB path and the log path, but now they have figured
it out all through the installation process.
I'm really happy that they have just nailed it down everything so smoothly.
So that's it for this video.
And from the very next video, we're going to be learning about MongoDB Shell and we'll be performing
definitely the crowd operations.
In case you are new here, make sure you hit that subscribe button on my YouTube channel and we'll catch
you up in the next video.