Redis

安装

使用Homebrew安装命令

brew install redis

安装成功后

==> Pouring redis--6.2.5.catalina.bottle.tar.gz
==> Caveats
To start redis:
brew services start redis
Or, if you don't want/need a background service you can just run:
/usr/local/opt/redis/bin/redis-server /usr/local/etc/redis.conf
==> Summary
🍺 /usr/local/Cellar/redis/6.2.5: 14 files, 2.0MB
Removing: /usr/local/Cellar/redis/6.2.4... (14 files, 2.0MB)
Removing: /Users/wuxiao/Library/Caches/Homebrew/redis--6.2.4... (879.3KB)

查看安装及配置文件位置

  • Homebrew安装的软件会默认在/usr/local/Cellar/路径下
  • redis的配置文件redis.conf存放在/usr/local/etc路径下

启动redis服务

//方式一:使用brew帮助我们启动软件
brew services start redis
//方式二
redis-server /usr/local/etc/redis.conf

参考阅读