前言:此文章的基础是Mac系统已安装过Homebrew,如果未安装,此处奉上教程链接如下,详细介绍Homebrew的用法
Mac安装和使用Homebrew(mac极简软件包管理工具)
brew安装Redis
1️⃣、查看Redis服务
brew search redis
2️⃣、安装指定版本Redis
brew install redis@4.0
3️⃣、配置环境变量
打开.bash_profile文件:
open -e ~/.bash_profile
将Redis环境变量加入后如下:
使.bash_profile生效:
source ~/.bash_profile