Mac安装redis,简单易操作版

1、redis下载地址:GitHub - redis/redis: Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes, Streams, HyperLogLogs, Bitmaps.Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes, Streams, HyperLogLogs, Bitmaps. - GitHub - redis/redis: Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes, Streams, HyperLogLogs, Bitmaps.https://github.com/redis/redis

2、安装redis-cli使用如下命令:

brew tap ringohub/redis-cli
 
brew update && brew doctor
 
brew install redis-cli

安装时如遇报错,会有操作提示,按照error:下的提示进行操作即可

3、启动redis

redis-server

4、连接redis

redis-cli

5、想要阅读源码可以下载一个CLION,最新版本默认含有makefile插件,下载地址(自行破解):Download CLion: A Smart Cross-Platform IDE for C and C++Download the latest version of CLion for Windows, macOS or Linux.https://www.jetbrains.com/clion/download/#section=mac

6、下载后可利用 Build -> Rebuild Project 进行编译,可以看到控制台很快生成了各种 *.o 文件,即可在控制台通过redis-cli连接后开始调试



参考文章: Redis源码阅读环境搭建 - 掘金

你可能感兴趣的:(redis,macos,缓存)