一、安装redis
GitHub地址:https://github.com/redis/redis
下载压缩包:https://github.com/redis/redis/archive/refs/tags/7.4.2.tar.gz
1 | tar -zxvf 7.4.2.tar.gz |
测试
- 启动服务器
1
redis-server
- 连接服务器
1
redis-cli
二、安裝hiredis
GitHub地址:https://github.com/redis/hiredis
下载压缩包:https://github.com/redis/hiredis/archive/refs/tags/v1.2.0.tar.gz
1 | tar -zxvf v1.2.0.tar.gz |
三、安装redis plus plus
GitHub地址:https://github.com/sewenew/redis-plus-plus
下载压缩包:https://github.com/sewenew/redis-plus-plus/archive/refs/tags/1.3.13.tar.gz
1 | tar -zxvf 1.3.13.tar.gz |
四、CMake使用
1 | #添加Redis++ |