问题:redis-cli的server closed the connection(服务器关闭连接)
1.开启firewalld防火墙
systemctl start firewalld
2.开启6379端口
firewall-cmd --add-port=6379/tcp --permanent
1.关闭firewalld防火墙
systemctl stop firewalld
3.重启redis
./redis-server /usr/local/redis/etc/redis.conf
4.登录redis-cli
[root@233 bin]# redis-cli
127.0.0.1:6379> get k
(error) NOAUTH Authentication required.
127.0.0.1:6379>auth (密码)