How To Setup Redis On Windows Pc.

How To Setup Redis On Windows Pc.

Setting up redis-server and redis-cli on global environment variables.

Table of contents

No heading

No headings in the article.

Redis is an in-memory NO-SQL tools basically used session management storage which makes it ease for storing and retrieving values in a key-value pair ways.

So let's get started on the installation of Redis application, Redis wasn't built for window users but later some changes were made to be able to use Redis platform on windows PC.

Step 1: To have access to download the Redis executable file, click on this link which will take you to where you will find different version of Redis, but preferably choose the latest version and not the pre-release setup. github.com/microsoftarchive/redis/releases

The file extension you will see comes in two ways either msi file or .exe file extension, so you choose one from it, but I will be showing you how to use the .exe file, so choose the .exe file extension. The image below shows the download zip file extension. redis-zip-file.jpg Step 2 Extract the Redis zip files into a new Folder and name it Redis for conventional and safety purpose, because as a user you might delete it by mistake. The image below shows the extracted files from the zip file.

redis-cli_redis-server ext.jpg There are two main files that will be among extracted files from the zip file, which are the redis-cli.exe and redis-server.exe file.

REDIS-CLI The purpose of this extension file is to be able to execute the redis command using the command prompt or through bash.exe command. Double clicking on the file extension, a command prompt will pop-up.

redis-cli-cmd.jpg Above, the redis-cli is not connected because the redis server is not running, so in order to interact with the redis-cli, we need to start the redis server by double clicking the extension file which will start the redis-server automatically.

REDIS-SERVER The purpose is to allow the users to have the access to the functionalities and method of redis tools.

redis-server-cmd.jpg Above, you will notice that the redis-cli is now connected, because it now listens to the redis-server port number 127.0.0.1:6379 redis-cli-cmd-start.jpg

Congratulations, you have setup redis which is now working on your windows PC, but there is one issue, that we would like to solve which whenever we want to start redis-server or redis-cli we have to be double clicking the file, which is stressful. So what we are going to do now is to copy the folder path that contains both redis-cli.exe and redis-server.exe file and after copying the folder path containing all redis files.

Firstly: type in your search-bar a name called environment-variables, Environment Variable basically helps us to have our folder or file path declared globally in order to use them in an ease way.

env-var.jpg

Secondly: click on the environment variables button, it will take to the next step 3. env-var1.jpg

Thirdly: Under the System variables section, select the path variable and click on edit, then it shows you list of folder and file path, then you can paste the redis folder path you copied initially. So click on OK in every steps, which will close all the screen open under the environment-variables. env-var2.jpg

Now you can open any of your command prompt or bash, and enter the command redis-server to start the redis server and also type command redis-cli to start the cli on the server port but using different terminal

server-cli.jpg

Conclusion

In this article, we discussed how to install the redis for windows users, and how to setup and start both the redis-server and redis-cli.

I'd love to connect with you all at LinkedIn | Twitter | Github

Dropping my next article soon, Take care