How To

Install Redis 8 on Rocky Linux 10 / AlmaLinux 10 / RHEL 10

Type dnf info redis on a fresh Rocky Linux 10 box and dnf answers “No matching Packages to list”. On Rocky 10.2 and AlmaLinux 10.3, which rebuild RHEL, AppStream carries Valkey and no redis package, so if you want to install Redis on Rocky Linux, AlmaLinux or RHEL 10 you have to pick an outside repository first. Most older guides point you at a Remi remi-7.4 stream that EL10 never had.

Original content from computingforgeeks.com - post 22781

This guide uses the official packages.redis.io repository, which now builds RPMs for Rocky Linux 10 and ships the search, JSON, time series and probabilistic modules inside the package. You’ll harden it with ACL users, AOF persistence, a firewalld rich rule and SELinux left enforcing, then upgrade an existing Redis 7 install in place. Every command below ran on Rocky Linux 10.2 and AlmaLinux 10.3 in November 2026 against Redis 8.12.0.

Pick a Redis source on Rocky Linux 10 and RHEL 10

There are three places to get a Redis-compatible server on EL10, and they do not behave the same. On the Rocky and Alma boxes we tested, AppStream only had Valkey, the Linux Foundation fork that split off when Redis changed its license in 2024, and nothing called redis. We did not check a subscribed RHEL host, but Rocky and Alma rebuild its sources, so expect the same there. Remi still builds Redis as modular streams. Its remi-8.10 stream carries the GA 8.10.3 build, but the newest stream, remi-8.12, only had release candidates when we checked, and Remi ships the modules as separate packages. packages.redis.io gets the newest GA release first and bundles the modules, which is why this guide uses it.

SourcePackageWhat we found on EL10Use it when
AppStream (Rocky 10.2, Alma 10.3)valkey8.1 line, no redis package at allYou want a distro-supported, BSD-licensed server
Remi modularredis:remi-7.2 to remi-8.12No remi-7.4 stream; remi-8.10 has GA 8.10.3, remi-8.12 still rc buildsYou already run Remi, or an app pins Redis 7.2
packages.redis.ioredisGA builds for rockylinux10, x86_64 and aarch64, modules bundledYou want current Redis with JSON, search and time series

The redis.io install page still lists only Rocky and Alma 8 and 9, but the rockylinux10 path on the repo is live and carries every release from the 8.8 line up. That is the path this guide uses. If you’d rather stay on the distro package, the Valkey on Rocky Linux 10 guide covers it, and our Valkey vs Redis comparison explains where the two have drifted apart. If you need a source build with custom flags, follow the Redis source build on Rocky Linux 10 instead.

Confirm what your AppStream offers before adding anything. On Rocky Linux 10.2 the query for redis comes back empty:

dnf info redis
dnf list --available 'valkey*'

The first command errors out and the second lists only Valkey packages:

Error: No matching Packages to list
Available Packages
valkey.x86_64                        8.1.10-2.el10_3                   appstream
valkey-devel.x86_64                  8.1.10-2.el10_3                   appstream
valkey-rdma.x86_64                   8.1.10-2.el10_3                   appstream

AlmaLinux 10.3 returned the same Valkey build, valkey-rdma subpackage included. No redis package exists on either, so a playbook that still runs dnf install redis against a stock EL10 host fails at that task. Add the repo below first and the same playbook works unchanged.

Add the official Redis repository

You need a server running Rocky Linux 10, AlmaLinux 10 or RHEL 10 with sudo access. The lab VMs had 2 vCPUs and 3.6 GiB of RAM, which is a floor for testing, not a sizing target. Size production boxes by dataset plus headroom: Redis keeps everything in memory, and a fork for BGSAVE or an AOF rewrite can briefly need extra pages on a busy write load.

Write the repo file with printf so there’s no editor step to get wrong:

printf '[Redis]\nname=Redis\nbaseurl=http://packages.redis.io/rpm/rockylinux10\nenabled=1\ngpgcheck=1\n' | sudo tee /etc/yum.repos.d/redis.repo

Import the signing key, then refresh the metadata. The repo serves plain HTTP, which is why gpgcheck=1 matters: the key is what proves the RPM came from Redis.

