Video Transcript
Transcript is automatically generated and may contain some errors
Hi folks, welcome back to another video.
In a previous video we looked at how to install Ubuntu Linux using the Windows subsystem for Linux on Windows 11, and now we’re going to look at how to use that built in Linux implementation to install Redis server so we can use it for local development.
So if we click.
On our start button and we can just search for Ubuntu.
Hit enter and will.
It’ll bring up our a command window with our urban to implementation.
Now it’s automatically logged in for us, so we’re all set ready to go now to in the first thing to do when we want to install Redis is to add in an additional.
Repository, so now we’re calling sudo, which is basically runs the commanders route and they were using APT add repository to add the Redis repository to the act in package manager.
So we enter that in, it asks us for our password.
OK, so that’s now busy adding adding the repository so it can hit enter to continue.
That will then entity add in the repository.
Now that allows us to get the up-to-date application files for Redis from their repository.
OK, so the next command we need to do is apps update.
Now what this basically does is it goes and searches for any updates that we might have on any of our local repositories.
OK, so saying there we’ve got 78 packages to be updated or upgraded, so we can now go and run Sudo app upgrade.
And this is basically like Windows updates on Windows, so this comes up and says all the package that needs to be updated or upgraded and asked us to confirm that we want to upgrade them.
So that’ll then go off and upgrade all our packages.
It’s a good idea, especially on a new Linux implementation, to do all your updates.
To make sure that you are up to date before you get started, so I’ll just let this run while it updates, and then we’ll jump back into the video.
OK, now that all our updates are done, the next step of the process is to actually install the Redis cache server.
So we would go sudo opt.
Redis server, now that will go off.
Ask us to confirm that we want to install Redis server and Redis tools.
That’ll then go and install Redis server, install the latest tools and create a Redis database so we can now start Redis up by sudo.
Redis server start.
And it’s starting the service, so now that’s now running on its default port in its default implementation, but there’s nothing really to see.
So what I also like to use under Windows is Redis Insight, which is a great little graphical user interface.
That we can use to display what’s happening with our Redis server.
So if we just put in our e-mail address.
OK, it looks like it’s asking for all sorts of information.
And I am in Australia.
OK, it must be a phone number. OK so 403.
Dash 1212, that’s the example they gave. I don’t want to give my phone number so they can just get the sample. So now this is downloading the Redis Insight installer, which which we can then.
Run once it’s finished downloading.
So now Redis insight is installing.
We can close down our browser or minimize it.
And we’ve got our Redis insight which will allow access through our firewall.
Now if we minimize this, yeah, well, yes, we’ve read and understood the license and you can see immediately it’s come up and it’s picked up our localhost.
6379, which is the default port for Redis server that’s running on our Ubuntu installation. So if we click on that it then loads up and we can see that we have.
We can see our keys.
We can add a key.
We can see the CPU and memory usage and storage usage and we can even add a key.
If we want so, we could add a.
String we could call it.
Now string.
Our value OK, now that’s added that string to cache.
If we refresh, we can see we’ve got our string.
Now, there’s no, there’s no expiry limit or anything on the string or on key, so we can then go and we can see our value.
We can delete it, we can edit it if we deleted it.
And go to add another key.
We can then set a TTL as well so when you’re dealing with cache objects, they typically have a TTL which is a time to live, so might be 30 seconds or five minutes, or 10 minutes depending on the data that you’re putting in that cache key.
So now in a future video will go through.
And we’ll look at how we implement this with a.net 6 Blazer server. Up to add some back end caching so we can do development tests on a Redis server when we will be looking to deploy the live server across to the Azure Redis service. So we’ll look at that in a future video. Thank you.