我已经通过 HomeBrew
安装了 postgresql
。它有效,但今天我发现 postgresql
服务器在计算机启动时不运行。
我尝试使用 launchctl
通过以下命令再次加载它:
$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
然后我看到消息:
/usr/local/Cellar/postgresql/9.3.4/homebrew.mxcl.postgresql.plist: Service is disabled
我不知道如何启用 postgresql 服务。谁能告诉我?
最佳答案
使用 -w
选项和 launchctl
。
$ launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
-w
覆盖 Disabled 键并将其设置为 false。
关于macos - 无法在 Mac OS 启动时加载 postgresql,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26334414/