Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove autostart of apache on macosx

Tags:

macos

apache

I'm on a macosx lion. A service is up and running on localhost:8080.

This service is an apache + php packaged by entreprisedb.

How could I remove the autostart ?

like image 970
toutpt Avatar asked Nov 09 '11 12:11

toutpt


People also ask

Is Apache installed by default on Mac?

The latest versions of macOS come with pre-installed Apache 2.4. But it's hard to manage it via homebrew due to Apple has removed some of the required scrips from the latest macOS releases.


1 Answers

1) The autostart is usually not in the User-Autostart-Items, but you should check them anyway:

Open the System-Preferences > Users > Select your user > Start-Objects

Check if there is something started you want to deactive and do so if.

2) Normally the start of apache is handled by the launchd-service: You can either change this manually, or with the help of a old little tool named "Lingon". To do it manually, you need to find the launchd-folders:

~/Library/LaunchAgents ~/Library/LaunchDaemons  /Library/LaunchAgents /Library/LaunchDaemons  /System/Library/LaunchAgents /System/Library/LaunchDaemons 

There you'll find .plist-files, that define when and what to start. To remove a object from auto-start use launchctl on the terminal to remove it from the actual launchd and then simply delete the file.

user$ launchctl unload *filename.plist* 

Make sure you do not delete the wrong files! This may lead to a fatal situation on your machine. Btw: The .plist-Files can be read with BBEdit, TextWrangler or the PropertyList Editor from the Apple Developer-Tools.

like image 189
Erik Avatar answered Oct 13 '22 18:10

Erik