Redis

How to Check the Redis Version

There is one database that raises its hand confidently when the topic of low latency comes up: Redis. Redis is a free, open-source in-memory database that stores its data in the form of key-value pairs. It is a popular choice for high-performance applications due to its low latency and scalability. This tutorial discusses installing the Redis server on your system, checking the version, and upgrading to the latest version.

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:

$ redis-server –version

This should print the installed version as shown in the example output below:

# redis-server --version

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:

$ sudo apt-get update

Update your system packages as provided below:

$ sudo apt-get upgrade

Next, install Redis server use apt as shown below:

$ sudo apt-get install redis-server -y

The prevous command will install the latest version of the Redis server on your system.

Once installed, check the version using the following command:

$ redis-server --version

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:

$ brew install redis

Once installed, run the following command to get the installed version:

$ redis-server --version

To connect your Redis cluster, use the command provided below:

$ redis-cli

Updating Redis Server

On Linux, you can update the installed Redis server with apt as:

$ sudo apt-get upgrade -y

On macOS, run the following command:

$ brew upgrade redis

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.

About the author

John Otieno

My name is John and am a fellow geek like you. I am passionate about all things computers from Hardware, Operating systems to Programming. My dream is to share my knowledge with the world and help out fellow geeks. Follow my content by subscribing to LinuxHint mailing list