1、安装
brew install redis
➜ ~ brew install redis
==> Downloading https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/bottles/re
######################################################################## 100.0%
==> Pouring redis-6.2.6.arm64_monterey.bottle.tar.gz
==> Caveats
To restart redis after an upgrade:
brew services restart redis
Or, if you don
/opt/homebrew/opt/redis/bin/redis-server /opt/homebrew/etc/redis.conf
==> Summary
🍺 /opt/homebrew/Cellar/redis/6.2.6: 14 files, 2MB
==> `brew cleanup` has not been run in the last 30 days, running now...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Removing: /Users/laizhongbin/Library/Caches/Homebrew/python@3.9--3.9.8... (13.9MB)
Removing: /Users/laizhongbin/Library/Caches/Homebrew/node--17.0.1... (12.0MB)
Removing: /Users/laizhongbin/Library/Caches/Homebrew/sqlite--3.36.0... (2.0MB)
Removing: /Users/laizhongbin/Library/Logs/Homebrew/wget... (64B)
Removing: /Users/laizhongbin/Library/Logs/Homebrew/libidn2... (64B)
Removing: /Users/laizhongbin/Library/Logs/Homebrew/zsh-autosuggestions... (64B)
Removing: /Users/laizhongbin/Library/Logs/Homebrew/gdbm... (64B)
Removing: /Users/laizhongbin/Library/Logs/Homebrew/mpdecimal... (64B)
Removing: /Users/laizhongbin/Library/Logs/Homebrew/libuv... (64B)
Removing: /Users/laizhongbin/Library/Logs/Homebrew/libunistring... (64B)
Removing: /Users/laizhongbin/Library/Logs/Homebrew/brotli... (64B)
Removing: /Users/laizhongbin/Library/Logs/Homebrew/icu4c... (64B)
Removing: /Users/laizhongbin/Library/Logs/Homebrew/readline... (64B)
Removing: /Users/laizhongbin/Library/Logs/Homebrew/lz4... (64B)
Removing: /Users/laizhongbin/Library/Logs/Homebrew/c-ares... (64B)
Removing: /Users/laizhongbin/Library/Logs/Homebrew/nvm... (64B)
Removing: /Users/laizhongbin/Library/Logs/Homebrew/libnghttp2... (64B)
Removing: /Users/laizhongbin/Library/Logs/Homebrew/zookeeper... (64B)
Removing: /Users/laizhongbin/Library/Logs/Homebrew/openjdk... (64B)
Removing: /Users/laizhongbin/Library/Logs/Homebrew/openvpn... (64B)
Removing: /Users/laizhongbin/Library/Logs/Homebrew/pkcs11-helper... (64B)
Removing: /Users/laizhongbin/Library/Logs/Homebrew/kafka... (64B)
Removing: /Users/laizhongbin/Library/Logs/Homebrew/ca-certificates... (64B)
Removing: /Users/laizhongbin/Library/Logs/Homebrew/gettext... (64B)
Removing: /Users/laizhongbin/Library/Logs/Homebrew/zstd... (64B)
Removing: /Users/laizhongbin/Library/Logs/Homebrew/mysql... (1.4KB)
Removing: /Users/laizhongbin/Library/Logs/Homebrew/pcre2... (64B)
Removing: /Users/laizhongbin/Library/Logs/Homebrew/libevent... (64B)
Removing: /Users/laizhongbin/Library/Logs/Homebrew/openssl@1.1... (64B)
Removing: /Users/laizhongbin/Library/Logs/Homebrew/six... (64B)
Removing: /Users/laizhongbin/Library/Logs/Homebrew/protobuf... (64B)
Removing: /Users/laizhongbin/Library/Logs/Homebrew/git... (64B)
Removing: /Users/laizhongbin/Library/Logs/Homebrew/lzo... (64B)
Pruned 0 symbolic links and 2 directories from /opt/homebrew
2、启动服务
brew services start redis

3、进行连接
redis-cli
