redis安装(brew)
2021-04-01 本文已影响0人
sunney0
1.brew install redis
<brew install redis或者brew install redis@4.0。
@后面表示版本号,如果不指定表示安装最新版本。>
image.png
2.查看是否安装成功 brew list
image.png3.启动redis
方法1
brew services start redis
image.png
方法2
cd /usr/local/Cellar/redis/6.0.8/bin
redis-server
image.png
配置 ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents 后,好像不用进入redis安装路径,直接任意路径执行redis-server 都可以开启redis
image.png
后台启动redis
路径 /usr/local/etc/redis.conf redis.conf 文件vim方式打开,修改General中的daemonize 为yes
Others https://www.jianshu.com/p/a2deaab7c0e1
卸载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
问题参考
https://blog.csdn.net/qq_28703359/article/details/81155813
2.配置后台启动redis
https://blog.csdn.net/ksdb0468473/article/details/52126009