用自制软件安装和运行redis

时间:2018-01-10 21:53:49

标签: redis homebrew

我已经用

安装了redis

brew install redis

然后我用

开始

brew services start redis

但是在运行时

redis-cli ping

我明白了:

Could not connect to Redis at 127.0.0.1:6379: Connection refused

当我跑步时

brew services list

我明白了:

Name Status User Plist redis started clint /Users/clint/Library/LaunchAgents/homebrew.mxcl.redis.plist

但是当我查看Console.app中的system.log时,我每10秒看一次: com.apple.xpc.launchd[1] (homebrew.mxcl.redis[85774]): Service could not initialize: 17C205: xpcproxy + 11572 [1522][1729AB5E-4591-3F1B-AC72-36700ABA4F74]: 0xd com.apple.xpc.launchd[1] (homebrew.mxcl.redis): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.

有什么想法吗?

1 个答案:

答案 0 :(得分:1)

当我查看/Users/clint/Library/LaunchAgents/homebrew.mxcl.redis.plist时,我发现它指向/usr/local/var/log处的日志目录。该文件夹的权限是错误的。执行chown -R $USER:admin /usr/local/** redis后立即启动。