brew list redis
#结果
/opt/homebrew/Cellar/redis/7.2.3/.bottle/etc/ (2 files)
/opt/homebrew/Cellar/redis/7.2.3/bin/redis-benchmark
/opt/homebrew/Cellar/redis/7.2.3/bin/redis-check-aof
/opt/homebrew/Cellar/redis/7.2.3/bin/redis-check-rdb
/opt/homebrew/Cellar/redis/7.2.3/bin/redis-cli
/opt/homebrew/Cellar/redis/7.2.3/bin/redis-sentinel
/opt/homebrew/Cellar/redis/7.2.3/bin/redis-server
/opt/homebrew/Cellar/redis/7.2.3/homebrew.mxcl.redis.plist
code /opt/homebrew/Cellar/redis/7.2.3/homebrew.mxcl.redis.plist 文件
DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlivekey>
<true/>
<key>Labelkey>
<string>homebrew.mxcl.redisstring>
<key>LimitLoadToSessionTypekey>
<array>
<string>Aquastring>
<string>Backgroundstring>
<string>LoginWindowstring>
<string>StandardIOstring>
<string>Systemstring>
array>
<key>ProgramArgumentskey>
<array>
<string>/opt/homebrew/opt/redis/bin/redis-serverstring>
<string>/opt/homebrew/etc/redis.confstring>
array>
<key>RunAtLoadkey>
<true/>
<key>StandardErrorPathkey>
<string>/opt/homebrew/var/log/redis.logstring>
<key>StandardOutPathkey>
<string>/opt/homebrew/var/log/redis.logstring>
<key>WorkingDirectorykey>
<string>/opt/homebrew/varstring>
dict>
plist>
从里面可以看到 redis.conf 的路径是 /opt/homebrew/etc/redis.conf。
修改完 redis.conf 后重启 redis
redis-server --daemonize yes