NOTE: The instructions on this article are tested on Debian 11 and macOS Monterrey.
To run Redis on Windows, enable and install Debian on WSL. Check the instructions on Redis installation on Debian below:
Quick Summary
To quickly check the version of Redis you have installed, run the following command:
This should print the installed version as shown in the example output below:
Redis server v=6.2.6 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=38b837f4e7024d22
In the output above, we have Redis Server version 6.2.6.
Installing Redis on Debian 11
If you do not have Redis installed, running the previous command will return an error.
To install Redis on Debian, open the terminal and update the package cache:
Update your system packages as provided below:
Next, install Redis server use apt as shown below:
The prevous command will install the latest version of the Redis server on your system.
Once installed, check the version using the following command:
You can learn how to start and stop the Redis server in linked tutorial How to Stop Redis Server.
Installing Redis on macOS Monterry
The best method to install Redis on macOS is to use Homebrew. In the terminal, run the following command:
Once installed, run the following command to get the installed version:
To connect your Redis cluster, use the command provided below:
Updating Redis Server
On Linux, you can update the installed Redis server with apt as:
On macOS, run the following command:
Conclusion
In this tutorial, we discussed how to install the Redis server on Linux and macOS. We also showed how to check the version of the Redis server installed on your system. We hope you found this article helpful. Check the other Linux Hint articles for more tips and information.