我通过以下方式安装了 Redisbrew install redis
并尝试通过以下方式将其添加为服务:
ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
Run Code Online (Sandbox Code Playgroud)
这些没有产生任何错误;但是,Redis 似乎没有启动。如果我跑redis-cli ping
,我就会回来Could not connect to Redis at 127.0.0.1:6379: Connection refused
。
我可以redis-server
在另一个终端窗口中手动运行,但我希望 Redis 在登录时自动启动。
我还尝试卸载 Redis,重新安装它,并使用它brew services
来管理服务(brew services
安装 MongoDB 和 Cassandra 对我来说很好用)。
我没有看到其他人有这个问题,所以我不知道如何诊断。如果有人有任何建议,非常感谢!