curl -fsSL https://packages.redis.io/gpg > /tmp/redis.key
sudo rpm --import /tmp/redis.key
sudo dnf makecache

A line named Redis should appear among the metadata downloads. List what the repo carries so you know which builds you can pin to:

dnf list --showduplicates redis

The list goes back to the 8.8 line. Trimmed to x86_64, the newest entries were these:

redis.x86_64                            8.8.4-1                            Redis
redis.x86_64                            8.10.0-1                           Redis
redis.x86_64                            8.10.1-1                           Redis
redis.x86_64                            8.10.2-1                           Redis
redis.x86_64                            8.10.3-1                           Redis
redis.x86_64                            8.12.0-1                           Redis

Every version also has an aarch64 build, so the same steps work on Ampere or Graviton hosts. Keeping older builds in the repo matters for fleets, because you can pin a node with dnf install redis-8.10.3-1 to match the rest of a replica set instead of jumping one box ahead. Plain dnf install redis always takes the newest, and so does the next dnf upgrade, so hold a pinned node with dnf versionlock from the python3-dnf-plugin-versionlock package.

Install Redis 8 and start the service

One package pulls in the server, the CLI, Sentinel, the benchmark tool and four module libraries. It is a 40 MB download and 104 MB on disk, mostly because of the search module.

sudo dnf install -y redis

The redis.io docs say the service will not be enabled at boot. On our Rocky and Alma installs redis.service came out enabled but not started, so run enable --now either way and you are covered:

sudo systemctl enable --now redis
redis-server --version
sudo ss -tlnp | grep 6379

The binary reports the build and the socket list shows it bound to loopback only, IPv4 and IPv6:

Redis server v=8.12.0 sha=00000000:1 malloc=jemalloc-5.3.0 bits=64 build=785b44cdef642167
LISTEN 0      511        127.0.0.1:6379      0.0.0.0:*    users:(("redis-server",pid=5674,fd=18))
LISTEN 0      511            [::1]:6379         [::]:*    users:(("redis-server",pid=5674,fd=19))

The terminal below is the same install on redis01, from the repo install through the version check.

Redis 8 service running on Rocky Linux 10 with redis-server version and loopback listeners

Know where the package puts things before you start editing. The layout differs from the Remi builds, which matters later during an upgrade:

ItemPath
Main config/etc/redis/redis.conf (redis:redis, mode 640)
Sentinel config/etc/redis/sentinel/sentinel.conf
Data directory/var/lib/redis
Log file/var/log/redis/redis-server.log
Modules/usr/lib/redis/modules/
Unitsredis.service, redis-sentinel.service

Because /etc/redis is mode 750 and owned by redis, a plain ls as your own user returns “Permission denied”, so it is easy to think the package never created the file. It did. Use sudo for anything under that directory and leave the permissions alone, because the same directory will hold the ACL file with your user passwords in a few minutes.

Check the bundled modules

Redis 8 folded the old Redis Stack into the main server. The package config loads four modules with loadmodule lines, and vector sets are compiled into the server itself. Ask the server what it loaded:

redis-cli INFO server
redis-cli MODULE LIST

Trimmed to the lines worth reading, INFO confirms systemd supervision, the packaged config path and the loopback listeners:

redis_version:8.12.0
redis_mode:standalone
process_supervised:systemd
executable:/usr/bin/redis-server
config_file:/etc/redis/redis.conf
listener0:name=tcp,bind=127.0.0.1,bind=-::1,port=6379

MODULE LIST should name five modules. Vector sets show an empty path because they are built into the server, not loaded from a separate .so file:

  • bf for Bloom, cuckoo and other probabilistic types
  • ReJSON for JSON documents
  • timeseries for time series keys
  • search for the Query Engine
  • vectorset for vector sets

A quick round trip proves the modules answer, not just load. JSON, time series and Bloom filter commands all worked with no extra config:

redis-cli JSON.SET doc '$' '{"name":"redis01","ver":8}'
redis-cli JSON.GET doc
redis-cli TS.ADD temp:1 '*' 21.5
redis-cli BF.ADD seen user1

The JSON document comes back intact, TS.ADD returns the sample timestamp in milliseconds and BF.ADD returns 1 for a new member:

