centos 7 yum 安装最新版 redis

直接yum安装redis版本偏旧,推荐使用Remi的软件源来安装最新版Redis
yum install -y http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
安装Redis
yum --enablerepo=remi install redis
启动Redis
systemctl start redis
查看Redis版本
redis-cli --version
设为开机启动
systemctl enable redis.service
相关配置
vi /etc/redis.conf
#bind 127.0.0.1 改为 bind 0.0.0.0
#requirepass foobared 改为 requirepass password
防火墙添加6379端口
firewall-cmd --add-port=6379/tcp
重新加载防火墙规则
firewall-cmd --reload

Leave A Comment

Please be polite. We appreciate that. Your email address will not be published and required fields are marked