2016年7月7日木曜日

start/stop apache automatically on mac os x



Recent Mac OS X is no longer able to start Apache from system configuration GUI and have to use terminals instead. Furthermore, init, inted and other legacy daemons are obsoleted. all those things are switched to launchd. The command below upload apache property file(plist) to launchd. Apache is started at boot or on demand or any other designated method written in the property.

  $ sudo launchctl load -w /System/Library/LaunchDaemons/org.apache.httpd.plist

"unload" the property will disable all related set up which are done at "load".

  $ sudo launchctl unload /System/Library/LaunchDaemons/org.apache.httpd.plist

0 件のコメント: