Mac 安装Redis

安装

brew install redis
% brew install redis
==> Downloading https://mirrors.cloud.tencent.com/homebrew-bottles/bottles/redis-6.2.4.arm64_big_sur
######################################################################## 100.0%
==> Pouring redis-6.2.4.arm64_big_sur.bottle.tar.gz
==> Caveats
To have launchd start redis now and restart at login:
  brew services start redis
Or, if you don‘t want/need a background service you can just run:
  redis-server /opt/homebrew/etc/redis.conf
==> Summary
 /opt/homebrew/Cellar/redis/6.2.4: 13 files, 2MB

启动服务

 % brew services start redis
==> Successfully started `redis` (label: homebrew.mxcl.redis)

测试连接

% redis-cli                
127.0.0.1:6379> set name zhang
OK
127.0.0.1:6379> get name
"zhang"

Mac 安装Redis

上一篇:【移动前端开发实践】从无到有(统计、请求、MVC、模块化)H5开发须知


下一篇:linux tee命令