OK
{"name":"redis01","ver":8}
1795368146417
1

The full MODULE LIST output on redis01 is below. Check this screen before you hand a build to developers, because a missing module usually means someone edited the config or installed a different package.

redis-cli MODULE LIST showing bf, ReJSON, timeseries, vectorset and search modules on Rocky Linux 10

If you never use these data types, leaving them loaded costs a little memory and startup time. You can comment out the loadmodule lines, but most teams keep them because a developer will eventually reach for JSON or search, and turning a module back on later means a restart in a maintenance window. We left them loaded on every lab box.

Review what changed from Redis 7

The jump to Redis 8 is more than a version bump, and some of it affects how you run the server. Per the Redis 8 GA announcement, Community Edition became Redis Open Source and gained AGPLv3 as a license option next to RSALv2 and SSPLv1. The points that matter on a server:

  • JSON, time series, probabilistic types and the Query Engine ship in the box
  • Vector sets arrived as a new native type, still marked beta at GA
  • New ACL categories cover the module commands
  • The packaged config uses supervised auto and a new log path

The license change is why your legal team may care. AGPLv3 is an OSI license, but its network clause bothers some companies, and that is the main reason Valkey still gets picked on EL10. If your legal team has already ruled out AGPL, use Valkey and stop here, because nothing below changes that answer.

Pin your install at 8.10.3 or newer. That release is flagged “Update urgency: SECURITY” on its GitHub release page because it fixes a heap buffer overflow when a PUBLISH or SPUBLISH message larger than 4 GB is propagated over the cluster bus. It only bites in cluster mode, but there is no reason to sit below it. The current 8.12 line adds compressed bitmaps, set member expiry and SQ8 compression for vector indexes on top.

Lock down Redis with ACL users

A fresh install listens only on loopback with protected-mode yes, and the default user has no password. The log even says so: “WARNING: Redis does not require authentication.” That is tolerable while nothing can reach the port. Once you bind a network address, any client that reaches it gets full access, so the password work belongs in the same change as the bind. You will bind a private address, turn on AOF, cap memory and move users into an ACL file.

Grab the server’s first IP into a variable, since the bind line needs it. On the lab box that was 10.0.1.50:

IP=$(hostname -I | awk '{print $1}'); echo $IP

These five edits change only the lines that matter and leave the rest of the 120 KB config alone. Keep protected-mode yes; with an ACL file in place it costs nothing.

sudo sed -i "s|^bind .*|bind 127.0.0.1 -::1 $IP|" /etc/redis/redis.conf
sudo sed -i 's|^appendonly .*|appendonly yes|' /etc/redis/redis.conf
sudo sed -i 's|^# maxmemory <bytes>|maxmemory 512mb|' /etc/redis/redis.conf
sudo sed -i 's|^# maxmemory-policy noeviction|maxmemory-policy allkeys-lru|' /etc/redis/redis.conf
sudo sed -i 's|^# aclfile /etc/redis/users.acl|aclfile /etc/redis/users.acl|' /etc/redis/redis.conf

Pick allkeys-lru only for a cache. For a primary datastore keep noeviction so writes fail loudly when memory runs out instead of dropping keys you meant to keep. Set maxmemory to about 70 to 80 percent of RAM on a dedicated box.

Now write the ACL file. It disables the passwordless default user, adds an admin, and gives the application user read and write on app:* keys with dangerous commands removed:

printf 'user default off\nuser admin on >Str0ng-Admin-Pass-2026 ~* &* +@all\nuser app on >Str0ng-App-Pass-2026 ~app:* +@read +@write -@dangerous\n' | sudo tee /etc/redis/users.acl

Do not restart yet. tee created the file as root:root with mode 644, which means every local user can read the passwords. Fix the owner and mode, then restore the SELinux label:

sudo chown redis:redis /etc/redis/users.acl
sudo chmod 640 /etc/redis/users.acl
sudo restorecon -v /etc/redis/users.acl
sudo systemctl restart redis

Test it from the server. An unauthenticated PING must fail, the app user should reach its own keys only, and FLUSHALL should be refused:

