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?
Use -w
option with launchctl
.
$ launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
-w
Overrides the Disabled key and sets it to false.