Install Redis in Ubuntu 24.04

In this article, we cover how to install Redis in Ubuntu 24.04 release. Redis stands for Remote Dictionary Server. It stores and works on data in memory which helps it deliver faster performance.

We can either install the version available in the standard Ubuntu repository or we can download one from its official website. It all depends on our requirements. If we want to check which version of Redis is available through our repository then, we can run the following in the terminal:

apt show redis

Note: The following operations require Administrative rights.

Install Redis through standard Ubuntu repository

The package is a part of the standard Ubuntu repository. Therefore, update the repository first:

sudo apt update

Next, to install Redis:

sudo apt install redis

To verify the version installed:

redis-cli --version

It would return with the installed version. In our case, it was:

redis-cli 7.0.14

Install Redis in Ubuntu 24.04 through the source file

Alternatively, we can also install Redis through a source file. It can be downloaded from its official webpage.

Redis Download

On the webpage, look for the stable version. In our case, it was v7.2.3

We downloaded the .tar.gz package file from the webpage. The file we got was: redis-7.2.3.tar.gz

Use the tar command-line utility to extract the package:

tar -xvf redis-7.2.3.tar.gz

It would create redis-7.2.3/ in the current directory itself. Through the cd command, we get inside the redis-7.2.3/ directory.

cd redis-7.2.3/

And, run the following commands to install the package:

make
sudo make install

Once completed, issue the following in the terminal to verify the installation:

redis-cli --version

It should return with the version we just installed. For us, it was:

redis-cli 7.2.3

In conclusion, we have covered here how to install Redis in the Ubuntu 24.04 release.

Similar Posts