Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,150 --> 00:00:07,290
First things first. Head over to mongodb.com and we're going to click on get MongoDB to download
2
00:00:07,290 --> 00:00:07,910
it.
3
00:00:08,010 --> 00:00:13,740
Now you should be taken to the MongoDB download center and the first tab that's usually selected by
4
00:00:13,740 --> 00:00:16,290
default is their cloud service
5
00:00:16,320 --> 00:00:22,590
so the MongoDB Atlas service which we're going to explore a little bit later on when we actually deploy
6
00:00:22,590 --> 00:00:23,410
our database.
7
00:00:23,580 --> 00:00:26,010
But for now we want to choose the service tab.
8
00:00:26,340 --> 00:00:30,430
And down here you should have your Windows version already pre-selected
9
00:00:30,660 --> 00:00:35,630
and we're going to select the current version of MongoDB.
10
00:00:35,790 --> 00:00:40,160
Now it's really important that you change this package from zip to MSI
11
00:00:40,440 --> 00:00:45,750
because this is going to download a installation wizard and it'll make everything a lot easier for us
12
00:00:45,990 --> 00:00:47,010
going forward.
13
00:00:47,010 --> 00:00:55,210
So once you're done here then just go ahead and click download and now download should begin.
14
00:00:55,210 --> 00:01:01,180
Now once download is completed you should be able to head into your Downloads folder and see this installation
15
00:01:01,180 --> 00:01:01,910
wizard.
16
00:01:01,930 --> 00:01:04,060
It's going to be called something like mongodb
17
00:01:04,060 --> 00:01:05,580
something something something
18
00:01:05,650 --> 00:01:07,130
.msi.
19
00:01:07,300 --> 00:01:09,920
And this is going to be your installer.
20
00:01:10,060 --> 00:01:16,240
And so now if you double click on it it will launch the installation wizard and all you have to do is
21
00:01:16,240 --> 00:01:17,400
click next.
22
00:01:17,530 --> 00:01:23,500
And then we're going to accept the terms of the license and we're going to choose the complete installation
23
00:01:23,890 --> 00:01:31,480
and then you're going to select Run service as a network service user and make note of this directory
24
00:01:31,480 --> 00:01:33,850
path that they've created here for you.
25
00:01:33,850 --> 00:01:40,250
This is where they're going to install MongoDB. It's going to be on the C:\Program Files/MongoDB/
26
00:01:40,250 --> 00:01:43,320
server\4.0.
27
00:01:43,600 --> 00:01:49,460
And I recommend keeping to this exact same file path because we'll need a little bit later on.
28
00:01:49,630 --> 00:01:54,460
So keep it the same and keep a note of it and we're going to come back to it a little bit later on.
29
00:01:54,460 --> 00:01:59,800
So then you're going to select next and we're going to uncheck install MongoDB compass because
30
00:01:59,800 --> 00:02:01,210
we don't actually need it.
31
00:02:01,450 --> 00:02:06,640
And then click next and finally click install to start the installation.
32
00:02:07,870 --> 00:02:15,030
And once installation has complete simply click Finish and you'll exit out of the installation wizard.
33
00:02:15,240 --> 00:02:15,510
All right.
34
00:02:15,510 --> 00:02:22,080
So now that we've successfully installed MongoDB using the installer, if you now go into your C-drive
35
00:02:22,170 --> 00:02:29,040
and you take a look at your program files you should see a folder called MongoDB and inside there's something
36
00:02:29,040 --> 00:02:29,980
called server
37
00:02:30,030 --> 00:02:33,330
and then there's the version of the MongoDB that you installed.
38
00:02:33,330 --> 00:02:36,350
and then finally we get access to our binaries.
39
00:02:36,630 --> 00:02:42,330
Now the next thing I want to do is I'm going to set up the data folder where MongoDB will save our
40
00:02:42,330 --> 00:02:44,950
databases on our local system.
41
00:02:45,000 --> 00:02:48,020
So I want you to go ahead into your C drive,
42
00:02:48,180 --> 00:02:53,580
so make sure that up here says your C drive, and then you're going to create a new folder here and it's going
43
00:02:53,580 --> 00:02:55,260
to be called data.
44
00:02:55,410 --> 00:03:00,810
And then inside that data folder we're going to create a new folder called db and just make sure that
45
00:03:00,810 --> 00:03:04,580
you've typed everything exactly as I have which is lower case data
46
00:03:04,610 --> 00:03:10,470
and then inside data there's something called db. And we're going to leave all of that empty but just check
47
00:03:10,470 --> 00:03:16,200
up here to see that you've got exactly the same kind of file path and directories as I have.
48
00:03:16,200 --> 00:03:19,710
So inside your C drive you got a folder called data inside data
49
00:03:19,710 --> 00:03:21,800
you've got something called db.
50
00:03:21,990 --> 00:03:28,380
Now that we've successfully installed MongoDB we have to get it set up so that we can use it easily
51
00:03:28,380 --> 00:03:30,120
through the hyper terminal.
52
00:03:30,120 --> 00:03:32,720
And in order to do that we first have to check something.
53
00:03:32,730 --> 00:03:40,140
So if you head into Explorer and just go into your C-drive and then scroll down until you see Program
54
00:03:40,140 --> 00:03:46,510
Files, double click on that and we're going to scroll down until we find MongoDB.
55
00:03:46,650 --> 00:03:47,250
Here it is.
56
00:03:47,250 --> 00:03:51,520
And then we're going to go inside that folder and then inside the folder called server.
57
00:03:51,810 --> 00:03:58,290
So now you should see a folder with a version number and this corresponds to the rough version of your
58
00:03:58,290 --> 00:03:59,150
MongoDB
59
00:03:59,160 --> 00:04:02,040
and this says 4.0.
60
00:04:02,040 --> 00:04:11,430
And we want to set up a shortcut so that we can launch our mongo.exe and mongod.exe straight from
61
00:04:11,520 --> 00:04:15,050
our hyper terminal using bash.
62
00:04:15,210 --> 00:04:22,680
And now I want you to open up your hyper terminal and just change directory to your home folder by typing
63
00:04:22,680 --> 00:04:25,200
in cd and then adding the tilde sign.
64
00:04:25,290 --> 00:04:33,220
And once you've navigated there, I want you to go ahead and create a new file called .dash_
65
00:04:33,360 --> 00:04:36,690
profile and it has to be spelt exactly this way.
66
00:04:36,720 --> 00:04:38,770
And then hit enter to create it.
67
00:04:38,850 --> 00:04:45,870
And now that should be created if we do an ls -a we should be able to see it in a list of files
68
00:04:45,870 --> 00:04:50,040
here and there it is .bash_profile.
69
00:04:50,040 --> 00:04:55,530
So this is a hidden file that we've created which is going to tell our hyperterminal that when it starts
70
00:04:55,530 --> 00:05:01,300
up and we want to access mongo and mongod we have a shortcut for it.
71
00:05:01,320 --> 00:05:05,880
So now that we've created that file now we're going to edit it using vim.
72
00:05:05,890 --> 00:05:12,180
So to do that we're going to type vim and then we're going to specify the file that we want to edit which
73
00:05:12,180 --> 00:05:14,770
was .bash_profile.
74
00:05:14,970 --> 00:05:21,930
So now if you hit enter this will now open up that file using the vim text editor which is a command
75
00:05:21,930 --> 00:05:23,330
line based text editor.
76
00:05:23,490 --> 00:05:28,650
Now there's a lot of memes around the vim editor and it's because it's not a graphical user interface
77
00:05:28,920 --> 00:05:34,250
so there aren't any buttons to click on and it's a little bit more complex to get to grips with.
78
00:05:34,380 --> 00:05:38,340
But I'm going to quickly show you how you can use it in a very simple way.
79
00:05:38,550 --> 00:05:44,310
So firstly in order to stand actually be able to type anything in the vim editor we're going to hit
80
00:05:44,310 --> 00:05:51,660
the i key, so 'i' for indigo on your keyboard and that will initiate the insert mode. And now you can actually
81
00:05:51,660 --> 00:05:57,840
start typing stuff into this editor. And you can either type this out although it's kind of error prone.
82
00:05:57,840 --> 00:06:05,430
So I would recommend that you head over to the written installations for MongoDB for Windows and there's
83
00:06:05,430 --> 00:06:06,330
a link to this
84
00:06:06,330 --> 00:06:08,960
in the course resources for this module.
85
00:06:09,150 --> 00:06:16,260
And I just want you to scroll down to this part where you see there's this alias mongodb alias mongo
86
00:06:16,650 --> 00:06:19,340
and a file path that we've specified.
87
00:06:19,500 --> 00:06:28,440
I just want you to go ahead and copy both of those two lines and then paste it into vim. So you can
88
00:06:28,440 --> 00:06:34,170
either use the shortcut or you can simply just navigate to it from this little menu icon at the top.
89
00:06:34,170 --> 00:06:41,760
Now the thing you have to change here is we saw earlier on what was the version that you saw and C - program
90
00:06:41,760 --> 00:06:43,330
files - MongoDB - server.
91
00:06:43,380 --> 00:06:45,170
And for me it's 4.0.
92
00:06:45,180 --> 00:06:52,290
Now if you're installing this at some point in the future that might read 4.1 or 5.0 I just want you
93
00:06:52,290 --> 00:06:59,070
to change this part of the code to whatever it is you see there so that they match because this has
94
00:06:59,070 --> 00:07:04,830
to be an entire file path that leads to mongo.exe and mongod.exe.
95
00:07:04,950 --> 00:07:12,360
So if you go ahead again look inside your Explorer and you navigate from local disk C to program
96
00:07:12,360 --> 00:07:22,030
files to MongoDB to server to 4.0 to bin, then you can see here is where our mongo.exe
97
00:07:22,050 --> 00:07:24,650
and mongod.exe reside.
98
00:07:24,660 --> 00:07:30,990
So this file path is going to lead to those files and we're creating simply an alias that makes it easier
99
00:07:30,990 --> 00:07:34,880
for us to work with it inside our hyper terminal.
100
00:07:34,890 --> 00:07:40,980
So if you need to edit this then just go ahead and change these parts to whatever it is that you see
101
00:07:41,430 --> 00:07:42,860
in your version.
102
00:07:42,960 --> 00:07:48,870
And then we're going to go ahead and save and exit vim which can be a little bit tricky but it's not
103
00:07:48,870 --> 00:07:57,150
too hard. You just have to hit ESC to exit insert mode and we're going to type :wq and then
104
00:07:57,240 --> 00:07:59,020
the !.
105
00:07:59,040 --> 00:08:05,880
And now if you hit enter you would have saved that file and you would have exited vim.
106
00:08:05,900 --> 00:08:11,080
So now we're ready to test and see whether if our installation has succeeded.
107
00:08:11,210 --> 00:08:19,680
I want you to go ahead and close down your hyper terminal and you're going to simply relaunch it.
108
00:08:19,790 --> 00:08:26,530
So now that we've restarted our hyper terminal then it's time to test and see if our installation has
109
00:08:26,530 --> 00:08:33,669
succeeded. And we'll do that by writing mongo --version and hit enter.
110
00:08:33,919 --> 00:08:40,549
Now if you see something that looks like this where it says MongoDB shell version 4.0.3 or a new version
111
00:08:40,760 --> 00:08:46,220
but something that looks like this, then congratulations you have completed all of the setup and installation
112
00:08:46,280 --> 00:08:50,550
of MongoDB and you're ready to proceed to the next lesson.
113
00:08:50,570 --> 00:08:57,230
Now if you see something else such as bash mongo not found or something like that where it doesn't look
114
00:08:57,230 --> 00:09:03,080
like this, then be sure to retrace your steps and maybe follow all of the instructions in the written
115
00:09:03,080 --> 00:09:07,340
tutorials and just make sure that you haven't made any typos and anything that you're typing in looks
116
00:09:07,370 --> 00:09:12,850
exactly the same or simply just copy and paste it from the instructions.
117
00:09:12,920 --> 00:09:17,900
But now that we've completed installation and setup then you're ready to get started learning about
118
00:09:17,960 --> 00:09:18,800
MongoDB.
12704
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.