一、概述
內存數據庫,key-value存儲系統,是當前比較熱門的NOSQL系統之一。
二、homebrw安裝
1.搜索redis
brew search redis
➜ ~ brew search redis
==> Formulae
hiredis redis-leveldb
openresty/brew/redis-nginx-module [email protected]
openresty/brew/redis2-nginx-module [email protected]
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>