无法在Mac OS启动时加载postgresql

Ha *_*ham 39 postgresql macos service launchd postgresql-9.3

我已经安装了postgresqlvia HomeBrew.它工作但今天我发现postgresql计算机启动时服务器不运行.

我尝试使用launchctl以下命令再次加载它:

$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
Run Code Online (Sandbox Code Playgroud)

我看到了这样的信息:

/usr/local/Cellar/postgresql/9.3.4/homebrew.mxcl.postgresql.plist: Service is disabled
Run Code Online (Sandbox Code Playgroud)

我不知道如何启用postgresql服务.有人能告诉我吗?

Par*_*fna 83

使用-w选项launchctl.

$ launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist 
Run Code Online (Sandbox Code Playgroud)

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

  • 但是,这首先是如何被禁用的呢?没有明显原因陷入同样的​​问题,只是好奇...... (8认同)
  • 在Yosemite中应该是`launchctl load -w~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist`. (6认同)

KAR*_*ván 5

新方式如下brew info postgresql:

brew services start postgresql
Run Code Online (Sandbox Code Playgroud)