Github 地址 https://github.com/antirez/redis

https://redis.io/download

当前最新版本为5.0.5

2. 解压安装

$tar xzf redis-5.0.5.tar.gz
$cd redis-5.0.5
$make

在安装时候如果提示

`invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun`

 

Redis 安装 - macOS

 

 

则需要安装 Xcode toolkit,参考 https://ma.ttias.be/mac-os-xcrun-error-invalid-active-developer-path-missing-xcrun/

xcode-select --install

然后再继续make

安装完成以后在当前目录下会新建src目录,内含编译后的redis-server和redis-cli

3. 启动redis

$ cd src/
$ ./redis-server 

如果要使用自己的配置文件则使用

$ ./redis-server /path/to/redis.conf

 

Redis 安装 - macOS

 服务端默认绑定127.0.0.1 端口号为 6379

4. 启动客户端

$ ./redis-cli

5. 测试命令

 

Redis 安装 - macOS

 

相关文章:

  • 2021-04-27
  • 2021-08-19
  • 2021-04-22
  • 2021-11-13
  • 2021-07-29
  • 2021-09-08
  • 2021-10-16
  • 2021-09-12
猜你喜欢
  • 2021-10-09
  • 2021-08-27
  • 2022-01-05
  • 2021-10-15
  • 2021-12-04
  • 2021-12-05
  • 2021-06-09
相关资源
相似解决方案