Reputation: 2596
I have installed postgresql
via HomeBrew
. It worked but today I find that postgresql
server does not run when computer start.
I try to use launchctl
to load it again with below command:
$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
and I see the message:
/usr/local/Cellar/postgresql/9.3.4/homebrew.mxcl.postgresql.plist: Service is disabled
I do not know how to enable postgresql service. Could anyone show me?
Upvotes: 40
Views: 16258
Reputation: 31477
The new way as brew info postgresql
says:
brew services start postgresql
Upvotes: 5
Reputation: 555
It might also be helpful to use the command brew info postgresql
for suggestions about how to set up your database and move the plist file into ~/Library/LaunchAgents
Upvotes: 1
Reputation: 22930
Use -w
option with launchctl
.
$ launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
-w
Overrides the Disabled key and sets it to false.
Upvotes: 85