Rumah  >  Artikel  >  pangkalan data  >  教你通过Homebrew安装配置Redis

教你通过Homebrew安装配置Redis

藏色散人
藏色散人ke hadapan
2020-10-20 14:13:472086semak imbas

下面由Redis教程栏目给大家介绍通过Homebrew安装配置Redis,希望对需要的朋友有所帮助!

教你通过Homebrew安装配置Redis

背景

通过 Homebrew (https://brew.sh/), 在本地机器上安装&配置 Redis

安装 Redis

$ brew install redis

Redis 相关配置

电脑开机时, 启动 Redis

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

通过 "launchctl" 启动 Redis

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

以指定配置文件启动 Redis

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

停止当前加载的 Agent

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

默认配置文件的位置

cat /usr/local/etc/redis.conf

卸载 Redis 和相关配置

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

获取 Redis 相关信息

$ brew info redis

校验 Redis 是否运行

$ redis-cli ping

如果正常运行, 响应 PONG

Atas ialah kandungan terperinci 教你通过Homebrew安装配置Redis. Untuk maklumat lanjut, sila ikut artikel berkaitan lain di laman web China PHP!

Kenyataan:
Artikel ini dikembalikan pada:segmentfault.com. Jika ada pelanggaran, sila hubungi admin@php.cn Padam