Install and Configure Redis Server on Rocky Linux 8 / AlmaLinux 8. Redis is an open-source in-memory data structure store that can be used as a NoSQL database, message broker, or cache. It is ideal for applications that frequently handle large amounts of data. This tutorial will explain how to install and configure Redis Server version 5.x on Rocky Linux 8 or AlmaLinux 8.
Before beginning, you will need to have a registered domain name and have configured DNS records pointing to your server’s IP address. You will also need to make sure you have root access or equivalent privileges to install and configure Redis.
Install Redis Server on Rocky Linux 8 / AlmaLinux 8
In the next section we cover all the steps that are required to install and configure Redis Server on Rocky Linux 8 / AlmaLinux 8.
Step 1: Install Redis packages
Let’s begin the process by updating system package list and upgrade any existing packages:
sudo dnf -y update
Redis server and client packages are available on the OS AppStream repository. You can check versions using the commands below:
$ sudo dnf module list redis
Rocky Linux 8 - AppStream
Name Stream Profiles Summary
redis 5 [d][e] common [d] [i] Redis persistent key-value database
redis 6 common [d] Redis persistent key-value database
Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
From the output we can see the default version is 5. We need to reset and enable 6 instead.
Install 1 Package
Total download size: 1.2 M
Installed size: 4.3 M
Is this ok [y/N]: y
After installation of the package, proceed to start and enable redis service to start at boot.
sudo systemctl enable --now redis
Service status should show running.
$ systemctl status redis
● redis.service - Redis persistent key-value database
Loaded: loaded (/usr/lib/systemd/system/redis.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2023-01-16 07:09:09 UTC; 6s ago
Main PID: 30476 (redis-server)
Status: "Ready to accept connections"
Tasks: 5 (limit: 23036)
└─30476 /usr/bin/redis-server 127.0.0.1:6379
Jan 16 07:09:09 rocky8.mylab.io systemd: Starting Redis persistent key-value database...
Jan 16 07:09:09 rocky8.mylab.io systemd: Started Redis persistent key-value database.
Step 2: Configure Redis Server
Redis Server can be configured by editing the configuration file located at /etc/redis.conf.
To use redis with Python, install Python Redis Client Library:
sudo yum -y install python-redis
Using Redis with PHP
To connect to Redis server with PHP, install PHP Redis Client Module.
sudo yum -y install php-redis
We have successfully installed and configured Redis Server 5.x on Rocky Linux 8 or AlmaLinux 8. With Redis, you can store data in an in-memory key-value store and can be used for various applications including caching and message brokering. We hope this guide has been helpful for you in setting up Redis on your systems.
One of the key features of Redis is the ability to handle high-performance data operations in any kind of application. By storing its data in memory, it has faster data access than traditional disk-based databases. This makes Redis an ideal choice for use cases such as real-time analytics, session management, and leaderboards. With Redis support for data clustering you can easily achieve horizontal scaling of the database to handle the increased load by adding extra nodes. This enables Redis server(s) to handle large amounts of data and traffic without losing on the performance aspect.
About Me:I'm the digital marketing specialist, competent in SEO (Google, Yahoo & Bing), Google Adwords (Search, Display, Google Shopping etc.), Facebook & Instagram Advertising etc. I can work in all platforms of digital marketing & advertise the legitimate products/services in a specific country, city or all over the world.
Digital marketing can be defined by SEO XOOM is as marketing your product and service on any digital platform including Google Search, Social Media and Whats-app. Remember, online success comes from partnering with an experienced digital marketing company and choosing a mix of digital platforms that best suit your marketing goals.