Create the file /etc/yum.repos.d/redis.repo with the following contents.
For Rocky Linux 8 / AlmaLinux 8 / etc...
[Redis]
name=Redis
baseurl=http://packages.redis.io/rpm/rockylinux8
enabled=1
gpgcheck=1
[root@server1 ~]# sudo yum install redis-server
Redis 21 kB/s | 3.0 kB 00:00
No match for argument: redis-server
Error: Unable to find a match: redis-server