redis-cli PING
redis-cli --user app --pass Str0ng-App-Pass-2026 PING
redis-cli --user app --pass Str0ng-App-Pass-2026 SET app:greeting hello
redis-cli --user app --pass Str0ng-App-Pass-2026 SET other:key x
redis-cli --user app --pass Str0ng-App-Pass-2026 FLUSHALL

Each call also printed a warning about passing a password on the command line. With those lines removed, the results were:

NOAUTH Authentication required.
NOPERM User app has no permissions to run the 'ping' command
OK
NOPERM No permissions to access a key
NOPERM User app has no permissions to run the 'flushall' command

That second line is the trap. PING sits in the @connection category, not @read or @write, so the app user cannot run the health check many client libraries send on connect. Pool checks and load balancer probes then fail even though GET and SET work fine, and the app logs blame the network. We hit it on the first test.

Redis ACL test showing NOAUTH and NOPERM errors for the app user

Grant the missing commands as admin and persist them to the file. Exporting REDISCLI_AUTH keeps the password off the command line and silences the “Using a password with ‘-a’ or ‘-u’ option” warning:

export REDISCLI_AUTH=Str0ng-Admin-Pass-2026
redis-cli --user admin ACL SETUSER app +ping +auth +info
redis-cli --user admin ACL SAVE
unset REDISCLI_AUTH

Both commands return OK, and /etc/redis/users.acl now ends the app line with +ping +auth +info. Passwords in the saved file are rewritten as SHA-256 hashes, so ACL SAVE also gets the plaintext out of the file you typed earlier.

We tested this rule set with redis-cli only. Client libraries often send more on connect, and the categories above still block SELECT, HELLO and CLIENT SETNAME. If your app logs a NOPERM for one of those, add it the same way, for example +select +hello +client|setname, rather than widening the user to +@all.

Confirm RDB and AOF persistence

The package default is RDB snapshots only (save 3600 1 300 100 60 10000), which can lose anywhere from a minute to an hour of writes on a crash, depending on write rate. With appendonly yes from the edits above, Redis also logs every write and fsyncs once a second. Check both are healthy:

export REDISCLI_AUTH=Str0ng-Admin-Pass-2026
redis-cli --user admin INFO persistence | grep -E 'rdb_last_bgsave_status|aof_enabled|aof_last_write_status'
redis-cli --user admin BGSAVE
sudo ls -l /var/lib/redis /var/lib/redis/appendonlydir
unset REDISCLI_AUTH

Look for aof_enabled:1 and two ok statuses. The data directory holds the RDB snapshot and an appendonlydir with a base file, an incremental file and a manifest:

rdb_last_bgsave_status:ok
aof_enabled:1
aof_last_write_status:ok
Background saving started
/var/lib/redis:
total 4
drwxr-x---. 2 redis redis 103 Nov 22 17:23 appendonlydir
-rw-rw----. 1 redis redis 116 Nov 22 17:23 dump.rdb

/var/lib/redis/appendonlydir:
total 12
-rw-rw----. 1 redis redis  89 Nov 22 17:22 appendonly.aof.1.base.rdb
-rw-r-----. 1 redis redis  66 Nov 22 17:23 appendonly.aof.1.incr.aof
-rw-r-----. 1 redis redis 102 Nov 22 17:23 appendonly.aof.manifest

For backups, copy dump.rdb right after a BGSAVE finishes and ship it off the host. Keep the whole appendonlydir together if you back up the AOF, because the manifest is what ties the base and incremental files into one dataset. A copy of one file without the others is not a backup, so test a restore on a spare VM before you trust the job.

Open port 6379 in firewalld for one client

Check the active zone before you add a rule. The Rocky Linux 10 cloud image we used came up with trusted as the default zone, so a third host reached Redis before any rule existed. That came from the cloud image, so yours may differ. Never assume the zone is public, because a rich rule added to public while trusted is active changes nothing and the port stays wide open.

sudo firewall-cmd --get-default-zone
sudo firewall-cmd --get-active-zones

If it says trusted, switch to public first. Changing the default zone only moves interfaces that are not bound to a zone explicitly, so if --get-active-zones lists your interface under trusted by name, also run sudo firewall-cmd --permanent --zone=public --change-interface=eth0 with the interface name it printed. Make sure ssh is in the public zone’s services before you do this on a remote box, or you’ll cut your own session. Then allow only the application server, 10.0.1.51 here, with a rich rule:

sudo firewall-cmd --set-default-zone=public
sudo firewall-cmd --permanent --zone=public --add-rich-rule='rule family="ipv4" source address="10.0.1.51/32" port port="6379" protocol="tcp" accept'
sudo firewall-cmd --reload
sudo firewall-cmd --list-all

A rich rule beats --add-port=6379/tcp because it scopes access to one source. Test from both sides. From redis02 (10.0.1.51) the PING returns PONG; from redis03 (10.0.1.52) the connection is rejected:

timeout 5 redis-cli -h 10.0.1.50 --user app --pass Str0ng-App-Pass-2026 PING

The blocked host gets an ICMP reject from the public zone, which is why the error reads “No route to host” rather than a timeout:

Could not connect to Redis at 10.0.1.50:6379: No route to host

On redis01 the whole change looked like this, with the rich rule listed at the bottom of the public zone:

firewalld rich rule allowing one client to Redis port 6379 on Rocky Linux 10

And from redis03, the host the rule leaves out, the same PING exits with status 1:

Blocked client gets No route to host when connecting to Redis

Add a rule per client host or use a source subnet when you run several app servers. For anything crossing an untrusted network, put Redis behind TLS or a private link, because the ACL password and every value travel in clear text otherwise. The firewall decides who can connect; it does nothing for what an attacker on the path can read.

Keep SELinux enforcing

On the default port Redis ran under the targeted policy with SELinux enforcing on every box we tested. Redis runs as redis_t, its config and ACL file carry redis_conf_t, and data sits under redis_var_lib_t. The package’s install script also tries to build a small redis-ce policy module, but only when checkpolicy is present: dnf pulled it in as a weak dependency on AlmaLinux, while our upgraded Rocky box never had it and Redis still started fine. sudo semodule -l | grep redis shows which modules you got. The one place SELinux does break Redis is a non-standard port, because the policy only allows 6379, 16379 and 26379.

You only need this step if you move Redis off 6379. We tested it by changing the port line in redis.conf to 6390, and the restart failed while systemd kept retrying it (systemctl is-active showed activating). The audit log names the cause:

sudo ausearch -m AVC -ts recent | grep denied

The denial shows redis_t trying to bind an unreserved_port_t socket:

type=AVC msg=audit(1795368213.689:847): avc:  denied  { name_bind } for  pid=6441 comm="redis-server" src=6390 scontext=system_u:system_r:redis_t:s0 tcontext=system_u:object_r:unreserved_port_t:s0 tclass=tcp_socket permissive=0

Label the port instead of switching SELinux off. semanage lives in policycoreutils-python-utils, which minimal images do not include:

sudo dnf install -y policycoreutils-python-utils
sudo semanage port -a -t redis_port_t -p tcp 6390
sudo semanage port -l | grep redis
sudo systemctl restart redis

No relabel of files or reboot is needed. The port list now includes 6390 and the restart succeeds:

redis_port_t                   tcp      6390, 6379, 16379, 26379

The full sequence on redis01, from the failed restart to the server listening on the new port:

SELinux name_bind denial for Redis on port 6390 fixed with semanage port

We put the lab server back on 6379 afterwards, so the rest of this guide uses the default port. If you keep a custom port, pass -p to every redis-cli and redis-benchmark call below and open that port in firewalld instead of 6379, since SELinux and firewalld are separate gates. The same applies to Sentinel or cluster bus ports you move off their defaults.

Upgrade an existing Redis 7 install to Redis 8

The previous version of this guide told you to enable redis:remi-7.4. That stream does not exist on EL10, so the command fails outright:

Error: Problems in request:
missing groups or modules: redis:remi-7.4

So a Redis 7 box on EL10 is either a Remi remi-7.2 install or a source build. We tested the Remi case twice: once with a stock redis.conf, and once with requirepass and appendonly yes edited in, the way the old guide left most servers. Back up the data and config first. Drop REDISCLI_AUTH if your server has no password:

REDISCLI_AUTH='Str0ng-Admin-Pass-2026' redis-cli SAVE
sudo mkdir -p /root/redis72-backup
sudo cp -a /var/lib/redis/dump.rdb /etc/redis/redis.conf /root/redis72-backup/

Add the Redis repo as shown earlier. Now a plain dnf upgrade redis says “Nothing to do”, and asking for the new build by name gets filtered out:

All matches were filtered out by modular filtering for argument: redis-8.12.0-1
Error: Unable to find a match: redis-8.12.0-1

The enabled Remi module hides every redis package from other repos. Stop the service, reset and disable the module, then install:

sudo systemctl stop redis
sudo dnf module reset -y redis
sudo dnf module disable -y redis
sudo dnf install -y redis

dnf treats it as an upgrade of the same package name, so the redis user, the data directory and the enabled unit all carry over. Check the config before you start the service. What happens to redis.conf depends on whether you ever edited it, and on the edited box dnf printed a warning that is easy to scroll past:

  Upgrading        : redis-8.12.0-1.x86_64                                  1/2
warning: /etc/redis/redis.conf created as /etc/redis/redis.conf.rpmnew
Upgraded:
  redis-8.12.0-1.x86_64

No warning means your old config was stock and got replaced. Follow whichever of the next two parts matches your box.

Edited redis.conf: merge the rpmnew file

Both packages mark redis.conf as a config file rpm must not overwrite, so an edited file stays in place and the Redis 8 version lands next to it. Your password and AOF setting survive. The problem is the unit file: Remi’s unit passed --supervised systemd on the command line, while the new unit is Type=notify and expects supervised auto inside the config. The kept file has no such line, so Redis never tells systemd it is ready. Check for the rpmnew file first:

sudo ls -l /etc/redis/
grep -E '^(Type|ExecStart)' /usr/lib/systemd/system/redis.service

On our edited box both files were there, and the unit had no supervised flag left:

-rw-r-----. 1 redis root  107560 Nov 22 17:54 redis.conf
-rw-r-----. 1 redis redis 122704 Nov 22 13:02 redis.conf.rpmnew
drwxr-x---. 2 redis redis     27 Nov 22 17:55 sentinel
Type=notify
ExecStart=/usr/bin/redis-server /etc/redis/redis.conf

Starting it anyway is what we did on purpose. systemctl start redis hung for the whole 40 second timeout we gave it, systemctl is-active stayed on activating, and no module would have loaded, because the old file has no loadmodule lines either. The fix is to copy the supervised and loadmodule lines from the rpmnew file into the kept config:

sudo grep -E '^(supervised|loadmodule)' /etc/redis/redis.conf.rpmnew | sudo tee -a /etc/redis/redis.conf
sudo systemctl start redis
systemctl is-active redis
REDISCLI_AUTH='Str0ng-Admin-Pass-2026' redis-cli GET user:1
REDISCLI_AUTH='Str0ng-Admin-Pass-2026' redis-cli CONFIG GET appendonly
REDISCLI_AUTH='Str0ng-Admin-Pass-2026' redis-cli MODULE LIST | grep -c '^name'

The service went active at once, the key and the AOF setting were intact, and the module count came back as five:

loadmodule /usr/lib/redis/modules/rejson.so
loadmodule /usr/lib/redis/modules/redisbloom.so
loadmodule /usr/lib/redis/modules/redistimeseries.so
loadmodule /usr/lib/redis/modules/redisearch.so
supervised auto
active
josphat
appendonly
yes
5

Keep the rpmnew file around as a reference for new Redis 8 directives, or move it into place and port your settings across if you want a clean Redis 8 config. Either way, the old logfile /var/log/redis/redis.log stays in effect with the kept file.

Stock redis.conf: start it, then harden

On the box with an untouched Remi config, rpm swapped in the new file with no .rpmnew or .rpmsave left behind. That server starts cleanly on Redis 8 defaults, which bind to localhost just like the stock Remi file did, so it is safe to start it first and harden afterwards. Start it and confirm the keys survived. The log line “Loading RDB produced by version 7.2.17” is the proof the old snapshot was read, and DBSIZE should match what you had:

sudo systemctl start redis
redis-cli DBSIZE
redis-cli GET user:1
sudo grep -E 'Loading RDB|keys loaded' /var/log/redis/redis-server.log

