centos 7.x yum安装最新 redis

2024-02-22  本文已影响0人  不知不怪

默认的安装源里没有redis最新版的rpm安装文件
需要使用其它的安装源

yum install -y http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
yum --enablerepo=remi install redis -y  --downloadonly --downloaddir=redis

这样可下载最新的rpm文件方便在内网服务器上安装
也可以去掉--downloadonly --downloaddir=redis 选项直接安装

cd redis
rpm -ivh * 
systemctl enable redis
systemctl start redis
firewall-cmd --zone=public --add-port=6379/tcp --permanent
firewall-cmd --reload

其它修改配置文件都是常规操作了

sed -i "s/bind 127.0.0.1/bind 0.0.0.0/g" /etc/redis/redis.conf
sed -i "481i requirepass redis123" /etc/redis/redis.conf
上一篇 下一篇

猜你喜欢

热点阅读