Home  >  Article  >  Database  >  Teach you how to install and configure Redis through Homebrew

Teach you how to install and configure Redis through Homebrew

藏色散人
藏色散人forward
2020-10-20 14:13:472165browse

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!

Teach you how to install and configure Redis through Homebrew

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!

Statement:
This article is reproduced at:segmentfault.com. If there is any infringement, please contact admin@php.cn delete