在Mac OS启动时无法使postgresql加载
我通过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服务。 任何人都可以告诉我?
在launchctl使用-w选项。
$ launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
-w覆盖Disabled键并将其设置为false。
作为brew info postgresql的新方法brew info postgresql说:
brew services start postgresql
使用命令brew info postgresql来获得有关如何设置数据库和将plist文件移动到~/Library/LaunchAgentsbuild议也许会有帮助