1、安装Redis
sudo dnf install redis

2、启动Redis服务
sudo systemctl start redis

3、设置Redis开机自启
sudo systemctl enable redis

4、打开Redis配置文件:
sudo vi /etc/redis/redis.conf
在配置文件中找到并修改以下两行,确保密码验证功能已启用:
requirepass your_password
protected-mode yes
将`your_password`替换为您想要设置的密码。

保存并关闭配置文件。
5、重新加载Redis服务以应用更改:
sudo systemctl restart redis

6、验证:
redis-cli -a your_password
将`your_password`替换为您设置的密码。现在,您可以在Redis中执行各种操作了。
