yum 安装 redis 6
blank
blank
发布于 2019-04-02 / 423 阅读 / 0 评论 / 0 点赞

yum 安装 redis 6

安装并启用 redis repo 源 安装 reids

yum install -y epel-release yum-utils &&\
yum install -y http://rpms.remirepo.net/enterprise/remi-release-7.rpm &&\
yum-config-manager --enable remi &&\
yum install -y redis

启动 redis 配置开机自启

systemctl start redis && systemctl enable redis

设置redis 服务器密码

vim /etc/redis.conf

################################## SECURITY ###################################

# Require clients to issue AUTH <PASSWORD> before processing any other
# commands.  This might be useful in environments in which you do not trust
# others with access to the host running redis-server.
#
# This should stay commented out for backward compatibility and because most
# people do not need auth (e.g. they run their own servers).
#
# Warning: since Redis is pretty fast an outside user can try up to
# 150k passwords per second against a good box. This means that you should
# use a very strong password otherwise it will be very easy to break.
#
#### 反注释  requirepass 字段 为 redis 服务器配置密码  
requirepass passwd

重启redis服务使修改生效

systemctl restart redis

评论