Mac使用Home Brew来安装redis,并设置守护进程

by Liu Yue/2019-03-17

1 首先,先升级你本机的Home brew

brew update

2 安装redis

brew install redis

3 安装成功后,redis配置路径是

/usr/local/etc/redis.conf

4 启动redis服务

redis-server

5 可以设置守护进程

将daemonize配置改成yes,默认值是no

6 将redis服务设置系统开机自启

ln -f /usr/local/Cellar/redis/2.8.13/homebrew.mxcl.redis.plist ~/Library/LaunchAgents/

launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist


至此,mac下配置redis就大功告成了