All three keys came back, and the modules loaded on the first start:

3
josphat
5952:M 22 Nov 2026 17:25:59.796 * Loading RDB produced by version 7.2.17
5952:M 22 Nov 2026 17:25:59.796 * Done loading RDB, keys loaded: 3, keys expired: 0.

The whole upgrade on the stock-config box is in the next screen. Read the last log line: the server came back with no authentication, and it stays that way until you harden it.

Upgrading Redis 7.2 from Remi to Redis 8 with dnf module reset and data verified

One catch on this path: we had turned AOF on in the Remi server with CONFIG SET appendonly yes at runtime, never written to the file, and after the upgrade appendonly read no. Anything you set only with CONFIG SET and never saved with CONFIG REWRITE is gone after any restart, upgrade or not. The backup is the stock Remi file, so the diff holds none of your settings; it is useful for spotting the packaging changes:

sudo diff /root/redis72-backup/redis.conf /etc/redis/redis.conf | grep -E '^[<>] (loadmodule|daemonize|supervised|pidfile|logfile)'

Besides the new loadmodule lines, the log moved to redis-server.log and daemonize plus pidfile gave way to supervised auto. If you ship logs with Fluent Bit, Promtail or rsyslog, update the path too, or you will get silence instead of errors:

> loadmodule /usr/lib/redis/modules/rejson.so
> loadmodule /usr/lib/redis/modules/redisbloom.so
> loadmodule /usr/lib/redis/modules/redistimeseries.so
> loadmodule /usr/lib/redis/modules/redisearch.so
< daemonize no
> supervised auto
< pidfile /run/redis/redis.pid
< logfile /var/log/redis/redis.log
> logfile /var/log/redis/redis-server.log

Then apply the hardening section with the same sed lines and restart. On a freshly upgraded stock box that means:

  • the bind line with your private IP
  • aclfile, plus the owner and mode on users.acl
  • appendonly yes
  • maxmemory and the eviction policy

Coming from a source build, the same backup, stop, install and verify sequence applies, but disable your hand-written unit and remove the old binaries from /usr/local/bin first so redis-cli on your PATH matches the server. Replicated setups should upgrade replicas first and fail over before touching the primary.

Run the same steps on AlmaLinux 10

AlmaLinux uses the same rockylinux10 repo path, and nothing else in this guide changes. On AlmaLinux 10.3 the only difference was an extra checkpolicy dependency pulled in during install. SELinux stayed enforcing and all five modules loaded:

Redis 8 installed on AlmaLinux 10 with SELinux enforcing and modules loaded

RHEL 10 takes the same repo file, since Rocky and Alma both build from RHEL sources and the package only needs base libraries. We ran the steps on Rocky and Alma, not on a subscribed RHEL host, so test once on a RHEL box before you roll it to a fleet. Expect the same result, because nothing in the RPM is Rocky specific apart from the repo path name.

Run redis-benchmark against the server

A quick run of redis-benchmark tells you whether the box is sane. It takes -a for the password, not --pass like redis-cli:

redis-benchmark --user admin -a Str0ng-Admin-Pass-2026 -q -n 100000 -t set,get,incr,lpush,hset
redis-benchmark --user admin -a Str0ng-Admin-Pass-2026 -q -n 100000 -P 16 -t set,get,incr,lpush,hset

On a 2 vCPU VM with AOF on, the numbers in requests per second were:

CommandNo pipeliningp50 latencyPipeline of 16
SET37,2300.695 ms322,581
GET35,8290.695 ms440,529
INCR38,2260.679 ms361,011
LPUSH37,6220.687 ms327,869
HSET38,0230.687 ms273,973

Pipelining gave roughly 7 to 12 times more throughput, which tells you the unpipelined run is bound by round trips, not CPU. If your app does many small calls in a loop, batching them buys more than any kernel tuning will.

On kernel settings, the GCP image already had vm.overcommit_memory = 1 and somaxconn at 4096, and Redis logged no memory warnings. Other images may not, so pin overcommit anyway so BGSAVE forks don’t fail under memory pressure:

printf 'vm.overcommit_memory = 1\n' | sudo tee /etc/sysctl.d/99-redis.conf
sudo sysctl --system

