In this video, use the beta feature on Windows 10, which provides the Windows Subsystem for Linux, an environment into which you can install Redis as if it is running on Linux, without creating a virtual machine.
- [Instructor] If you are using Windows in developer mode you can add the Linux subsystem on Windows and try and run Redis within that Linux subsystem. Take a look at your settings and then try to use developer settings. You will need to enable developer features. So under use developer features select developer mode. Turn on. And so with developer mode enabled we can add the Windows services for Linux.
Turn on or off Windows features. And here we have Windows subsystem for Linux. Click the checkbox, do note it is beta, so only try this at home folks, don't try this at the office. Click OK. I'll restart my machine. Now that I have restarted my machine I would have the Windows subsystem for Linux installed.
So to get to the Linux subsystem on Windows I would just run the bash command. So here is my bash, this is essentially Ubuntu on top of Windows. I'll accept the license agreement. I'll make myself a user name for Linux.
And there we have a shell for bash right here on Windows. And now we can do what we're used to. Apt get, great way to install. And we'll install Redis server. There it goes. Read package list, done, done, done, and all the way at the end, additional disk space, continue.
And that's it, now we have Redis up and running. Just one minor detail, we just want to change the IP address that Redis is actually running on, so we need to edit the configuration file for Redis.
Oh, typing error. I over here. There we go. And we need to just restart. Just a Redis service. And there we go. So Redis CLI, let's see if it's up and running. Ta-da. Get some info. Scroll up.
And so in this example, under info you can see our server is running version three and we have OS Linux this time. Set my key with a value get my key. And we're interactive with Redis running in what looks like Linux, but it's actually on Windows, and we have a Redis instance we could connect to from our application code for development and testing purposes.
Do remember this is developer mode on Windows 10. This is in beta both for the Ubuntu, the shell I have here, as well as the Linux subsystem on Windows.
- What is Redis?
- Installing Redis on a Windows machine
- Deploying the latest version of Redis into a container
- Connecting with C# clients
- Working with data types in Redis
- Key expiration and expiration policies
- Working with lists, sets, and hashes in Redis
- Working with batches and transactions
- Using Redis with ASP.NET web apps