Mac安装、配置redis

使用Homebrew安装redis能够减小大量的安装和配置的工做量。 
安装命令redis

brew install rediside

安装完成后的提示信息测试

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.confspa

开机启动redis命令code

$ ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgentsorm

使用launchctl启动redis serverserver

$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plisthomebrew

使用配置文件启动redis serverit

$ redis-server /usr/local/etc/redis.confclass

中止redis server的自启动

$ launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.redis.plist

redis 配置文件的位置

/usr/local/etc/redis.conf

卸载redis和它的文件

$ brew uninstall redis

$ rm ~/Library/LaunchAgents/homebrew.mxcl.redis.plist

测试redis server是否启动

$ redis-cli ping

相关文章
相关标签/搜索