Mac安装Redis
Mac安装redis步骤
使用homebrew安装redis(特别简单)
- commond+空格搜索terminal终端
打开终端输入
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
选择安装源,直接执行即可 - 安装完成后输入
brew install redis
即可
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/redis-6.0.1
######################################################################## 100.0%
==> Pouring redis-6.0.1.mojave.bottle.tar.gz
==> Caveats
To have launchd start redis now and restart at login:
brew services start redis
Or, if you don't want/need a background service you can just run:
redis-server /usr/local/etc/redis.conf
==> Summary
🍺 /usr/local/Cellar/redis/6.0.1: 13 files, 3.7MB
通过命令启动redis
brew services start redis
到这里就能看到redis服务启动的标志了,然后我们检查一下
在启动一个终端 输入 ps aux | grep redis
检查redis是否启动
输入redis-cli
直接进入终端 输入ping
服务正常会回复pong
至此安装成功