Skip to content

Using launchctl on Mac OS X (10.5.2)

February 18, 2008

Just a note concerning launching background services via ‘launchctl’. My understanding is that this takes the place of rc.d/ scripts in linux for example.

  1. Launch MySQL deamon
    sudo launchctl load -w /Library/LaunchDaemons/com.mysql.mysqld.plist
  2. Stop MySQL deamon (same as above, but replace ‘load’ with ‘unload’)
    sudo launchctl unload -w /Library/LaunchDaemons/com.mysql.mysqld.plist
About these ads
6 Comments
  1. ndcalcb permalink

    So what does launchctl do?

    By the way, I like the cover image on your page.

  2. brunoj permalink

    Basically, launchctl control the starting, stopping, and restarting of background services. In this case I’m starting/stopping the MySQL (database) server which runs the backend of a Wiki I’m starting to help with collaborative writing. It will do the same for other services like the SSH deamon, or the web server, etc..

    From the man page:

    launchctl interfaces with launchd to load, unload daemons/agents and generally control launchd. launchctl supports taking subcommands on the command line, interactively or even redirected from standard input.

  3. Fox permalink

    Where do you get the plist file? Is it hard to ‘make’ one if a package installer didn’t make it for you?

  4. You can create and edit plist file with Lingon (http://tuppis.com/lingon/).

  5. benjamac permalink

    You can also create it with XCode… New File / Other / Property List

Trackbacks & Pingbacks

  1. Recent Links Tagged With "launchctl" - JabberTags

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: