First, open the Remote Access
1. Open Ports
firewall-cmd --zone=public --add-port=6379
firewall-cmd --zone=public --add-port=6379 --permanent
2. View open ports
firewall-cmd --list-port
3. Modify the configuration file
the redis.conf
Will bind 127.0.0.1 comments or changed bind 0.0.0.0
The protected-mode yes instead protected-mode no;
Second, set a password
# Requirepass foobared find comments remove, modify foobared for the password you want, as requirepass 123456
After the restart it
systemctl restart redis