寻找方式
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 文件
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>homebrew.mxcl.redis</string>
<key>LimitLoadToSessionType</key>
<array>
<string>Aqua</string>
<string>Background</string>
<string>LoginWindow</string>
<string>StandardIO</string>
<string>System</string>
</array>
<key>ProgramArguments</key>
<array>
<string>/opt/homebrew/opt/redis/bin/redis-server</string>
<string>/opt/homebrew/etc/redis.conf</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StandardErrorPath</key>
<string>/opt/homebrew/var/log/redis.log</string>
<key>StandardOutPath</key>
<string>/opt/homebrew/var/log/redis.log</string>
<key>WorkingDirectory</key>
<string>/opt/homebrew/var</string>
</dict>
</plist>
从里面可以看到 redis.conf 的路径是 /opt/homebrew/etc/redis.conf。
修改完 redis.conf 后重启 redis
redis-server --daemonize yes
文章讲述了如何在Homebrew中管理Redis,包括Redis的安装路径、配置文件redis.conf的位置以及如何重启并设置为守护模式。重点在于`brewlist`和`redis.conf`的管理和操作。

5208

被折叠的 条评论
为什么被折叠?



