brew安裝Redis
查看Redis服務
brew search redis
安裝指定版本Redis
brew install [email protected]
配置環境變量
這個環境變量一定要配置好,要不然沒辦法啓動
打開.bash_profile文件:
open -e ~/.bash_profile
將Redis環境變量加入後如下:
使.bash_profile生效:
source ~/.bash_profile
啓動Redis(以下啓動方式,teminal窗口關閉後服務不會停止)
brew services start [email protected]
查看本地運行的服務列表
brew services list