本文共 895 字,大约阅读时间需要 2 分钟。
使用Homebrew安装redis可以减少大量的安装和配置的工作量。
安装命令
brew install redis 安装完成后的提示信息To have launchd start redis at login: ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents Then to load redis now: launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist Or, if you don’t want/need launchctl, you can just run: redis-server /usr/local/etc/redis.conf
开机启动redis命令
$ ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents使用launchctl启动redis server
$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist使用配置文件启动redis server
$ redis-server /usr/local/etc/redis.conf停止redis server的自启动
$ launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.redis.plistredis 配置文件的位置
/usr/local/etc/redis.conf卸载redis和它的文件
brewuninstallredisrm ~/Library/LaunchAgents/homebrew.mxcl.redis.plist测试redis server是否启动
$ redis-cli pingbrew services start redis
转载于:https://blog.51cto.com/55757353/2307775