目 录CONTENT

文章目录

CentOS7 中 yum 安装 Redis

过客
2021-01-21 / 0 评论 / 0 点赞 / 5 阅读 / 0 字

一、添加EPEL仓库,然后更新yum源

yum -y install epel-release
yum -y update

二、然后安装Redis数据库

yum -y install redis

三、安装好后启动Redis服务

systemctl start redis #启动redis服务器

systemctl stop redis #停止redis服务器

systemctl restart redis #重新启动redis服务器

systemctl status redis #获取redis服务器的运行状态

systemctl enable redis #开机启动redis服务器

systemctl disable redis #开机禁用redis服务器

四、配置文件

文件配置路径为/etc/redis.conf

1. 注释 bind这一行

#bind 127.0.0.1

2. 修改密码

requirepass 密码
0
  1. 支付宝打赏

    qrcode alipay
  2. 微信打赏

    qrcode weixin

评论区