Redis 安裝 - macOS


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

1. 下載安裝包

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`

 

 

 

則需要安裝 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

 

 服務端默認綁定127.0.0.1 端口號為 6379

4. 啟動客戶端

$ ./redis-cli

5. 測試命令

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM