MacOS:安装Redis与启用
Posted 陌生谁家年少
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了MacOS:安装Redis与启用相关的知识,希望对你有一定的参考价值。
一、概述
内存数据库,key-value存储系统,是当前比较热门的NOSQL系统之一。
二、homebrw安装
1.搜索redis
brew search redis
➜ ~ brew search redis
==> Formulae
hiredis redis-leveldb
openresty/brew/redis-nginx-module redis@3.2
openresty/brew/redis2-nginx-module redis@4.0
redis
==> Casks
homebrew/cask/another-redis-desktop-manager
homebrew/cask/redis
2.安装
brew install redis
➜ ~ brew install redis
3.redis配置文件路径
/usr/local/etc/redis.conf
4.卸载redis
brew uninstall redis
三、服务管理
1.启动
brew services start redis
➜ ~ brew services start redis
==> Successfully started `redis` (label: homebrew.mxcl.redis)
2.查看服务
brew services list
➜ ~ brew services list
Name Status User Plist
nginx stopped
redis started chao /Users/chao/Library/LaunchAgents/homebrew.mxcl.redis.plist
3.关闭服务
brew services stop redis
➜ ~ brew services stop redis
Stopping `redis`... (might take a while)
==> Successfully stopped `redis` (label: homebrew.mxcl.redis)
4. 连接
redis-cli -h 127.0.0.1
➜ ~ redis-cli -h 127.0.0.1
127.0.0.1:6379> KEYS *
(empty list or set)
127.0.0.1:6379>
以上是关于MacOS:安装Redis与启用的主要内容,如果未能解决你的问题,请参考以下文章