安裝卸載
查詢可安裝的版本
查詢版本號brew search redis
:
olafwang@OLAFWANG-MB0 etc % brew search redis
==> Formulae
hiredis redis ✔ redis-leveldb [email protected] [email protected]
==> Casks
homebrew/cask/another-redis-desktop-manager
homebrew/cask/redis
安裝redis
brew install redis
或者brew install [email protected]
。
@後面表示版本號,如果不指定表示安裝最新版本。
如果報錯可參考這個 【MacOS】brew: command not found
卸載redis
卸載命令brew uninstall redis
啓停redis命令
1.啓動redis服務
brew services start redis
2.關閉redis服務
brew services stop redis
3.重啓redis服務
brew services restart redis
4.通過bin
目錄啓動
cd /usr/local/Cellar/redis/6.0.5/bin
./redis-server
- 配置開機啓動redis
ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents