I looked for a solution as nice as the WAMP server in Mac and finally found AMPPS, but had to solve a few issues: how to start it automatically when OS X starts, avoiding the password prompt when starting a service, fixing the user reset that occurs when OS X crashes (happens in Yosemite), and then hiding the script output and icon. I'm sharing my solution here in case someone finds it useful or in case I need it in the future:
1. In Mac OSX open Automator.2. Create a new script.3. Add a Run Shell Script.4. Choose Shell: /bin/bash5. Paste the following command that repairs the username in Apache config:
perl -pi -w -e 's{User "root"}{User "YOUR_USERNAME"}g' /Applications/AMPPS/apache/conf/httpd.conf
6. Paste the following command that executes AMPPS with admin permissions, ignores the output and closes the script:
echo YOUR_PASSWORD | sudo -S /Applications/AMPPS/Ampps.app/Contents/MacOS/Ampps >/dev/null 2>&1&
7. Save script.8. Add to System Preferences > Users & Groups > Login Items.
|