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

Teach you how to install and configure Redis through Homebrew

藏色散人
Release: 2020-10-20 14:13:47
forward
2170 people have browsed it

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
Copy after login

Redis related configuration

When the computer is turned on, start Redis

$ ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents
Copy after login

Start Redis through "launchctl"

$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
Copy after login

Start Redis with the specified configuration file

$ redis-server /usr/local/etc/redis.conf
Copy after login

Stop the currently loaded Agent

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

The location of the default configuration file

cat /usr/local/etc/redis.conf
Copy after login

Uninstall Redis and related configurations

$ brew uninstall redis
$ rm ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
Copy after login

Get Redis related information

$ brew info redis
Copy after login

Verify whether Redis is running

$ redis-cli ping
Copy after login

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!

Related labels:
source:segmentfault.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template