1、使用yum 命令安装

sudo yum install redis

2、安装完毕后,即可使用下面的命令启动redis服务

service redis start
或者 
systemctl start redis

3、查看redis版本

redis-cli --version

4、设置为开机自动启动

chkconfig redis on
或者
systemctl enable redis.service

5、开放 远程连接

redis默认只能localhost访问,所以需要开启远程登录。解决方法如下:

在redis的配置文件/etc/redis.conf

bind 127.0.0.1 改成了 bind 0.0.0.0

6、打开防火墙

firewall-cmd --permanent --zone=public --add-port=6379/tcp
firewall-cmd --reload

  

相关文章:

  • 2021-10-16
  • 2021-12-04
  • 2022-12-23
  • 2023-03-19
  • 2022-03-05
猜你喜欢
  • 2021-07-18
  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
  • 2022-12-23
  • 2022-12-23
  • 2021-05-24
相关资源
相似解决方案