::: tip 注意:

  • Redis 5.0 +

本文档拿 Centos 8 做演示
:::

更新系统

  1. # 更新过无需更新
  2. yum -y update

安装 Redis

  1. yum install -y redis

启动 Redis

  1. systemctl start redis

安装成功验证

  1. [root@VM-8-9-centos ~]# redis-cli
  2. 127.0.0.1:6379> SET test 1
  3. OK
  4. 127.0.0.1:6379> KEYS *
  5. 1) "test"
  6. 127.0.0.1:6379> GET test
  7. "1"
  8. 127.0.0.1:6379>