1
00:00:01,910 --> 00:00:06,500
So in this session we are going to learn how to install Redis on a Windows machine.

2
00:00:06,500 --> 00:00:11,980
But before we begin, it is worth mentioning that officially Redis is not supported on a Windows machine.

3
00:00:13,630 --> 00:00:17,980
So when you are in Production, you are always going to use Redis on a Linux system.

4
00:00:21,760 --> 00:00:24,450
Now to download Redis on a Windows,

5
00:00:24,460 --> 00:00:34,720
you need to click on this link and then you will be taken to a GitHub page. So here you see we have MSI

6
00:00:34,760 --> 00:00:42,480
And also we have a zip version. So I'm going to download this  zip version.  So just click here.

7
00:00:42,510 --> 00:00:43,830
So the downloading will start

8
00:00:47,780 --> 00:00:55,490
and software is pretty small.  It is only 5 MB. So it just takes few seconds to download and once

9
00:00:55,490 --> 00:00:57,980
we have the software downloaded, we need to extract it.

10
00:01:00,860 --> 00:01:06,530
So once that is done, you go inside the extracted  folder and there you should be able to see redis-server.

11
00:01:06,530 --> 00:01:14,750
So you double click on this to start.

12
00:01:14,840 --> 00:01:20,730
Now you can see Redis Server has started and it is running on default port which is 6 3 7 9.

13
00:01:21,080 --> 00:01:24,200
And the Process ID is 2 2 5 9 7 2.

14
00:01:24,440 --> 00:01:25,690
OK.

15
00:01:25,760 --> 00:01:29,640
So you do not need to close this.  Just minimize this.

16
00:01:29,870 --> 00:01:36,680
And then you can launch redis-cli,  which is a Command Line Interface and using this

17
00:01:36,710 --> 00:01:37,940
now you can interact with Redis.

18
00:01:37,960 --> 00:01:44,710
So quickly I'm going to write some data to Redis and then we will read it back just to make

19
00:01:44,710 --> 00:01:46,560
sure that Redis has really been installed.

20
00:01:46,560 --> 00:01:54,570
So I'm going to use L push command and I'm going to provide a Key Name,  which is called color and I'm going

21
00:01:54,570 --> 00:01:55,800
to give all the Values.

22
00:01:55,920 --> 00:02:02,160
So let's fill all the color names. Hit enter.

23
00:02:02,240 --> 00:02:02,950
Now we'll see

24
00:02:02,990 --> 00:02:06,770
we have written a Key Name which is called Color with 3 Values.

25
00:02:06,770 --> 00:02:10,190
Now if I want to see all the values back I can use L range

26
00:02:10,190 --> 00:02:12,370
Command, with a Key Name Color.

27
00:02:13,570 --> 00:02:18,700
And we need to specify Starting Index and Ending Index.

28
00:02:18,790 --> 00:02:22,680
So I'm going to give 0 to -1

29
00:02:22,760 --> 00:02:28,600
So what this is going to give me is, the complete list or the complete list of Values.

30
00:02:28,630 --> 00:02:30,860
Basically that is stored in the Color.

31
00:02:32,200 --> 00:02:43,220
So if you see, if I hit enter I'm going to get all the Color Values back.

32
00:02:43,400 --> 00:02:46,550
Now that's the  way of installing, you know, with the default Port.

33
00:02:46,550 --> 00:02:52,000
Now if you want to run it and we want to change the Port. So let me shut down this instance.

34
00:02:55,530 --> 00:03:03,270
Now you see Redis is stopped and then we need to make changes in redis.windows.conf

35
00:03:09,570 --> 00:03:15,200
So you can edit this file in, in a  Notepad or any other Editor

36
00:03:26,740 --> 00:03:28,810
and search with Port.

37
00:03:28,960 --> 00:03:36,490
And here you can find a Directory which is called Port and  here you can specify the new Ports. So in this

38
00:03:36,490 --> 00:03:46,680
case I'm going to change it from 6 3 7 9 to  6 3 7 0. Save the file and then you can Exit.

39
00:03:46,860 --> 00:03:53,970
And now if you again Double Click here on Redis-server, it is again going to start with the

40
00:03:55,020 --> 00:04:01,950
default Port which is 6 3 7 9 because by default when Redis is starting, it is not accepting this configuration

41
00:04:01,950 --> 00:04:02,280
file.

42
00:04:03,150 --> 00:04:09,180
So now if you want to start Redis with this Configuration File, you can open a Command Prompt

43
00:04:12,140 --> 00:04:21,140
and now you need to move onto the  Directory where your software is. So our software is  inside Redis. No inside

44
00:04:21,140 --> 00:04:23,320
Download folder and then inside  Redis  folder.

45
00:04:23,390 --> 00:04:26,460
And here we have  Redis-server.

46
00:04:26,510 --> 00:04:33,110
And here you need to specify the name of the Configuration File, which is redis.windows.conf

47
00:04:33,110 --> 00:04:34,610
in this case.

48
00:04:34,980 --> 00:04:42,380
And once, now I hit enter it should be starting on a Port which is 6 3 7 0. So let's hit enter.

49
00:04:42,380 --> 00:04:46,670
Now you can see it has started on the Port which is 6 3 7 0

50
00:04:53,670 --> 00:04:59,250
So in this session,  you have learnt installing  Redis  on a Windows machine and also you have learnt

51
00:04:59,250 --> 00:05:01,800
how you can change the default Port to any other Port.
