To configure the LaunchDaemon we need to do just 4 things: To start creating the configuration file, open Lingon and click the New button at the top-left corner. If you place the configuration file in either of the other two folders it won’t be able to authenticate and the Apache server won’t start. This is because XAMPP requires authentication to use ports below 1024 and a configuration file in the /Library/LaunchDaemons/ folder will run as root. If you’re using the standard Apache port 80 in XAMPP or any non-standard port below 1024 then you’ll need to place the configuration file in the /Library/LaunchDaemons/ folder. A full list of parameters can be found here. There are other options available, but I’m only concerned with starting Apache. In Terminal I’d type /Applications/XAMPP/xamppfiles/xampp startapache to start XAMPP’s Apache server, so this is the command I’ll include in my configuration file. The configuration file I’m going to create will start XAMPP’s Apache server as a service at system startup. However, the latest (last?) versions of both run fine under Mac OS X 10.5.8 Leopard Mac 0S X 10.6.2 Snow Leopard.ģ. Whilst both Smultron and Lingon are free they’re unfortunately no longer being developed. There’s also a great little app called Lingon, coincidentally by the same author, which makes the whole configuration a snap. You can use a text editor like Smultron by Peter Borg which will allow you to authenticate. User login : ~/Library/LaunchAgents/Īny text editor will allow you to create the necessary configuration file, but you’ll be asked to authenticate if saving the file in either the /Library/LaunchDaemons/ or /Library/LaunchAgents/ folders.System startup : /Library/LaunchDaemons/.launchd configuration files can be placed in one of three folders determining when and for whom the service will start. plist extension, a format familiar to many Mac OS X users. To have launchd start XAMPP’s Apache server as a service we need to create a launchd configuration file. From a user’s perspective, launchd replaces the more traditional cron. Services that are run on a per-user basis are known as agents, but are still managed by launchd. They are managed by a program named launchd which was first introduced in Mac OS X 10.4 Tiger. So, how can I have my XAMPP servers running whenever I login? The answer, by using a daemon.ĭaemons in Mac OS X are system-wide services that are launched at system start-up. Including XAMPP as a Login Item merely opens XAMPP Control.app and I have to start the servers manually. So, by checking this option and including MAMP as a Login Item my MAMP servers were up-and-running when I logged in. A small but none the less important feature of MAMP is an option to have the Apache and MySQL servers started when you open the application. Until I recently switched to XAMPP I had been using MAMP to provide a local server environment on my Mac.
0 Comments
Leave a Reply. |