How to Install Redis on Debian 10

Install Redis on Debian 10

In this article, we will have explained the necessary steps to install and configure Redis on Debian 10. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.

Redis (Remote Dictionary Server) is an open-source, in-memory database that is used as a cache and message broker. Some of Redis features are built-in transactions, replication, and support for a variety of data structures like strings, hashes, lists, sets and so on. Redis Sentinel makes Redis highly available and it supports automatic partitioning with Redis Cluster.

Install Redis on Debian

Step 1. The first command will update the package lists to ensure you get the latest version and dependencies.

Step 2. Install Redis.

Redis package is available in default repository in Debian 10. So to install Redis run below command:

After installing Redis it will start automatically so to confirm installation and check Redis status run below command:

Step 3. Configure Redis.

First, run below command and open Redis configuration file:

To take changes effect, restart Redis server using command:

Use the following command to verify that the Redis server is listening on your private interface on port 6379:

You should see something like below:

To verify that everything is setup properly, you can try to ping the Redis server from your remote machine using the redis-cli utility which provides a command-line interface to a Redis server:

You should see exact below output:

Congratulation, you have learned how to install and configure Redis on Debian 10 Buster. If you have any question, please leave a comment below.