Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
273 views
in Technique[技术] by (71.8m points)

macos - Can't make postgresql load at startup in Mac OS

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?

question from:https://stackoverflow.com/questions/26334414/cant-make-postgresql-load-at-startup-in-mac-os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Use -w option with launchctl.

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

-w Overrides the Disabled key and sets it to false.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...