Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I hava installed apache and mysql in my Mac, how to make them auto-start after system boots ? thanks!

share|improve this question
up vote 1 down vote accepted

The preferred way to launch things like that is now launchd -- create a launchd .plist file and put it in /Library/LaunchDaemons. Apple's documentation is here. One warning: launchd items should not daemonize themselves. Apache does this by default, so run it with the -D FOREGROUND option. You can use the file /System/Library/LaunchDaemons/org.apache.httpd.plist (which is set to start Apple's version of Apache) as an example, just be sure to change the "Label" string so launchd doesn't get yours confused with Apple's. Create another for mysql, and you're set. They'll be loaded automatically when the computer boots, or you can load them manually with:

sudo launchctl load /Library/LaunchDaemons/whatever.plist
share|improve this answer

Create scripts and drop them in /Library/StartupItems?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.