Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
add comment

2 Answers

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
add comment

Create scripts and drop them in /Library/StartupItems?

share|improve this answer
add comment

Your Answer

 
discard

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.