Check /var/log/redis/redis-server.log after the next restart. Redis prints a warning at startup when it dislikes a kernel setting, so any line about overcommit or transparent huge pages tells you that setting still needs attention. Our log had none.

Prepare for Sentinel failover

The package already ships redis-sentinel, a disabled redis-sentinel.service that runs as the redis user, and a config at /etc/redis/sentinel/sentinel.conf. The Sentinel documentation on redis.io says you need at least three Sentinel instances for a robust deployment, on machines that fail independently, because a majority has to agree before a replica gets promoted. Two Sentinels on one hypervisor buy you nothing.

Before you enable the unit anywhere, have these in place:

  • three hosts, each running Redis and Sentinel
  • replicas set with replicaof and masterauth
  • an ACL user Sentinel can log in with
  • port 26379 open between the nodes in firewalld

SELinux already labels 26379 as redis_port_t, so the only port work is the firewalld rich rule, using the same pattern as 6379 above.

Fix common Redis errors on EL10

Each of these came up in the lab. When you’re digging through logs, the Linux Commands Cheat Sheet is a handy reference for the grep, find and process commands used below.

Error: “missing groups or modules: redis:remi-7.4”

Remi builds no 7.4 stream for EL10. Run sudo dnf module list redis to see what exists, or skip Remi and use the packages.redis.io repo above.

Error: “All matches were filtered out by modular filtering”

A Remi redis module is still enabled and masks other repos. Run sudo dnf module reset -y redis and sudo dnf module disable -y redis, then install again.

Redis hangs in “activating” after the upgrade

An edited Remi config was kept and the new Type=notify unit is waiting for a readiness signal that never comes. Look for /etc/redis/redis.conf.rpmnew, append its supervised auto and loadmodule lines to redis.conf, and start again.

Error: “NOPERM User app has no permissions to run the ‘ping’ command”

The user has +@read +@write but PING is in @connection. Add it with ACL SETUSER app +ping +auth +info and run ACL SAVE so it survives a restart.

Error: “Could not create server TCP listening socket … bind: Permission denied”

SELinux is blocking a port outside 6379, 16379 and 26379. Label it with semanage port -a -t redis_port_t -p tcp <port>. If the address is the problem instead, check the IP in your bind line actually exists on the host.

Error: “Could not connect to Redis … No route to host”

firewalld rejected the client. Add a rich rule for its address, or check you edited the zone that’s actually active with firewall-cmd --get-active-zones.

Decide between Redis 8 and Valkey

On EL10 the choice comes down to license and features. Valkey is one dnf install away, covered by your distro’s errata and BSD licensed. Redis 8 from packages.redis.io gives you JSON, search, time series and vector sets in the same package, and the install took a few minutes with SELinux enforcing and nothing patched by hand. On Ubuntu and Debian the picture is different, see the Redis on Ubuntu 26.04 and Redis on Debian guides, and for a quick throwaway instance Redis in Podman or Docker is faster still. My call: if nobody on the team needs the bundled modules, run Valkey. If they do, run Redis 8 from this repo, keep it at 8.10.3 or later, and re-check your config after every major upgrade.

Keep reading

Install PostgreSQL 18 on Debian 13 / 12 Databases Install PostgreSQL 18 on Debian 13 / 12 Install DBeaver on Ubuntu 26.04 / 24.04 and Debian 13 Databases Install DBeaver on Ubuntu 26.04 / 24.04 and Debian 13 Install SQL Server 2025 Developer Edition on Windows Server 2025 Databases Install SQL Server 2025 Developer Edition on Windows Server 2025 MariaDB 13.1 New Features Tested: DENY, JSON Arrows, utf8mb4 Databases MariaDB 13.1 New Features Tested: DENY, JSON Arrows, utf8mb4 MariaDB CVE-2026-92262: Check If You Are Affected and Patch Databases MariaDB CVE-2026-92262: Check If You Are Affected and Patch Install Beekeeper Studio on Rocky Linux 9|AlmaLinux 9 AlmaLinux Install Beekeeper Studio on Rocky Linux 9|AlmaLinux 9

Leave a Comment

Press ESC to close