无法在Mac OS启动时加载postgresql

时间:2014-10-13 06:53:20

标签: macos postgresql service postgresql-9.3 launchd

我已通过postgresql安装了HomeBrew。它工作但今天我发现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服务。有人能告诉我吗?

3 个答案:

答案 0 :(得分:83)

-w使用launchctl选项。

$ launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist 

-w覆盖Disabled键并将其设置为false。

答案 1 :(得分:5)

brew info postgresql的新方式说:

brew services start postgresql

答案 2 :(得分:1)

使用命令brew info postgresql获取有关如何设置数据库并将plist文件移至~/Library/LaunchAgents

的建议也可能会有所帮助
相关问题