mac安裝redis正確方法

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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章