Huu Phan | Blog Linux operating system | Linux operating system -Blog Huu Phan | www.huuphan.com
huuphan.com. Powered by Blogger.

Explore the world of seamless email management with Zimbra Mail on Linux! Our blog delves into a step-by-step guide on harnessing the potential of Linux commands, providing easy-to-follow how-tos, and unlocking the magic of Bash scripting. Simplify your email administration journey and enhance your skills with our insightful tips and tricks.

How to install configure Redis on Rocky Linux / Centos 8

 In this tutorial, How to learn install configure Redis on rocky Linux / Centos 8.

What is Redis Server?

Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache, and message broker from https://redis.io/

Install configure Redis on Rocky Linux / Centos 8

Step 1: Update your Rocky Linux/Centos 8 Server 

sudo dnf -y update
Step 2: Install Redis Server
 

I will use remi release to install Redis module

  sudo dnf install -y https://rpms.remirepo.net/enterprise/remi-release-8.rpm
List redis using command below
   sudo dnf module list redis
How to install configure Redis on Rocky Linux / Centos 8

Enable redis 6

   sudo dnf module enable redis:remi-6.2 -y

How to install configure Redis on Rocky Linux / Centos 8

In Redis Server.

  sudo dnf install redis
 How to install configure Redis on Rocky Linux / Centos 8

Start/Enable Redis Server.

sudo systemctl start redis
sudo systemctl enable redis
sudo systemctl status redis

Configuring Redis

The redis configure file located in path /etc/redis/redis.conf
In this section, I will update the redis configure allow remote access, to set an Authentication password, to add a pid file and to Set Persistent Store for Recovery.

Edit config file as below:

  sudo vi /etc/redis/redis.conf
To allow remote access to the redis instance.
   bind 0.0.0.0
Set password in Redis
  requirepass devopsroles.com
Add a pid file.
  pidfile /var/run/redis/redis-server.pid
Set Persistent Store for Recovery
   appendonly yes
   appendfilename "appendonly.aof"
Restart to apply changes:
  sudo systemctl restart redis
Connecting to redis locally, check redis information as commnad below
  $ redis-cli
  127.0.0.1:6379> auth devopsroles.com
  127.0.0.1:6379> INFO
How to install configure Redis on Rocky Linux / Centos 8
 

Performing Redis Benchmarking against local redis to test its performance. For example, run the benchmark with 20 parallel connections

  $ redis-benchmark -h 127.0.0.1 -p 6379 -n 10000 -c 20 -a devopsroles.com

 How to install configure Redis on Rocky Linux / Centos 8

post new :

Huu Phan | Blog Linux operating system | Huu Phan ~ Zimbra Mail Server,linux,bash script,centos,linux command | www.huuphan.com

This Blog is protected by DMCA.com