下载reids
sudo yum install epel-release
sudo yum install redis
编辑配置文件,放开远程链接
vim /etc/redis.conf
将bind 127.0.0.1 改为 bind 0.0.0.0
禁用保护模式: protected-mode no
增加密码:
requirepass yourpassword
重启redis:
sudo systemctl restart redis
测试
redis-cli -h localhost -p 6379 -p paasword