1.关闭防火墙
1.[root@localhost ~]# systemctl status firewalld //防火墙状态
2.systemctl stop firewall//关闭
3.关闭开机启动防火墙
systemctl disable firewalld
出现问题
Failed to stop firewall.service: Unit firewall.service not loaded.
执行
pkill -f firewalld
systemctl start firewalld
再次关闭
感谢大佬 https://www.cnblogs.com/spll/p/9804469.html
2.修改redis.conf
[root@localhost redis-6.2.3]# ll
备份 cp redis.conf bak_redis.conf
vim redis.conf
esc +/bind 找到
注释掉
protected-mode no
esc + :wq + 回车
[root@localhost redis-6.2.3]# cd src/
[root@localhost src]# ./redis-server ../redis.conf &