Mac安装Redis

Mac安装redis步骤

使用homebrew安装redis(特别简单)

  1. commond+空格搜索terminal终端
    打开终端输入
    /bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
    选择安装源,直接执行即可
  2. 安装完成后输入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
image

至此安装成功

posted @ 2023-11-09 14:32  dd随风  阅读(73)  评论(0编辑  收藏  举报