For the Redis installation on a Windows machine, please follow the below steps carefully.
Download the Redis MSI: Download the latest Redis .msi file from this GitHub repository.
During Installation [IMPORTANT]: Double-click the .msi file to start the installation process. When asked for the destination folder, you can leave the default path as it is to install Redis. But, make sure to check the box that says “Add the installation folder to the PATH environment variable”.
Verify Redis Service: Make sure Redis services are running by running services.msc (CTRL+R, type services.msc)
If the Redis is not showing running status, right-click on Redis and click Start.
Verify Redis Installation: After installation, open your command prompt and run redis-server
. If Redis is running correctly, it will start the Redis server.
And you can also run redis-cli ping
If Redis is running correctly, it will return PONG.
This will ensure that the Redis is successfully installed on your computer.
POSSIBLE ISSUES AND WARNINGS
Port already in use: In case the port 6379 is already in use, you may get the warning something like below.
In this case, run below commands to see the PID and kill it.
netstat -ano | findstr :6379
To see which process is running on port 6379.taskkill /F /PID 15916
Note: Here 15916 is the PID received in above command. Run this command as an Administrator.
Once the process is killed, make sure the Redis service is running in services.msc and run the command redis-server
Let me know if you need any help.