5

Amazon Linux 2023 is loosely based on Fedora 34, 35 and 36 as per aws: https://docs.aws.amazon.com/linux/al2023/ug/relationship-to-fedora.html

However redis package is not available in AL2023, instead redis6 is available: https://docs.aws.amazon.com/linux/al2023/release-notes/all-packages-al2023-20230322.html

I tried installing it using sudo dnf -y install redis6 and it installed successfully. But I'm not able to find any redis configuration file. A redis6 folder got created and is accessible using sudo cd /etc/redis6 however the folder is empty and doesn't have any configuration file. ls inside /etc/redis6 is not returning anything.

What is the right way to install redis server in AL2023?

[UPDATE] ls command didn't return any files inside /etc/redis6 folder but a configuration file is actually available. Using sudo nano /etc/redis6/redis6.conf I was able to update the existing redis config file to use systemd and set a password.

So the redis server is working fine now, just need to use redis6 instead of redis everywhere in AL2023, for ex redis6-cli.

VIVEK
  • 53
  • 1
  • 4

3 Answers3

9

Try this:

sudo dnf install -y redis6
sudo systemctl start redis6
sudo systemctl enable redis6
sudo systemctl is-enabled redis6
redis6-server --version
redis6-cli ping
user2213459
  • 106
  • 1
0

Try this

sudo amazon-linux-extras install epel sudo amazon-linux-extras install redis6

sudo systemctl start redis

sudo systemctl enable redis

  • 1
    Hey. Thanks for the help. But AL2023 doesn't support amazon-linux-extras like Amazon Linux 2.0, so running the above commands is returning the following error: `sudo: amazon-linux-extras: command not found` Only packages that are part of the `amazonlinux` repository can be installed in AL2023 – VIVEK Mar 30 '23 at 18:21
0

For anyone like me that uses AML23 and has issues with redis, @user2213459 answer worked for me. This is an expression of appreciation for him. Thank you so much.

P.S.: I can't comment because i have a low reputation; hence, I added it as an answer. lol