MAC安裝和卸載redis

安裝卸載

查詢可安裝的版本

查詢版本號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
  1. 配置開機啓動redis
ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章