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 /Library/LaunchDaemons/com.bitnami-drupal.service.plist
<?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
/Library/LaunchDaemons/com.bitnami-drupal.service.plist
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
http://bitnami.org/forums/forums/27/topics/366
Comments
help
I am using Firefox on a Mac with system OSX 10.6.5 to design a web site in WordPress. I have installed Bitnami and am able to use it untill I shut down FireFox and reboot. After I reboot I am no longer able to establish a connection to the server at localhost:8080. I am very much a beginner at both WordPress and coding. I am confused as to what is happening and why. From what I have read it seems like I need to start the server using the program Terminal that is found in the Utilities folder on my Mac. But I am not sure what to do next. HOW to write a terminal, HOW TO save it and make Bitnami work again. And honestly not understanding why BItnami needs to be "turned on". Why is this not explained when you download the program. can anyone shed some light on this for me?? ANy new information would be greatly appreciated :(
2011-01-06 07:48 PM by mauradillon
help x2
I am having the exact same issue on the exact same system. I was very proud of myself until I rebooted the next day. Help would be much appreciated.
2011-01-08 08:14 AM by gkcdesign
Same here.
This seems to be a common issue with this software. After I installed, I had no problems the first day. But when I went back to log-in today, it doesn’t find the localhost. I havent uploaded the wordpress files yet. Was only working locally. input: http://localhost:8080/wordpress/wp-login This is what I get.... Safari can’t open the page “http://localhost:8080/wordpress/wp-login” because Safari can’t connect to the server “localhost”. Any ideas?
2011-01-09 12:50 AM by mtvessell
Servers should be restarted after reboot
The servers included in the stack are not installed as services. You need to start the servers after rebooting your machine. In OS X you may do it from terminal or using our control panel. Please check: http://wiki.bitnami.org/Native_Installers_Quick_Start_Guide#How_can_start_or_stop_the_servers.3f This post describes the steps you can follow to make it start on its own on each boot. Please post your questions to our forums. That way, others can benefit from the answers.
2011-01-10 09:19 AM by carlos
Creating a plist file
I tried to follow the directions above. I used Text Editor to copy in the code, but I couldn't save it as a .plist file. I opened a .plist file and saw it had a drop down menu. Is there a way to do this within .plist or a suggestion for a different program to save a .plist file from?
2011-01-21 04:07 AM by trchandler
Re: Creating a plist file
Once you created a file, you can go to the Terminal and try to rename it: mv your_file.txt your_file.plist. In any case we have recently included a graphical tool called "control", could you try to use it to start/stop the servers easily?
2011-01-21 08:22 AM by beltran
Servers started, now what?
Same difficulties. After rebooting my Mac, "localhost:8080" doesn't access my Bitnami stack. Followed all suggestions, nothing's working. My servers are started (green showing for both Mysql and Apache on Bitnami Control Panel) but how do I access my site locally after that?
2011-04-03 04:51 PM by jansage
Servers started, now what?
Same difficulties. After rebooting my Mac, "localhost:8080" doesn't access my Bitnami stack. Followed all suggestions, nothing's working. My servers are started (green showing for both Mysql and Apache on Bitnami Control Panel) but how do I access my site locally after that?
2011-04-03 05:38 PM by jansage
Please post to the forums
Please post your question to the forums
2011-04-03 07:05 PM by daniel
Servers started, now what?
Same difficulties. After rebooting my Mac, "localhost:8080" doesn't access my Bitnami stack. Followed all suggestions, nothing's working. My servers are started (green showing for both Mysql and Apache on Bitnami Control Panel) but how do I access my site locally after that?
2011-04-05 07:15 PM by jansage