The following column Redis Tutorial will introduce to you how to install and configure Redis through Homebrew. I hope it will be helpful to friends in need!
Background
Install & configure Redis on the local machine through Homebrew (https://brew.sh/)
Installing Redis
$ brew install redis
Redis related configuration
When the computer is turned on, start Redis
$ ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents
Start Redis through "launchctl"
$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
Start Redis with the specified configuration file
$ redis-server /usr/local/etc/redis.conf
Stop the currently loaded Agent
$ launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
The location of the default configuration file
cat /usr/local/etc/redis.conf
Uninstall Redis and related configurations
$ brew uninstall redis $ rm ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
Get Redis related information
$ brew info redis
Verify whether Redis is running
$ redis-cli ping
If it is running normally, respondPONG
The above is the detailed content of Teach you how to install and configure Redis through Homebrew. For more information, please follow other related articles on the PHP Chinese website!