- Create AWS Account
- BitNami Amazon Machine Images
- How to install Ubuntu Desktop on EC2 EBS
- How to install VMWare tools on BitNami Virtual Appliances
- Tutorial: Rubystack Deployment Alternatives
- How-To Video: Launching BitNami Virtual Appliances
- How to Install Multiple Joomla! Sites on One BitNami Stack
- How to backup and update the BitNami Redmine Stack
- Tutorial for Deploying BitNami Stacks on Amazon EC2
- How to install and make public any BitNami Stack
- BitNami Modules. As an user... I want integration
- How to install services on OSX
- How To Install Services on Linux
- Installing RubyStack
- From InstantRails to RubyStack
- Rolling on Rails With RubyStack
How to install services on OSX
If you have read the previous post about installing services on Linux (What, you haven’t? Do it now!), you will have a rough idea on how init and the rc.d scripts work. On OSX, launchd is the tool that replaces them both. launchd is invoked by the kernel while booting the system and takes care of managing the processes, just as init does. To interact with launchd there is a tool called launchctl, which will be used in this tutorial.
The daemon scripts are located at
/Library/LaunchDaemons. Only the system administrator has the permissions to write there, so take into account that you will need admin rights to follow the next steps.
Write a properties file (which is a type of file with .plist extension that Apple uses for configuration), in
/Library/LaunchDaemons. For example, let’s say we want the Drupal Stack to be started at boot time. We would create the file
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key>
<string>com.bitnami-drupal.services</string> <key>ProgramArguments</key> <array> <string>INSTALLDIR/ctlscript.sh</string> <string>start</string> </array> <key>UserName</key> <string>root</string> <key>RunAtLoad</key> <true/>
<key>OnDemand</key> <false/> </dict> </plist>
Remember to substitute INSTALLDIR with your current installation path!
When you reboot the machine, the servers will be automatically started. Man, that was easy! If you prefer not to reboot, just use launchctl tool to start the service
launchctl load -w /Library/LaunchDaemons/com.bitnami-drupal.service.plist
To uninstall the service, type
launchctl unload -w /Library/LaunchDaemons/com.bitnami-drupal.service.plist
and delete the properties file
so that it isn’t launched at boot time.
This is the end of the article. If you have comments or suggestions, please post at the following topic on the forums
Apr 28, 2008 | Tags:
Digg This Story
Join Our BitNami Group
Follow Us On Twitter Add to delicious Stumble It!