一、假设

1、假设服务器使用CentOS 8

2、假设redis已经安装OK

二、解决方案

1、找到redis配置

【Linux】Redis外网访问_解决方案

2、编辑redis.conf

vim redis.conf

3、修改配置:注释IP绑定

【Linux】Redis外网访问_linux_02

4、修改配置:保护模式yes->no

【Linux】Redis外网访问_解决方案_03

5、设置授权秘密

【Linux】Redis外网访问_linux_04

6、wq保存

7、重启服务

systemctl restart redis