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

你可能感兴趣的:(redis)