vim redis.conf 进入配置文件 按 i 进入编辑模式
1.修改bind 两种方式
把bind 127.0.0.1改成---->bind 0.0.0.0 (也可以将bind 127.0.0.1注释掉)
2.protected-mode yes 改成---->protected-mode no
按Esc 退出编辑 shfit + ‘:’ 输入wq 回车
3.关闭防火墙
systemctl stop firewalld.service #停止防火墙
systemctl disable firewalld.service #禁止防火墙开机启动
firewall-cmd --state #查看默认防火墙状态 防火墙状态显示 not running 就好了
4. daemonize no 改成------> daemonize yes