How To Install redis on Rocky Linux 8

In this tutorial we learn how to install redis on Rocky Linux 8. redis is A persistent key-value database

Introduction

In this tutorial we learn how to install redis on Rocky Linux 8.

What is redis

Redis is an advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets. You can run atomic operations on these types, like appending to a string; incrementing the value in a hash; pushing to a list; computing set intersection, union and difference; or getting the member with highest ranking in a sorted set. In order to achieve its outstanding performance, Redis works with an in-memory dataset. Depending on your use case, you can persist it either by dumping the dataset to disk every once in a while, or by appending each command to a log. Redis also supports trivial-to-setup master-slave replication, with very fast non-blocking first synchronization, auto-reconnection on net split and so forth. Other features include Transactions, Pub/Sub, Lua scripting, Keys with a limited time-to-live, and configuration settings to make Redis behave like a cache. You can use Redis from most programming languages also.

We can use yum or dnf to install redis on Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install redis.

Install redis on Rocky Linux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install redis using dnf by running the following command:

sudo dnf -y install redis

Install redis on Rocky Linux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install redis using yum by running the following command:

sudo yum -y install redis

How To Uninstall redis on Rocky Linux 8

To uninstall only the redis package we can use the following command:

sudo dnf remove redis

redis Package Contents on Rocky Linux 8

/etc/logrotate.d/redis
/etc/redis-sentinel.conf
/etc/redis.conf
/etc/systemd/system/redis-sentinel.service.d
/etc/systemd/system/redis-sentinel.service.d/limit.conf
/etc/systemd/system/redis.service.d
/etc/systemd/system/redis.service.d/limit.conf
/usr/bin/redis-benchmark
/usr/bin/redis-check-aof
/usr/bin/redis-check-rdb
/usr/bin/redis-cli
/usr/bin/redis-sentinel
/usr/bin/redis-server
/usr/lib/.build-id
/usr/lib/.build-id/36
/usr/lib/.build-id/36/00102f3a4aa6c090b23d226d75ab6f6bf109f3
/usr/lib/.build-id/7f
/usr/lib/.build-id/7f/4fda1119b6fa06da686b939b7d1979622381ad
/usr/lib/.build-id/da
/usr/lib/.build-id/da/a6b802702ddba79900f81d2aace2a9a3412986
/usr/lib/systemd/system/redis-sentinel.service
/usr/lib/systemd/system/redis.service
/usr/lib64/redis
/usr/lib64/redis/modules
/usr/libexec/redis-shutdown
/usr/share/licenses/redis
/usr/share/licenses/redis/COPYING
/usr/share/licenses/redis/COPYING-hiredis
/usr/share/licenses/redis/COPYING-jemalloc
/usr/share/licenses/redis/COPYRIGHT-lua
/usr/share/man/man1/redis-benchmark.1.gz
/usr/share/man/man1/redis-check-aof.1.gz
/usr/share/man/man1/redis-check-rdb.1.gz
/usr/share/man/man1/redis-cli.1.gz
/usr/share/man/man1/redis-sentinel.1.gz
/usr/share/man/man1/redis-server.1.gz
/usr/share/man/man5/redis-sentinel.conf.5.gz
/usr/share/man/man5/redis.conf.5.gz
/var/lib/redis
/var/log/redis
/var/run/redis

References

Summary

In this tutorial we learn how to install redis on Rocky Linux 8 using yum and dnf.