1. 修改redis的配置文件
vim /usr/local/bin/myconfig/redis.conf
-
将只绑定本地注释
-
保护模式改为 no
-
允许后台运行
2. 开放端口6379
firewall-cmd --zone=public --add-port=6379/tcp --permanet
重启防火墙服务
systemctl restart firewalld.service
3. 阿里云服务器控制台配置安全组
4. 重启redis-server
[root@AlibabaECS bin]# redis-server myconfig/redis.conf