注意:
- Redis 5.0 +
本文档拿 Centos 8 做演示
更新系统
shell
# 更新过无需更新
yum -y update
安装 Redis
shell
yum install -y redis
启动 Redis
shell
systemctl start redis
安装成功验证
shell
[root@VM-8-9-centos ~]# redis-cli
127.0.0.1:6379> SET test 1
OK
127.0.0.1:6379> KEYS *
1) "test"
127.0.0.1:6379> GET test
"1"
127.0.0.1:6379>