xuzhengfu at xuzhengfudeiMac in ~
$ brew install redis
==> Downloading https://homebrew.bintray.com/bottles/redis-5.0.8.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/c7/c72def1c78f6c24c02d47de80a0b5ae5ef67640a
######################################################################## 100.0%
==> Pouring redis-5.0.8.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/5.0.8: 13 files, 3.1MB
[x] 在命令行界面运行下列命令:
brew services start redis
结果如下:
xuzhengfu at xuzhengfudeiMac in ~
$ brew services start redis
==> Successfully started `redis` (label: homebrew.mxcl.redis)
1. macOS
结果如下:
结果如下:
2. 验证
redis-cli
命令,如果前面 Redis 服务安装运行成功可以看到 Redis 环境的提示符:Logging
2020-04-14 21:44:36 initialize