Install Redis on Ubuntu 20.04

s2 0

Redis is a well-known open source data structure store that stores data in memory and is widely used as a database. It is very popular with Linux users as it is quite easy to install and use on any Linux based system. Today’s goal is also to learn how we can install the Redis server on our Ubuntu 20.04.

Install Redis on Ubuntu 20.04

Redis can be installed and activated on an Ubuntu system using the following steps:

Step # 1: start with a system update:

We’ll start with an Ubuntu system update with the command shown below:

$ sudo apt-get update

If our system has been successfully updated, we can easily install Redis on it.

Step # 2: Install Redis on your system:

To install Redis on an Ubuntu system, the following command must be executed:

$ sudo apt install redis-server

Install Redis

When the Redis server is installed on your system, you will see the output on your terminal similar to the one shown in the following figure:

Redis installation

Step 3: enable the Redis service:

However, the Redis service is not automatically activated after it is installed. Hence, you have to activate it manually with the following command:

$ sudo systemctl enable redis-server.service

Activate the Redis service

If the activation of the Redis service was successful and error-free, you will see output on your terminal similar to the one shown in the figure below:advertising

Redis service activated

Step 4: check the status of the Redis service:

Finally, you can also confirm the status of the Redis service by running the following command:

$ sudo systemctl status redis-server.service

The status “active (running)” in the output shown in the image below indicates that the Redis service has been successfully activated on our Ubuntu system.

Activate the Redis service

Remove Redis

Now if you want to uninstall the Redis service from your system, you can do so by running the following command:

$ sudo apt-get purge --autoremove redis-server

Redis removal

Diploma:

You can easily see that you will be able to install Redis on your Ubuntu 20.04 system in no time if you follow this tutorial. Once this server is installed on your system, you can conveniently use it as a powerful database. Also, you can quickly and easily remove the Redis server from your system by running the one-liner command given at the end of this article.

Install Redis on Ubuntu 20.04
Tags: