In the previous lecture,
we installed MongoDB on macOS,
and we had a look at the documentation and so on.
In this lecture, we're going to install it on Windows.
Now, again, we're going to dive
into the Cloud offerings later.
For the software offerings, we, again,
wanna install the community server,
and now we wanna install the community server on Windows.
It should automatically select a correct Operating System
here on the right, if not, select Windows manually.
And then you can simply download the MSI package,
which is a installer,
which is more convenient to use to install MongoDB,
than using the SIP file.
So let's download this installer
and this can take a short while until it's done,
since the package is a rather big.
But I'll be back once the download finished,
and then we're going to walk
through this installer together.
Okay, so the installation finished for me.
Now I'll start this installer,
and we'll walk through that together.
Of course, we have to accept the license agreement,
and then I'll choose the custom installation mode here.
Now, here, we wanna make sure,
that all these items are selected Client and Server.
The server will be the things serving our databases
and storing our data.
The client will be a tool we use on our local machine
to connect to that server,
to run commands against that server and so on.
And we installed the same combination of tools
in the previous lecture for macOS as well.
And as mentioned there already,
in case you skipped that part there,
we need this client here,
for issuing commands to this server.
And we'll not really use a big graphical user interface
for working with our database.
Instead, no SQL databases in general,
are not really about configuring the database,
or any tables in there, because as you'll learn,
there is no fixed predefined structure you have to set up.
Instead, you really dive right into the commands
that you wanna execute, for inserting data or fetching data.
And that's also just what we did in the end
with MySQL in the SQL course sections.
There, we had a graphical user interface,
but ultimately, we mostly needed that,
for setting up our database and table structure.
And once we had that,
we also just executed commands in there.
Now with no SQL,
since we won't have a structure that we need to set up,
we can skip this part entirely,
and therefore we need no graphical user interface,
since a tool that allows us to run these commands,
will be all we need.
And that's what this client is.
So therefore we should make sure that's installed.
And with that, we can click next here.
Now here's an important screen,
Here by default, this checkbox is checked
that you wanna install MongoD as a service.
MongoD is a process that will be installed
that you would use for spinning up your database server.
And you can do that manually.
And if you uncheck this, you have to do it manually.
But with Windows, the convenient thing
is that we can indeed keep this checked.
And then the MongoDB database server will be started
in the background for us, as a so-called service.
We can still stop and start that manually then,
but we don't have to actively execute some command
to bring that up.
We don't have to keep it running in the foreground.
Instead it will run in the background.
And therefore I will keep this checked here,
and I will keep these default settings.
But now here's an important part as well,
the data and the log directory.
You can keep these default paths,
but I wanna explain what they do.
Like all databases, MongoDB, of course,
ultimately stores the data somewhere on your system.
It manages the data storage for you,
but ultimately data will end up in files on your system.
And it will use this path here,
the data directory path,
for storing the concrete data in files.
It will also log some messages information,
and we'll store that in this path.
That's why these two paths are needed at what they do.
And with that can leave all the settings.
But I wanted to explain why we have those settings,
and click next.
And just as a side note,
if you watched the macOS setup as well,
there we did not set it up as a service.
Instead, there we had some executable files,
which we had to execute manually
to start the database server.
This also works,
but on Windows this here can be more convenient.
So let's click next here.
Now we then also get a chance of installing MongoDB Compass.
On macOS we didn't get that.
We could still install it as an extra tool there,
and you can keep this checked here and click next.
Alternatively, you can also always install it stand-alone,
by going to the MongoDB website and then to software,
and then going to Compass there.
And there, if you click on try it now,
you can also download Compass there.
And that's this graphical user interface,
which you can also use for talking to your database.
Hence I'll click next here, and then install.
Now, once the installation is done, you can click finish.
And now as a first step,
you can open up your Windows Start menu,
and search for Services there.
And open this services tool.
Here you got all the background services
that are running on your system,
and if you scroll down to M there,
you should find MongoDB server there as well.
And it's running by default.
Now this is just database server,
which is running in the background,
as discussed a couple of seconds ago.
You can always right click on it here to stop it.
And then this will shut down this service
and therefore also that database server.
And once it's stopped,
you won't be able to interact with it.
So you won't be able to send commands to it.
Therefore you wanna start it again,
so that you are able to interact with it again.
And that's of course, then a very convenient way,
of starting and stopping that service.
Alternatively, you can open up your Command Prompt,
as administrator.
And in there, you can run net stop MongoDB,
to also stop this service.
And once it's stopped,
you can run net start MongoDB to start it again.
So that's an alternative to using this services tool.
It's up to you, what you wanna use.
So now we got that server running,
but in order to use that server,
we now need to start that client,
that shell, as it's called.
Which allows us to send commands to the server,
queries for inserting or fetching data.
And for this, you should open up your Windows Explorer,
and then go to the path where MongoDB was installed,
by default in C program files MongoDB.
And here I got my server installed,
but if you dive into the bin folder there,
you'll also find the "mongo.exe" file.
And that is actually an executable that you can run,
to start your client, your interactive shell,
that allows you to talk to that server.
So if you double click on that,
this shell opens up, and now here,
you are connected to your server.
In here, in this shell, you can now run commands
to insert data or fetch data.
And of course, that's exactly the part
we're going to dive in in this course.
So that's what we're going to explore in the future here.
For the moment, you can just run show dbs,
to basically list your databases on this server.
So that's a built-in command
that will be understood by the server.
And you should see some default databases here.
And that's it for now.
At the moment, we're not going to do anything else.
You can always close this shell and restart it,
and you can always stop and restart the server.
But as long as you wanna work with it,
it should, of course be up and running.
And with that, let's now continue and dive deeper
into MongoDB, and in how we can work with it.