官网: https://redis.io/arrow-up-righthttps://gist.github.com/tomysmile/1b8a321e7c58499ef9f9441b2faa0aa8arrow-up-righthttps://medium.com/@petehouston/install-and-config-redis-on-mac-os-x-via-homebrew-eb8df9a4f298arrow-up-right
官网: https://redis.io/arrow-up-right
https://gist.github.com/tomysmile/1b8a321e7c58499ef9f9441b2faa0aa8arrow-up-right
https://medium.com/@petehouston/install-and-config-redis-on-mac-os-x-via-homebrew-eb8df9a4f298arrow-up-right
type below:
brew update brew install redis
Get Redis package information.
brew info redis
Test if Redis server is running.
redis-cli ping
If it replies “PONG”, then it’s good to go!
To have launchd start redis now and restart at login:(后台程序)
brew services start redis
to stop it, just run:
Or, if you don't want/need a background service you can just run(用这个好):
Location of Redis configuration file.
https://stackoverflow.com/questions/7537905/redis-set-a-password-for-redisarrow-up-right
在/usr/local/etc/redis.conf里找到# requirepass foobared改成requirepass 123456
/usr/local/etc/redis.conf
# requirepass foobared
requirepass 123456
Uninstall Redis and its files.
Last updated 5 years ago
brew services stop redis
redis-server /usr/local/etc/redis.conf
brew uninstall redis rm ~/Library/LaunchAgents/homebrew.mxcl.redis.plist