Posts Tagged ‘ startup ’

Tutorial: Launching MAMP Silently on Startup

Monday, August 25th, 2008

MAMP Web ServerMAMP is a great tool for running and managing a development server when you require more than the basic PHP configuration included with Leopard. However, getting the web server to run typically involves launching MAMP, entering your root password, and quitting MAMP.

This tutorial walks through the simple steps needed to launch MAMP silently on startup so that you do not have to enter your root password every time.

The issue with MAMP is that launching Apache must be done as root, so there’s no way to simply add MAMP to your startup items via the system’s Accounts Preferences in a way that will launch the app silently. But you don’t need to. Here’s the deal: MAMP’s launcher is just a pretty UI that opens a shell script that, in turn, launches MAMP’s Apache and MySQL servers.

You can set up launch daemons that do the exact same thing without the need to launch MAMP or enter a password.

Step 1: Create the Start-up Items

Open up your favorite text editor and paste the following into an empty document:

Create another for the MySQL start-up item:

Be sure to replace “YOUR_USERNAME” with the username for your account.

Step 2: Save the Files

Save this file as (or move the file to) /Library/LaunchDaemons/info.mamp.start.apache.plist and /Library/LaunchDaemons/info.mamp.start.mysql.plist, respectively.

Step 3: Set Permissions

If you try to launch the daemons at the moment, you’ll get a “dubious permissions” error. To correct this problem, you’ll need to change your permissions.

In your terminal, type:

You’re done! Reboot your computer and test that your development server is running as expected by opening a served page in your browser.

Sphere: Related Content

Tutorial: Starting Subversion on Startup

Wednesday, November 28th, 2007

Subversion Version Control SystemHonestly, I can’t remember if Subversion came pre-installed on Tiger or not, but I know for a fact that it does come as a standard component on Leopard. This is great news.

One small issue, though, is that there is not a way in the OS X UI to have Subversion start up when your computer boots up. This tutorial will help you set up a launch daemon that will fire up Subversion silently when your computer boots up.

Before we begin, you’ll need to make sure you have enabled root access on your machine. In Tiger, follow these instructions. In Leopard, follow these instructions instead.

Step 1: Create a Start-up Item

Open up your favorite text editor and paste the following into an empty document:

Step 2: Locate your repository

On line 16 of the plist file, you’ll find the string “/usr/local/svn” which points to the default repository location. If you have installed your repository in a different location, change the contents of this line to point to your repository. For instance, mine is on a separate drive, so my line looks like:

/Volumes/Max/SVN_Repository

Step 3: Save the File

Save this file as (or move the file to) /Library/LaunchDaemons/org.tigris.Subversion.plist.

Step 4: Set Permissions

If you try to launch the daemon at the moment, you’ll get a “dubious permissions” error. To correct this problem, you’ll need to change your permissions.

In your terminal, type:

cd /Library/LaunchDaemons/
sudo chown root:wheel org.tigris.Subversion.plist

You’re done! Reboot your computer and test that your SVN server is running as expected.

Sphere: Related Content