下载地址:https://centos.pkgs.org/7/remi-x86_64/redis-5.0.12-1.el7.remi.x86_64.rpm.html
安装命令:
rpm -ivh redis-5.0.9-1.el7.remi.x86_64.rpm
安装成功后,需要修改下配置文件,否则无法连接
vim /etc/redis.conf
# 修改内容如下:
1. daemonized no 改为 daemonized yes 以后台静默进程启动
2. 把 bind 127.0.0.1 注释掉
3. protected-mode yes 把yes改为no
4. 如果想要设置密码: requirepass 密码(可选)
三、启动
# 重启redis服务
systemctl restart redis.service
# 设置redis服务为开机自启
systemctl enable redis.service
# 查看redis是否启动成功
ps aux | grep redis